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

RE: Resolution of "ref" attribute in case of <override>

From: Michael Kay <mike@saxonica.com>
Date: Thu, 22 Oct 2009 09:08:12 +0100
To: "'Kevin Braun'" <kbraun@obj-sys.com>, <xmlschema-dev@w3.org>
Message-ID: <986D5A16056846F29A79AA35779C9F99@Sealion>
RE: Resolution of "ref" attribute in case of <override>
> 
> How will the prefix in the ref attribute in the 
> attributeGroup element be handled?  If D2' is the result of 
> applying the xs:override transform, and D2' contains an 
> element information item that is identical to the one for the 
> <attributeGroup>, I expect it will have [in-scope namespaces] 
> based on what we see above; namely, the qrs prefix will 
> necessarily resolve to "uri:example.com".  Is that correct?

Yes. In fact, this doesn't even depend on the stylesheet being schema-aware
and on @ref being known to be a QName. The element is copied using
<xsl:copy-of>, which copies all the in-scope namespaces of an element,
including therefore the namespace binding for "qrs".
> 
> Also, a second question.  I don't speak XSLT, but the 
> stylesheet given for the transformation for xs:override 
> includes a comment that says :
> 
>   <!--* change xs:override elements:  children which match 
>       * children of $overrideElement are replaced, others are
>       * kept, and at the end all children of $overrideElement
>       * not already inserted are added.
>       *-->
> 
> The "at the end all children..." clause doesn't appear to be 
> consistent with the description that precedes the stylesheet. 
>  Specifically, I don't see where a child of O1 that does not 
> correspond to a child of D2 
> would be put into D2'.   Perhaps I misunderstand the comment, 
> or perhaps 
> it isn't consistent with the XSLT that is there (again, I 
> don't speak XSLT).  Is there an inconsistency here?

I think Michael Sperberg McQueen has explained this part. It is complex and
my brain aches a little every time I look at it, but I think I have
convinced myself that it works. It would benefit, however, from some serious
testing: there is an assumption that we will produce tests before exiting
CR.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 
Received on Thursday, 22 October 2009 08:08:58 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.