xml editor

   XML Editor
   XML Author
      DITA Editor
      DocBook Editor
      TEI Editor
      XHTML Editor
      Schema Editor
      XML Schema Editor
      RelaxNG Editor
   XQuery
   SVN Client
      Office Open XML
      XSL:FO Editor
      SVG Editor
      WSDL Editor
Supported platforms
Compatible with Windows7 & Mac OS X Snow Leopard
Ready for
data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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


Subject: Re: [xsl] 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

> 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
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2009 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>® XML Editor