<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#d4d0c8>
<DIV><SPAN class=q0>Hello,<BR><BR>I haven't found any Trang mailing list so
decided to I post my problem here.<BR><BR>I'm using Trang (version 20030619) to
translate my Relax NG schemas to XML<BR>Schemas. I've found that
<interleave> element translation works fine if the<BR>patterns inside are
elements, but fails if the patterns use definitions. <BR><BR>This is an
example:<BR><BR>--------------------- input file: test.rnc
------------------------<BR><BR>start = element dummy { empty }<BR><BR># Trang
works OK<BR>interleave_without_definitions =<BR> element test {<BR>
element e1 { empty }<BR> & element e2 { empty
}?<BR> }<BR><BR># Trang fails<BR>def1 = element e1 { empty }<BR>def2 =
element e2 { empty }<BR>interleave_with_definitions =<BR> element test {
def1 & def2 ? }<BR><BR>--------------------- output file: test.xsd
------------------------<BR><BR><?xml version="1.0"
encoding="UTF-8"?><BR><xs:schema xmlns:xs="<A class=0
href="http://www.w3.org/2001/XMLSchema"><FONT
color=#000000>http://www.w3.org/2001/XMLSchema</FONT></A>"<BR>
elementFormDefault="qualified"> <xs:element name="dummy"><BR>
<xs:complexType/><BR> </xs:element><BR> <!--
Trang works OK --><BR> <xs:group
name="interleave_without_definitions"><BR>
<xs:sequence><BR> <xs:element
name="test"><BR> <xs:complexType><BR>
<xs:all><BR>
<xs:element ref="e1"/><BR>
<xs:element minOccurs="0" ref="e2"/><BR>
</xs:all><BR> </xs:complexType><BR>
</xs:element><BR>
</xs:sequence><BR> </xs:group><BR> <xs:element
name="e1"><BR> <xs:complexType/><BR>
</xs:element><BR> <xs:element name="e2"><BR>
<xs:complexType/><BR> </xs:element><BR> <!-- Trang
fails --><BR> <xs:group
name="interleave_with_definitions"><BR>
<xs:sequence><BR> <xs:element
name="test"><BR> <xs:complexType><BR>
<xs:choice minOccurs="0"
maxOccurs="unbounded"><BR>
<xs:element ref="e1"/><BR>
<xs:element ref="e2"/><BR>
</xs:choice><BR>
</xs:complexType><BR> </xs:element><BR>
</xs:sequence><BR>
</xs:group><BR></xs:schema><BR><BR>As you can see,
"interleave_without_definitions" uses xs:all (fine)
but<BR>"interleave_with_definitions" uses "xs:choice" (wrong).
<BR><BR>I need definitions in my schema.<BR>Is there any workarround to
this problem ?<BR><BR>Thanks in
advance,<BR>Manuel<BR></SPAN></DIV></BODY></HTML>