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

Re: Both extending and restricting with <redefine>

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Mon, 04 Apr 2005 16:43:35 +0100
To: "Hirtle, David" <David.Hirtle@nrc-cnrc.gc.ca>
Cc: xmlschema-dev@w3.org
Message-ID: <f5bll7ywnrs.fsf@erasmus.inf.ed.ac.uk>
Re: Both extending and restricting with <redefine>

"Hirtle, David" <David.Hirtle@nrc-cnrc.gc.ca> writes:

> When I sent my original message to the list, the file b.xsd only used one
> <redefine>:
>
> 	<xs:redefine schemaLocation="a.xsd">
> 		<!-- add y to body -->
> 		<xs:group name="body.content">
> 			<xs:choice>
> 				<xs:group ref="body.content"/>
> 				<xs:element ref="y"/>				
> 			</xs:choice>
> 		</xs:group>	
>
> 		<!-- remove x from body by restriction --> 	
> 		<xs:group name="body.content">
> 			<xs:choice>
> 				<xs:element ref="y"/>
> 			</xs:choice>
> 		</xs:group>
> 	</xs:redefine>
>
> I created new files f.xsd, g.xsd (at http://www.ruleml.org/0.89/xsd) for this
> original example.  Note that with this one <redefine>, XSV crashes:
> http://www.w3.org/2001/03/webdata/xsv?docAddrs=http%3A%2F%2Fwww.ruleml.org%2F0.89%2Fexa%2Ffg.ruleml&style=xsl#

Hmph!  Infinite loop :-( 

>> The 'correct' way to do this is with _three_ files.
>
> Unfortunately XSV doesn't seem to like the three file way either:

None-the-less I think it's the only correct way.

Is redefining things really the logically correct way to think about
the underlying requirement?

ht
-- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Monday, 4 April 2005 15:43:40 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

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-2007 All Rights Reserved.