Clifford W. Racz said:
The tool does validate an uploaded XML Schema against the XML Schema definition (again, another schema).
The tool does not check DTD Syntax though. It treats it like and XSD and fails on the first entity.
....
Well, you can't upload and check a DTD directly. But there is a way of
forcing the tool to actually perform a DTD syntax check: just write an
XML file that does nothing except for referring to your DTD and upload
it. The tool will then prompt you for the DTD, you can upload it in a
second step, and if there is a syntax error in your DTD, you will get
an error message. If the DTD is correct but your dummy XML file does
not conform to it, that fact will be reported after any errors in the
DTD.
This works for both DTDs and XSDs.
You can test this workaround by using an error-free pair of an XML and
DTD file (for example the files I will attach below), then insert a
syntax error in the DTD (for example, change an ATTLIST into an
ATLIST). The tool will then report that syntax error.
Hope this clears it up. I see that it would be a nice future feature
for the site to also offer syntax checks for DTD files without XML
files, so you are not forced to do that workaround.
Rainer
XML file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE personnel SYSTEM "personal.dtd">
<personnel>
<person id="Big.Boss">
<name><family>Boss</family> <given>Big</given></name>
<email>
[email protected]</email>
<link subordinates="one.worker two.worker three.worker four.worker
five.worker"/>
</person>
<person id="one.worker">
<name><family>Worker</family> <given>One</given></name>
<email>
[email protected]</email>
<link manager="Big.Boss"/>
</person>
<person id="two.worker">
<name><family>Worker</family> <given>Two</given></name>
<email>
[email protected]</email>
<link manager="Big.Boss"/>
</person>
<person id="three.worker">
<name><family>Worker</family> <given>Three</given></name>
<email>
[email protected]</email>
<link manager="Big.Boss"/>
</person>
<person id="four.worker">
<name><family>Worker</family> <given>Four</given></name>
<email>
[email protected]</email>
<link manager="Big.Boss"/>
</person>
<person id="five.worker">
<name><family>Worker</family> <given>Five</given></name>
<email>
[email protected]</email>
<link manager="Big.Boss"/>
</person>
</personnel>
DTD:
<?xml encoding="UTF-8"?>
<!ELEMENT personnel (person)+>
<!ELEMENT person (name,email*,url*,link?)>
<!ATTLIST person id ID #REQUIRED>
<!ATTLIST person note CDATA #IMPLIED>
<!ATTLIST person contr (true|false) 'false'>
<!ATTLIST person salary CDATA #IMPLIED>
<!ELEMENT name ((family,given)|(given,family))>
<!ELEMENT family (#PCDATA)>
<!ELEMENT given (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT url EMPTY>
<!ATTLIST url href CDATA '
http://'>
<!ELEMENT link EMPTY>
<!ATTLIST link manager IDREF #IMPLIED>
<!ATTLIST link subordinates IDREFS #IMPLIED>
<!NOTATION gif PUBLIC '-//APP/Photoshop/4.0' 'photoshop.exe'>