Closed GoogleCodeExporter closed 9 years ago
identityref is now mapped to QName. This makes the XSD validate correct
instance
documents.
Re. the cos-nonambig problem, libxml2 does not complain, but xjc complains even
on
this simple construct which looks correct to me.
<xs:choice>
<xs:sequence>
<xs:element name="running" minOccurs="0"/>
<xs:any minOccurs="0" maxOccurs="unbounded"
namespace="##other" processContents="lax"/>
</xs:sequence>
<xs:sequence>
<xs:element name="candidate" minOccurs="0"/>
<xs:any minOccurs="0" maxOccurs="unbounded"
namespace="##other" processContents="lax"/>
</xs:sequence>
</xs:choice>
Original comment by mbj4...@gmail.com
on 6 Oct 2009 at 9:36
While I am not an expert, I think the following is preferred:
<xs:sequence>
<xs:choice>
<xs:element name="running" minOccurs="0"/>
<xs:element name="candidate" minOccurs="0"/>
</xs:choice>
<xs:any minOccurs="0" maxOccurs="unbounded"
namespace="##other" processContents="lax"/>
</xs:sequence>
I am basing this observation on the XSD produced by the OASIS WSDM working group
where the xs:any appeared at most once within an xs:ComplexType for example:
<xs:complexType name="MessageContentType">
<xs:sequence>
<xs:element name="Size"
type="mows:MessageContentSizeType" minOccurs="0"/>
<xs:choice>
<xs:element name="NotIncluded"
type="mows:MessageContentNotIncludedFlag"/>
<xs:element name="Text" type="xs:string"/>
<xs:element name="Binary" type="xs:base64Binary"/>
<xs:element name="Xml"
type="mows:AnyXmlContentsType"/>
</xs:choice>
<xs:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other" processContents="lax"/>
</xs:complexType>
I think libxml2 will like the suggested alternative as well.
BTW, the output from pyang -f xsd ietf-netconf is not even close to what is in
Appendix B of RFC4741bis-01.
Original comment by ellison....@gmail.com
on 7 Oct 2009 at 3:24
Original issue reported on code.google.com by
ellison....@gmail.com
on 6 Oct 2009 at 4:59