Subject:Bug in generating Xml from Dtd Author:Tobias Friedl Date:09 Dec 2014 07:39 AM
Hello,
There is a bug when creating a sample Xml file based on a Dtd.
Dtd code:
<!ELEMENT A (B+|C+)>
<!ELEMENT B (#PCDATA)>
<!ELEMENT C (#PCDATA)>
Now the invalid Xml code that will be generated:
<A><B/><C/></A>
As there is no + outside the group, there must not be B and C child elements of A, only one of them is allowed.
Validating the XML also shows that error.
Subject:Bug in generating Xml from Dtd Author:Tobias Friedl Date:12 Dec 2014 10:09 AM Originally Posted: 12 Dec 2014 09:45 AM
Hello,
the alternative is correctly converted to a <xsd:choice> in the XML schema.
When i now generate the XML file, it still contains both elements, but the second one is commented out, e.g:
<A><B><!-- <C></C> --></B></A>
Now valid, but the commented stuff is not required.