DTD to XML output problem!

This should cover W3C XML Schema, Relax NG and DTD related problems.
Posts: 2

DTD to XML output problem!

Wed Mar 04, 2015 9:37 pm

Hi! I have the following DTD file :

Code: Select all

<!ELEMENT book (bookinfo,chapter*)>
<!ELEMENT chapter (title,section*)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT bookinfo (title,author,copyright)>
<!ELEMENT author (firstname,surname)>
<!ELEMENT copyright (year,holder)>
<!ENTITY % divers "para|programlisting|itemizedlist|orderedlist">
<!ELEMENT section (title,(%divers;)+)>
<!ELEMENT programlisting (#PCDATA)>
<!ELEMENT holder (#PCDATA)>
<!ELEMENT surname (#PCDATA)>
<!ELEMENT firstname (#PCDATA)>
<!ELEMENT itemizedlist (listitem+)>
<!ELEMENT orderedlist (listitem+)>
<!ELEMENT listitem (%divers;)+>

I'm trying to generate a xml file from this exact DTD but not every elements and child elements appear in the generated xml file. Here's my procedure, File, New, XML, Customize, Root Element : book and I've checked both Add optional content and Add first Choice particle.

Here's the xml output :

Code: Select all


Do you have an idea why not all my elements and child elements are included in the final xml output?

Thanks a lot for your help!

Return to “XML Schemas”

Who is online

Users browsing this forum: No registered users and 1 guest