You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by ol...@invensys.com on 2003/02/20 05:08:23 UTC
Passing parameters to Xalan
Hi folks,
I have the following stylesheet:
===================== test.xsl =========================
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="test"/>
<xsl:output method="html"/>
<xsl:template match="/">
<html><head></head>
<body>
<h1><xsl:value-of select="$test"/></h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
========================================================
And I am translating a document with the following contents:
===================== test.xml =========================
<?xml version="1.0" encoding="UTF-8"?>
<XLDL/>
========================================================
With the command line:
Xalan -p test test test.xml test.xsl
The resulting output does not contain the string 'test' between <h1> and
</h1>
What am I doing wrong?
==============================
Oliver White
Software Engineer
Product Development
Westinghouse Signals Australia
==============================
Re: Passing parameters to Xalan
Posted by Juergen Hermann <jh...@web.de>.
> Xalan -p test test test.xml test.xsl
Try
Xalan -p test "'test'" test.xml test.xsl
Ciao, Jürgen