Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Include multiple complex types into one element ...

From: "Andrew Welch" <andrew.j.welch@-----.--->
To: "Dragon Fly" <dragon-fly999@-------.--->
Date: 7/9/2008 2:39:00 PM
2008/7/9 Dragon Fly <dragon-fly999@h...>:
> Thank you both for the information.  Andrew, what is the benefit of defining
> a "simple" element globally? For example, the nameGroup can be defined as
> follows (i.e. no refs are used for the FirstName and LastName elements).
>
> <xs:group name="nameGroup">
>   <xs:sequence>
>     <xs:element name="FirstName" type="non-empty-string"/>
>     <xs:element name="LastName" type="non-empty-string"/>
>   </xs:sequence>
> </xs:group>


- the element can be reused (so LastName can be used (ref'd) in multiple places)

- the element is defined in one place (so changing the type of
LastName only needs to be done once, not everywhere that it's used)

- the types are exposed to applications, so you can match on type
define variables as that type in schema-aware XSLT or XQuery

- it follows a consistent style, and turns the upper part of your
schema into a data dictionary :)


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

From mike@s... Wed Jul 09 12:50:21 2008
Received: from [128.30.52.63] (helo=ba


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