RE: [xsl] With Saxon7.2, can an aliased namespace prefix be excludedfrom the output?

Subject: RE: [xsl] With Saxon7.2, can an aliased namespace prefix be excludedfrom the output?
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Thu, 14 Nov 2002 19:46:24 -0000
Saxon's output when you use xsl:namespace-alias is inelegant but the
stylesheet that it produces is precisely equivalent to the one that you
want.

It will be improved in the next version.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Timothy Larson
> Sent: 14 November 2002 18:28
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] With Saxon7.2, can an aliased namespace prefix 
> be excludedfrom the output?
> 
> 
> With Saxon version 7.2, I am trying to apply a stylesheet to 
> a stylesheet. Is there any way to exclude the aliased 
> namespace prefix from the output?
> 
> In the sample below I am trying to get rid of the output line:
>   xmlns:x="http://www.w3.org/1999/XSL/Transform"; 
> 
> Sample source stylesheet:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="2.0"
>   xmlns:xsl  = "http://www.w3.org/1999/XSL/Transform";>
> </xsl:stylesheet>
> 
> Sample stylesheet to apply to the source stylesheet:
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="2.0"
>   xmlns:xsl  = "http://www.w3.org/1999/XSL/Transform";
>   xmlns:x    = "http://www.w3.org/1999/XSL/TransformAlias";
>   exclude-result-prefixes="x">
>   <xsl:namespace-alias stylesheet-prefix="x" result-prefix="xsl"/>
>   <xsl:template match="/">
>     <xsl:copy>
>       <x:stylesheet>
>         <x:template m="/"><x:value-of select="test"/></x:template>
>       </x:stylesheet>
>     </xsl:copy>
>   </xsl:template>
> </xsl:stylesheet>
> 
> Output produced:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
>   xmlns:x="http://www.w3.org/1999/XSL/Transform"; 
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   <xsl:template m="/"><xsl:value-of 
> select="test"/></xsl:template> </xsl:stylesheet>
> 
> Output disired:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   <xsl:template m="/"><xsl:value-of 
> select="test"/></xsl:template> </xsl:stylesheet>
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


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


Current Thread