This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: The use of a variable in use-attribute-sets attribute
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] The use of a variable in use-attribute-sets attribute
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Tue, 15 May 2001 10:48:55 +0100
- References: <20010515072605.75024.qmail@web12608.mail.yahoo.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
I take it that every xsl element can have an attribute that starts
with xmlns. Admittedly this isn't seen on most xsl elements. What
does it mean when it occurs on say an xsl:if element?
<xsl:if test="position()=last()" xmlns:ns="http://www.foo.org/">
</xsl:if>
It's best to think of xmlns.. as _not_ being an attribute but being a
namespace declaration that is handled by the namespace aware XML parser
_before_ the XSLT engine starts.
So.. that "attribiute" isn't on xsl:if and doesn't affect the way the
XSLT engine treats that instruction but it does, as a consequence of the
XML namespace spec, declare that any XML Names starting ns: occuring on
elements within that xsl:if element refer to the foo.org namespace.
So this would affect literal result elements and attributes and also
Names used in xsl:element etc.
David
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list