U
uridor
Hello,
I've been trying to make my XSD work, but I'm stuck. I did manage to
narrow it down to a simple use case, so I'd appreciate it if someone
could load these and see what's wrong:
It's basically one XML file and two XSDs, listed below.
Thanks in advance for any suggestions.
Uri
XML FILE
=======
<?xml version="1.0" encoding="UTF-8"?>
<sys
rocess id="x" xmlns:sys="www.aternity.com/sys"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="www.aternity.com/activity c:\temp\a.xsd"/>
A.XSD FILE
=========
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2007 rel. 3 sp1 (http://
www.altova.com)-->
<xs:schema xmlns="www.aternity.com/activity" xmlns:xs="http://
www.w3.org/2001/XMLSchema" xmlns:http="www.aternity.com/http"
xmlns:sys="www.aternity.com/sys" xmlns:ui="www.aternity.com/ui"
targetNamespace="www.aternity.com/activity">
<xs:import namespace="www.aternity.com/sys" schemaLocation="b.xsd"/>
<xs:complexType name="CT_Rule">
<!-- this tag works -->
<xs:attribute name="id" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="x"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<!-- this tag doesn't work -->
<!--xs:attributeGroup ref="gr_reference"/-->
</xs:complexType>
<xs:attributeGroup name="gr_reference">
<xs:attribute ref="id" use="optional"/>
<!--xs:attribute ref="idtype" use="optional"/-->
</xs:attributeGroup>
<xs:attribute name="id">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:schema>
B.XSD FILE
=========
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="www.aternity.com/activity" xmlns:sys="www.aternity.com/sys"
targetNamespace="www.aternity.com/sys">
<xs:import namespace="www.aternity.com/activity"
schemaLocation="a.xsd"/>
<xs:element name="process">
<xs:complexType>
<xs:complexContent>
<xs:extension base="sys:CT_Rule"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="CT_Rule">
<xs:complexContent>
<xs:extension base="CT_Rule"/>
</xs:complexContent>
</xs:complexType>
</xs:schema>
I've been trying to make my XSD work, but I'm stuck. I did manage to
narrow it down to a simple use case, so I'd appreciate it if someone
could load these and see what's wrong:
It's basically one XML file and two XSDs, listed below.
Thanks in advance for any suggestions.
Uri
XML FILE
=======
<?xml version="1.0" encoding="UTF-8"?>
<sys
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="www.aternity.com/activity c:\temp\a.xsd"/>
A.XSD FILE
=========
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2007 rel. 3 sp1 (http://
www.altova.com)-->
<xs:schema xmlns="www.aternity.com/activity" xmlns:xs="http://
www.w3.org/2001/XMLSchema" xmlns:http="www.aternity.com/http"
xmlns:sys="www.aternity.com/sys" xmlns:ui="www.aternity.com/ui"
targetNamespace="www.aternity.com/activity">
<xs:import namespace="www.aternity.com/sys" schemaLocation="b.xsd"/>
<xs:complexType name="CT_Rule">
<!-- this tag works -->
<xs:attribute name="id" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="x"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<!-- this tag doesn't work -->
<!--xs:attributeGroup ref="gr_reference"/-->
</xs:complexType>
<xs:attributeGroup name="gr_reference">
<xs:attribute ref="id" use="optional"/>
<!--xs:attribute ref="idtype" use="optional"/-->
</xs:attributeGroup>
<xs:attribute name="id">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
</xs:schema>
B.XSD FILE
=========
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="www.aternity.com/activity" xmlns:sys="www.aternity.com/sys"
targetNamespace="www.aternity.com/sys">
<xs:import namespace="www.aternity.com/activity"
schemaLocation="a.xsd"/>
<xs:element name="process">
<xs:complexType>
<xs:complexContent>
<xs:extension base="sys:CT_Rule"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="CT_Rule">
<xs:complexContent>
<xs:extension base="CT_Rule"/>
</xs:complexContent>
</xs:complexType>
</xs:schema>