Re: [xsl] Namespace Aliasing without xsl:namespace-alias

Subject: Re: [xsl] Namespace Aliasing without xsl:namespace-alias
From: mazerunner@xxxxxx
Date: Tue, 24 Jan 2006 21:23:47 +0100 (MET)
Hi David,

>the behaviour you describe doesn't fit with the way XSLT works, so most
>likely the results you are seeing are from some other part of your
>stylesheet. Can you post a small example of a complete 5 or six line
>document and a similar sized stylesheet that shows the effect, and say
>what result you wanted.

"exclude-result-prefixes" works fine - as Mike Haarman suggested. Thanks!

What is wrong with it? Here an example: I want to transform <root
xmlns="urn">text</root> to <b>text</b>. I can do it with following
stylesheet:

<xsl:stylesheet version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:B="urn"
  exclude-result-prefixes="B">
  <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
    <xsl:template match="*">
      <b>
        <xsl:value-of select="text()"/>
      </b>   
      <xsl:apply-templates select="*"/>
    </xsl:template>
</xsl:stylesheet>

If I don't exclude the namespace I will get following result:
<b xmlns:B="urn">text</b> .

Best regards
Tobias

Current Thread