A
Asfand Yar Qazi
Hi,
xmllint --valid gives error output on some code (included below
file "Shotgun_Robot.dtd" (don't ask)
<!ELEMENT Image (#PCDATA) > <!-- #PCDATA == image path -->
<!-- x/y values default to 0, w/h values default to image w/h-->
<!ATTLIST Image
srcrect_x CDATA #IMPLIED
srcrect_y CDATA #IMPLIED
srcrect_w CDATA #IMPLIED
srcrect_h CDATA #IMPLIED
<!-- If element content is empty, the Drawable name points to an
already created Drawable. If it is not empty, it defines a
Drawable of the name and type given. -->
<!ELEMENT Drawable (EMPTY|Image|Mup)
<!ATTLIST Drawable
name CDATA #REQUIRED
<!ELEMENT Mup (Drawable)* >
file "image_test.xml"
<?xml version="1.0"?>
<!DOCTYPE root SYSTEM "Shotgun_Robot.dtd" [
<!ELEMENT root ANY>
]>
<root>
<Drawable name="mup1">
<Mup>
<Drawable name="t43a">
<Image>images/sprites/tank_ClassicTrackT43A.png</Image>
</Drawable>
<Drawable name="t43a" />
<Drawable name="mup1" />
</Mup>
</Drawable>
</root>
error output:
image_test.xml:14: validity error: Element Drawable content does not
follow the DTD
Expecting (EMPTY | Image | Mup), got
<Drawable name="t43a" />
^
image_test.xml:15: validity error: Element Drawable content does not
follow the DTD
Expecting (EMPTY | Image | Mup), got
<Drawable name="mup1" />
^
<?xml version="1.0"?>
<!DOCTYPE root SYSTEM "Shotgun_Robot.dtd" [
<!ELEMENT root ANY>
]>
<root>
<Drawable name="mup1">
<Mup>
<Drawable name="t43a">
<Image>images/sprites/tank_ClassicTrackT43A.png</Image>
</Drawable>
<Drawable name="t43a"/>
<Drawable name="mup1"/>
</Mup>
</Drawable>
</root>
Wha??
Thanks,
Asfand Yar
xmllint --valid gives error output on some code (included below
file "Shotgun_Robot.dtd" (don't ask)
<!ELEMENT Image (#PCDATA) > <!-- #PCDATA == image path -->
<!-- x/y values default to 0, w/h values default to image w/h-->
<!ATTLIST Image
srcrect_x CDATA #IMPLIED
srcrect_y CDATA #IMPLIED
srcrect_w CDATA #IMPLIED
srcrect_h CDATA #IMPLIED
<!-- If element content is empty, the Drawable name points to an
already created Drawable. If it is not empty, it defines a
Drawable of the name and type given. -->
<!ELEMENT Drawable (EMPTY|Image|Mup)
<!ATTLIST Drawable
name CDATA #REQUIRED
<!ELEMENT Mup (Drawable)* >
file "image_test.xml"
<?xml version="1.0"?>
<!DOCTYPE root SYSTEM "Shotgun_Robot.dtd" [
<!ELEMENT root ANY>
]>
<root>
<Drawable name="mup1">
<Mup>
<Drawable name="t43a">
<Image>images/sprites/tank_ClassicTrackT43A.png</Image>
</Drawable>
<Drawable name="t43a" />
<Drawable name="mup1" />
</Mup>
</Drawable>
</root>
error output:
image_test.xml:14: validity error: Element Drawable content does not
follow the DTD
Expecting (EMPTY | Image | Mup), got
<Drawable name="t43a" />
^
image_test.xml:15: validity error: Element Drawable content does not
follow the DTD
Expecting (EMPTY | Image | Mup), got
<Drawable name="mup1" />
^
<?xml version="1.0"?>
<!DOCTYPE root SYSTEM "Shotgun_Robot.dtd" [
<!ELEMENT root ANY>
]>
<root>
<Drawable name="mup1">
<Mup>
<Drawable name="t43a">
<Image>images/sprites/tank_ClassicTrackT43A.png</Image>
</Drawable>
<Drawable name="t43a"/>
<Drawable name="mup1"/>
</Mup>
</Drawable>
</root>
Wha??
Thanks,
Asfand Yar