When converting from XML samples to different schema types (and in particular
to DTD) with Trang there is a very common situation that is not handled well.
Here it is a simple example:
<test>
<a>
<x>some text</x>
and
<y>some other text</y>
</a>
</test>
The inferred content for the "a" element is
one or more of (element x, element y, text)
and the conversion to DTD stops and fails with a message that says:
***sorry, cannot handle this kind of "oneOrMore"***
This, basically makes the support for generating a DTD from XML unusable for
many cases, when an element contains mixed content.
A possible fix will be to "approximate" oneOrMore to zeroOrMore when converting
to DTD.
I am not sure if we should issue a warning (similar to the other approximate..
errors) or not when we make this approximation, because <text/> matches an
empty element, so basically one or more on mixed content is equivalent to zero
or more on mixed content.
Original issue reported on code.google.com by georgebina76 on 27 Mar 2014 at 12:52
Original issue reported on code.google.com by
georgebina76
on 27 Mar 2014 at 12:52