xsl:extension-element-prefixes

Subject: xsl:extension-element-prefixes
From: Andrew Kimball <akimball@xxxxxxxxxxxxx>
Date: Mon, 22 May 2000 13:48:00 -0700
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?

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.  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).  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).

~Andy Kimball
MSXSL Dev


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


Current Thread