[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Using xsl:namespace-alias for XSL generation in Sa

Subject: Re: Using xsl:namespace-alias for XSL generation in Saxon 6.5.3
From: "George Cristian Bina" <george@xxxxxxx>
Date: Tue, 3 Aug 2004 02:07:28 +0300
xslt namespace alias
> 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
http://www.oxygenxml.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.