Defining Groups of Elements and Attributes in XML Schemas

The XML Schema Recommendation allows you to specify groups of elements and groups of attributes. Here is an example of an element group, purchaseType:

 <xsd:group name="purchaseType">
               
     <xsd:choice>
               
         <xsd:element name="retail"/>
               
         <xsd:element name="internet"/>
               
         <xsd:element name="mailOrder"/>
               
     </xsd:choice>
               
 </xsd:group>
               

            

Specification of a group makes it easier to update the schema. You only need to update the group definition. There is no need to change the references to the group.

Here is an example of an attributeGroup, deliveryDetail.

 <xsd:attributeGroup name="deliveryDetail">
               
     <xsd:attribute name="method"/>
               
     <xsd:attribute name="vendor"/>
               
     <xsd:attribute name="dateShipped"/>
               
     <xsd:attribute name="dateArrived"/>
               
 </xsd:attributeGroup>
               

            

This section discusses the following topics:

Introduction to the XQuery Mapper

This free online video demonstration covers Stylus Studio's synchronized XQuery editing and mapping tool which allows you to create any XQuery expression, either manually using Stylus Studio's XQuery editor.

HTML Tidy

HTML Tidy is a program for turning HTML into something that can be parsed as XML, unlocking their data for use in XSLT and XQuery programs. Learn how to use HTML Tidy in Stylus Studio now.

EXSLT Tools

EXSLT support in Stylus Studio lets you extend XSLT 1.0 stylesheets and simplify many tasks including computing dates and times, performing mathematical computations, string manipulations and more.

ETL - Extract, Transform, Load

Designing Extract, Load and Tranform (ETL) applications including ETL data warehousing, etl design and etl programming is easy with Stylus Studio's XML and ETL Tools. Start ETL Programming today.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.