My favorites | Sign in
Project Logo
                
New issue | Search
for
| Advanced search | Search tips
Issue 81: Trang generates illegal XSD from RNG
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by ujay68, Jun 16, 2009
Attached is an RNG schema for an XML document that has different content models for two appearances of the 
element 'a':

<root>
 <a><r/><s/></a>
 <a><t/><u/></a>
</root>

Trang 2008-10-28 generates the attached XSD. Validating the above XML with the Java 6 JAXP API gives:

org.xml.sax.SAXParseException: cos-element-consistent: Error for type '#AnonType_root'. Multiple elements 
with name 'a', with different types, appear in the model group.

XML Schema probably cannot describe this content model (at least, I don't know how), but it would be nice 
if trang either reported an error during translation or (much more complicated, probably) had an option for 
generating a combined content model for the 'a' element.

Regards,

Jay

test.rng
571 bytes   Download
test.xsd
927 bytes   Download
Sign in to add a comment

Hosted by Google Code