[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: defining group of elemts for reference in xsd

Subject: RE: defining group of elemts for reference in xsd
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 31 Jul 2006 11:26:02 +0100
xsd reference ref
Your question is off-topic for this list. Try xmlschema-dev@xxxxxxx

But take a look at substitution groups.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Karl [mailto:call14@xxxxxxxxx] 
> Sent: 31 July 2006 11:19
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  defining group of elemts for reference in xsd
> 
> In my schema definition, I have certain element that are used 
> commonly in most of the place. 
> 
> For e.g
> 
> 	<xsd:complexType name="TitleStructure" mixed="true">
> 		<xsd:choice minOccurs="0" maxOccurs="unbounded">
> 			<xsd:element ref="sub"/>
> 			<xsd:element ref="sup"/>
> 			<xsd:element ref="u"/>
> 			<xsd:element ref="i"/>
> 			<xsd:element ref="b"/>
> 			<xsd:element ref="a"/>
> 			<xsd:element ref="smallcaps"/>
> 		</xsd:choice>
> 	</xsd:complexType>
> 
> 
> 	<xsd:complexType name="ParagraphStructure" mixed="true">
> 		<xsd:choice minOccurs="0" maxOccurs="unbounded">
> 			<xsd:element name="FootNote" 
> type="FootNoteStructure"/>
> 			<xsd:element name="AuthorComment" 
> type="xsd:string"/>
> 			...
> 			...
> 			<xsd:element name="InlineFigure" 
> type="InlineFigureStructure"/>
> 			<xsd:element ref="b"/>
> 			<xsd:element ref="i"/>
> 			<xsd:element ref="u"/>
> 			<xsd:element ref="sup"/>
> 			<xsd:element ref="sub"/>
> 			<xsd:element ref="a"/>
> 			<xsd:element ref="smallcaps"/>
> 		</xsd:choice>
> 	</xsd:complexType>
> 
> where you can see Iam refering "b", "i" etc in both 
> TitleStructure, ParagraphStructure. So, i prefer instead of 
> refering everytime these b, i, sup etc, can i put them as a 
> group under some name and ref that group
> 
> i.e something like
> 
> <suitable xsd tag>
> 	<xsd:element ref="b"/>
> 	<xsd:element ref="i"/>
> 	...
> 	<xsd:element ref="smallcaps"/>
> </suitable xsl tag>
> 
> and then refering this in
> 	<xsd:complexType name="TitleStructure" mixed="true">
> 		<xsd:choice minOccurs="0" maxOccurs="unbounded">
> 			<refering that pre-defined tag/> -- THIS WAY
> 		</xsd:choice>
> 	</xsd:complexType>
> 
> I did look for similar thing in xsd, but could not find a 
> answer. But i believe there is an xsd answer. Anyone can you 
> pls suggest the pretty way.
> 
> Thanks
> karl
> 
> 
> 
> 		
> ___________________________________________________________
> Try the all-new Yahoo! Mail. "The New Version is radically 
> easier to use" - The Wall Street Journal 
> http://uk.docs.yahoo.com/nowyoucan.html

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
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-2013 All Rights Reserved.