This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: The use of a variable in use-attribute-sets attribute



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]