This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Xalan 1.2 / <xsl:namespace-alias> / XSLT as output
- To: <xsl-list at mulberrytech dot com>
- Subject: RE: Xalan 1.2 / <xsl:namespace-alias> / XSLT as output
- From: "Evan Lenz" <elenz at xyzfind dot com>
- Date: Mon, 25 Sep 2000 16:50:17 -0400 (EST)
- Reply-To: xsl-list at mulberrytech dot com
How are you assigning a value to the "default-value" parameter? Because you
don't specify a default value for it in the stylesheet. That would explain
why you're getting an empty xsl:variable in the output.
Try this and run it again:
<xsl:param name="default-value" select="'anything'"/>
Evan Lenz
elenz@xyzfind.com
http://www.xyzfind.com
XYZFind, the search engine *designed* for XML
Download our free beta software: http://www.xyzfind.com/beta
-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Antony Scott
Sent: Monday, September 25, 2000 10:47 AM
To: XSL-List@mulberrytech.com
Subject: 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
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list