Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Using xsl:namespace-alias for XSL generation in Saxon 6.5.3

From: "George Cristian Bina" <george@------->
To:
Date: 8/2/2004 11:10:00 PM
> What Saxon 6.5.3 produces:
>
>   <?xml version="1.0" encoding="utf-8"?>
>   <emit:stylesheet xmlns:emit="http://www.w3.org/1999/XSL/Transform"
>                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                    version="1.0">
>      <emit:output method="xml" indent="yes"/>
>      <emit:template match="/">
>         <foo/>
>      </emit:template>
>   </emit:stylesheet>

If you take this and put it in a document you will see that it is a valid
XSLT document.
The important thing is not the prefix but the namespace the prefix is mapped
to.
Note that Xalan 2.5.1 gives you the same result.

If you like to get the output with xsl as prefix then write your stylesheet
using a different prefix, xslt for instance, and use xsl for the output:

<xslt:stylesheet version="1.0"
xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:xsl="map_to_xsl">
  <xslt:output method="xml" indent="yes"/>
  <xslt:namespace-alias stylesheet-prefix="xsl" result-prefix="xslt"/>
  <xslt:template match="/">
    <xsl:stylesheet version="1.0">
      <xsl:output method="xml" indent="yes"/>
      <xsl:template match="/">
        <foo/>
      </xsl:template>
    </xsl:stylesheet>
  </xslt:template>
</xslt:stylesheet>

Best Regards,
George
-------------------------------------------------------
George Cristian Bina mailto:george@xxxxxxxxxxxxx
<oXygen/> XML Editor and XSLT Editor/Debugger
www.---.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent