[relaxng-user] problems with trang making xsd, mixed="true"
Sebastian Rahtz
sebastian.rahtz at computing-services.oxford.ac.uk
Mon Nov 29 23:56:59 ICT 2004
My schema has this:
<rng:define name="docAuthor">
<rng:element name="docAuthor">
<rng:ref name="macro.phraseSeq"/>
<rng:ref name="docAuthor.attributes"/>
</rng:element>
</rng:define>
where macro.phraseSeq is
<rng:define name="macro.phraseSeq">
<rng:zeroOrMore>
<rng:ref name="macro.phrasegroup"/>
</rng:zeroOrMore>
</rng:define>
This translate with trang into
<xsd:element name="docAuthor">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="ns1:macro.phraseSeq">
<xsd:attributeGroup ref="ns1:docAuthor.attributes"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
and
<xsd:complexType name="macro.phraseSeq" mixed="true">
<xsd:group minOccurs="0" maxOccurs="unbounded"
ref="ns1:macro.phrasegroup"/>
</xsd:complexType>
which looks fine. Most tests pass it OK.
But the Microsoft parser says "The derived type and the base type
must have the same content type" because docAuthor does not say
it is "mixed='true'".
Can anyone explain to me
a) is Microsoft correct?
b) whether I can fix this in any way, short of writing a transform of
the XSD?
yours depressed by Microsoft again
Sebastian
--
Sebastian Rahtz
Information Manager, Oxford University Computing Services
13 Banbury Road, Oxford OX2 6NN. Phone +44 1865 283431
OSS Watch: JISC Open Source Advisory Service
http://www.oss-watch.ac.uk
More information about the relaxng-user
mailing list