Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Schema Design for common global element

From: gdickens@-----.--- (------ -------)
To: NULL
Date: 8/3/2004 7:41:00 PM
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


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent