Some questions about DTDs

topic posted Mon, October 16, 2006 - 9:36 AM by  Chad
I have recently developed a functioning knowledge of how to do the basics of XML, mostly building InDesign templates. The DTD is something that I like to put into my template so that all my tags are readily available. I am having some issues with the validation of the DTD, and would like some feedback on the structure. Here is a sample

<!ELEMENT Root (Story+)>
<!ELEMENT Story (title?, artist?, Fsize1?, Fsize2?, Fsku?, Fprice1?, Fprice2?, Usize1?, Usize2?, Usku?, Uprice1?, Uprice2?)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT artist (#PCDATA)>
<!ELEMENT Fsize1 (#PCDATA)>
<!ELEMENT Fsize2 (#PCDATA)>
<!ELEMENT Fsku (#PCDATA)>
<!ELEMENT Fprice1 (#PCDATA)>
<!ELEMENT Fprice2 (#PCDATA)>
<!ELEMENT Usize1 (#PCDATA)>
<!ELEMENT Usize2 (#PCDATA)>
<!ELEMENT Usku (#PCDATA)>
<!ELEMENT Uprice1 (#PCDATA)>
<!ELEMENT Uprice2 (#PCDATA)>

It brings in my tags, but once I import the XML dataset the DTD will not validate. I cannot find anything about it on the web as far as it relates to InDesign, and I have followed syntax including Version Declarations etc...to no avail. I also am unable to actually change the name of the Root, thus I have just named it Root here. Do I need to declare an AttList for my elements to make this function properly?

Sampe of dataset structure:

<Root>
<Story><title Type="String"></title>, <artist Type="String"></artist>
framed <Fsize1 Type="Inches">"</Fsize1> x <Fsize2 Type="Inches">"</Fsize2> #<Fsku Type="Number"></Fsku> <Fprice1 Type="Dollars">$</Fprice1> <Fprice2 Type="Dollars">$</Fprice2>
unframed <Usize1 Type="Inches">"</Usize1> x <Usize2 Type="Inches">"</Usize2> #<Usku Type="Number"></Usku> <Uprice1 Type="Dollars">$</Uprice1> <Uprice2 Type="Dollars">$</Uprice2>
</Story>
</Root>

Any feedback would be greatly appreciated.
posted by:
Chad
SF Bay Area