lxml not including entities defined in another file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
New
|
Undecided
|
Unassigned |
Bug Description
I have created a file of entity definitions (entities.dtd) that gets included in many schemas
<!ENTITY lowalpha "a-z">
<!ENTITY hialpha "A-Z">
<!ENTITY alpha "&lowalpha;
<!ENTITY digit "0-9">
<!ENTITY uword "([&digit;
<!ENTITY Port ":&uword;">
including this one
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema SYSTEM "entities.dtd">
<xs:schema xmlns:xs="http://
<xs:simpleType name="PortType">
<xs:restriction base="xs:string">
<xs:pattern value="&Port;"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
etree.parse() on this schema fails with the messaage
lxml.etree.
-version info---
Python : sys.version_
lxml.etree : (4, 6, 2, 0)
libxml used : (2, 9, 5)
libxml compiled : (2, 9, 5)
libxslt used : (1, 1, 30)
libxslt compiled : (1, 1, 30)
-------
Test script