DTD Validation issues
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi Team,
I have use lxml for dtd validation it is failed. But in same file with same dtd if i have validate through oxygen editor it is pass.
Below is our dtd:
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT book (desig) >
<!ELEMENT desig (#PCDATA)>
<!ATTLIST desig value NMTOKEN #IMPLIED>
Below is our xml:
<?xml version="1.0" encoding=
<book>
<desig value="
</book>
Python Code:
from lxml import etree
dtd = etree.DTD(
fl = etree.parse(
validation = dtd.validate(fl)
if validation == False:
print(
Eror Log:
file:/C:
Kindly Check suggest how to solve this.
Second issues is: I have use lots of schema file for validation all is good work and quickly, but one schema is not work. if i have use this. lxml is not respond it is hanged. i have check the file size of this schema it is only 2Mb file size and many schema is very big size and it is work fine. How to becomes this type of issues i don't know. please suggest how to check this and find exact the issues.
Below is our python version:
Python : sys.version_
lxml.etree : (4, 3, 2, 0)
libxml used : (2, 9, 5)
libxml compiled : (2, 9, 5)
libxslt used : (1, 1, 30)
libxslt compiled : (1, 1, 30)
Regards,
Anil Prasad
Both DTD validation and XML-Schema validation are implemented in libxml2. There is nothing lxml can do about this.