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

Re: xsl:extension-element-prefixes

Subject: Re: xsl:extension-element-prefixes
From: James Clark <jjc@xxxxxxxxxx>
Date: Tue, 23 May 2000 08:03:24 +0700
extension element prefixes

Andrew Kimball wrote:
> 
> James, Mike,
> 
> Thanks for your helpful spec interpretations thus far.  I've now found
> myself a new puzzler.  Given the following stylesheet:
> 
> <xsl:stylesheet xsl:version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>         <xsl:template match="/">
>                 <foo:x xsl:extension-element-prefixes="foo"
> xmlns:foo="http://my.com"/>
>         </xsl:template>
> </xsl:stylesheet>
> 
> 1. Should foo:x be interpreted as an extension element or as a literal
> result element?

An extension element.

> The spec says:
> "The designation of a namespace as an extension namespace is effective
> within the subtree of the stylesheet rooted at the element bearing the
> extension-element-prefixes or xsl:extension-element-prefixes attribute"
> 
> If I interpret "within the subtree" as not including the subtree root, then
> foo:x would be a literal result element.  There are no particular technical
> problems with this interpretation (however, it does seem inconvenient from a
> user point of view).
> 
> However, if "within the subtree" includes the subtree root, then foo:x must
> be extension element. 

When the spec says "within the subtree rooted at a node x", then the
root of the subtree is x, and hence the subtree includes x.

> But if foo:x is an extension element, then I should
> not consult the xsl:extension-element-prefixes attribute (since it's only
> effective if used on literal result elements).

14.1: "A namespace is designated as an extension namespace by using ...
an xsl:extension-element-prefixes attribute on a literal result element
***or extension element***"

>  But if I never consult the
> xsl:extension-element-prefixes attribute, then foo:x cannot be an extension
> element.  This interpretation therefore leads to a circular definition.


> 2. How about "xsl:exclude-result-prefixes"?  Does this take effect
> immediately on the literal result element upon which it is defined, or only
> for descendants?  Once again, the spec only says "within the subtree"
> (section 7.1.1).

As before, a subtree includes its root.

James


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.