This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Xalan 1.2 / <xsl:namespace-alias> / XSLT as output


Has anyone been able to use XSLT to generate a stylesheet as output using
Xalan 1.2? I've been trying to run the example in Michael Kay's book, where

XSL:
<xsl:stylesheet version="1.0"
                      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                      xmlns:out="output.xsl">

<xsl:param name="variable-name">v</xsl:param>
<xsl:param name="default-value"/>
<xsl:output indent="yes"/>

<xsl:template match="/">
   <out:stylesheet version="1.0">
   <out:variable name="{$variable-name}">
      <xsl:value-of select="$default-value"/>
   </out:variable>
   </out:stylesheet>
</xsl:template>

<xsl:namespace-alias
               stylesheet-prefix="out"
               result-prefix="xsl"/>

</xsl:stylesheet>

(XML file is present but not used)

and I get as output:
<?xml version="1.0" encoding="UTF-8"?>
<out:stylesheet version="1.0"
xmlns:out="http://www.w3.org/1999/XSL/Transform">
    <out:variable name="v"/>
</out:stylesheet>

MSXML3 gives me:
<?xml version="1.0" encoding="UTF-16"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="v"></xsl:variable>
</xsl:stylesheet>
which is closer to what I was expecting, thouhgh with a different encoding
attribute value.

I can't find this listed as a bug in Xalan - anyone have any ideas?


Antony

Antony Scott
RivCom
Tel: +44 (0)1934 835851
E-mail: antony.scott@rivcom.com
Internet: http://www.rivcom.com






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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]