-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjust range for DTD Validation errors #107
Comments
@NikolasKomonen I have adjusted error for DTD like WTP XMl Editor, but it misses tests. It should be cool if you could write it for each DTD error code in the existing DTDDiagnosticsTest class. Thanks! |
Could you attach your XML content in this issue please. |
<?xml version="1.0"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<note>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend</body>
</note> |
@fbricon should be fixed and with test too:) |
Yup it works. Now we just need tests for MSG_CONTENT_INCOMPLETE, MSG_REQUIRED_ATTRIBUTE_NOT_SPECIFIED, MSG_ATTRIBUTE_NOT_DECLARED, MSG_ATTRIBUTE_VALUE_NOT_IN_LIST so we can close that one |
yes sure, if you can write it or just find sample like you have done previously, it should be very cool. |
There's 3: <?xml version="1.0"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<note>
<foo></foo>
<from nope="">Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend</body>
</note> |
Another issue (found while checking https://www.tutorialspoint.com/dtd/dtd_attributes.htm examples): <?xml version = "1.0"?>
<!DOCTYPE address [
<!ELEMENT address (company)*>
<!ELEMENT company (#PCDATA)>
<!ATTLIST company name NMTOKEN #FIXED "tutorialspoint">
]>
<address>
<company name="etutorialspoint">we are a free online teaching faculty</company>
</address> |
WTP don't support it. lsp4xml supports it now.
Done. @fbricon please close this issue if you think it's good and you find not another error whihc could be not supported. Thanks! |
Found a couple other errors:
<?xml version="1.0"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>
<note>
<to>dd</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend</body>
</note>
<?xml version="1.0"?>
<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDAxTA)>
]>
<note>
<to>dd</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend</body>
</note> |
@fbricon thoses errors are for DTD content. I need parser |
Fair enough. Closing. |
No description provided.
The text was updated successfully, but these errors were encountered: