Closed GoogleCodeExporter closed 9 years ago
Thanks David,
Here it is a smaller sample file that can be used to reproduce the issue:
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<start>
<element name="test">
<mixed>
<attribute name="a"/>
</mixed>
</element>
</start>
</grammar>
As a workaround you can move the attribute outside the mixed pattern. In your
case
that means writing the CATEGORIES pattern as below:
<define name="CATEGORIES">
<choice>
<notAllowed/>
<element name="CATEGORIES">
<attribute name="DESC">
<data type="string"/>
</attribute>
<mixed>
<zeroOrMore>
<ref name="CATEGORY"/>
</zeroOrMore>
</mixed>
</element>
</choice>
</define>
An alternative workarouns is to replace the mixed with interleave and add a text
pattern inside interleave, as described here
http://relaxng.org/spec-20011203.html#IDA0FZR
resulting:
<define name="CATEGORIES">
<choice>
<notAllowed/>
<element name="CATEGORIES">
<interleave>
<attribute name="DESC">
<data type="string"/>
</attribute>
<zeroOrMore>
<ref name="CATEGORY"/>
</zeroOrMore>
<text/>
</interleave>
</element>
</choice>
</define>
Best Regards,
George
Original comment by georgebina76
on 4 May 2010 at 12:30
This issue was closed by revision r2342.
Original comment by georgebina76
on 25 May 2010 at 12:18
Original comment by georgebina76
on 25 May 2010 at 12:22
Original issue reported on code.google.com by
dlee.cal...@gmail.com
on 3 May 2010 at 8:11Attachments: