This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: ***********Transformation of an XML document containing a default namespace ************
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] ***********Transformation of an XML document containing a default namespace ************
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Wed, 24 Oct 2001 10:00:04 +0100
- References: <MBEJIKPPBPOEEAFBBABKCEBICAAA.florence.amardeilh@e-xmlmedia.fr>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> Is it true or false ?
False. It is also a FAQ. (That's why we have FAQ lists...)
XSLT hardly ever cares what form namespaces in teh source take (ie what
prefix they have or if they don't have a prefix at all). But it always
cares about which namespace an element s=is in.
<element xmlns="http://www.e-xmlmedia.com/test/">
so that is an element with local name "element" in the test namespace.
<xsl:template match="/element">
that matches an element with local name "element" in the null namespace
so doesn't match your element.
You want
<xsl:template match="/t:element">
and
<xsl:stylesheet version="1.0" xmlns:t="http://www.e-xmlmedia.com/test/"
XPath's (like attribute names) do not use the default attribute setting
in the stylesheet.
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 or alternatively call
Star Internet for details on the Virus Scanning Service.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list