G
Gordon Dickens
I have target xml to generate from schema. All of the XML instances
have the same global element i.e. <base>. I would like to combine all
of the schemas into a single schema where I could generate any of the
specific instances.
sample schema one:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeDEF" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
sample schema two:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
Can anyone suggest how to join these two into a single schema where
the instance document does not have namespace prefixed
elements/attributes?
I tried attributeGroups, groups, import and include elements, without
any luck.
Any help is appreciated.
Thanks,
Gordon
have the same global element i.e. <base>. I would like to combine all
of the schemas into a single schema where I could generate any of the
specific instances.
sample schema one:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeDEF" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
sample schema two:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="base">
<xs:complexType>
<xs:attribute name="myNodeABC" type="xs:string"/>
<xs:attribute name="myNodeXYZ" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
Can anyone suggest how to join these two into a single schema where
the instance document does not have namespace prefixed
elements/attributes?
I tried attributeGroups, groups, import and include elements, without
any luck.
Any help is appreciated.
Thanks,
Gordon