You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by in...@compchemcons.com on 2005/03/14 15:52:01 UTC
problem with xs:redefine pointing to file with xs:include
Hi,
I am having a problem trying to transform an XML-Schema into a set of
Java classes.
My Schema uses the xs:redefine mechanism, i.e. it contains:
<xs:redefine schemaLocation="ODM1-2-1.xsd"> <!-- points to ODM1-2-1.xsd
-->
<!-- we add an extra attribute to ItemData of ODM -->
<xs:attributeGroup name="ItemDataAttributeExtension">
<xs:attributeGroup ref="ItemDataAttributeExtension"/>
<xs:attribute ref="my:count" use="required"/>
</xs:attributeGroup>
<!-- we add an extra element to ItemData -->
<xs:group name="ItemDataElementExtension">
<xs:sequence>
<xs:group ref="ItemDataElementExtension"/>
<xs:element ref="my:sub" minOccurs="1"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
</xs:redefine>
ODM1-2-1.xsd however contains (only) an xs:include pointing to the
foundation schema, i.e. ODM1-2-1.xsd has:
<xs:schema targetNamespace="http://www.cdisc.org/ns/odm/v1.2"
xmlns="http://www.cdisc.org/ns/odm/v1.2"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<!--
import ODM foundation schemas
-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="xml.xsd"/>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#"
schemaLocation="xmldsig-core-schema.xsd"/>
<xs:include schemaLocation="ODM1-2-1-foundation.xsd"/>
</xs:schema>
and the ODM1-2-1-foundation.xsd then really contains the foundation
schema.
When I try to compile, I get the error:
C:\XMLBeans_ODM_VendorExtensions\schemas\my_simple-extension.xsd:13:
error: Redefined attribute group ItemDataAttributeExtension not found
in ODM1-2-1.xsd
C:\XMLBeans_ODM_VendorExtensions\schemas\my_simple-extension.xsd:19:
error: Redefined model group ItemDataElementExtension not found in
ODM1-2-1.xsd
Essentially this is correct: attribute group ItemDataAttributeExtension
and model group ItemDataElementExtension reside in the to-be-included
file ODM1-2-1-foundation.xsd, but XMLBeans seems not to have included
the latter in ODM1-2-1.xsd.
How can I tell XMLBeans to do so ?
Is this a bug, or not supported yet, or should I give a parameter.
I tried using as well using the ant build as using scomp.
Many thanks in advance,
Jozef
Jozef Aerts
Computer Chemistry Consultancy
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org