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 Chris Saint-Amant <ch...@st-amant.net> on 2002/04/03 05:02:29 UTC
Params at command line
Hi,
I'm having a problem passing parameters to a stylesheet using the Xalan
command line app.
When I call: ./Xalan -p id foo portfolio.xml test.xsl
...the param "id" never gets passed to the stylesheet. I've also tried
things like -p id 'foo' or -p id "foo" but nothing seems to work.
I've been testing using the following XSL:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:param name="id">default</xsl:param>
<xsl:template match="/">
ID: <xsl:value-of select="$id" />
</xsl:template>
</xsl:stylesheet>
When I don't pass any parameter to the command line, it echoes "ID:
default", but when I _do_ pass the parameter, it just echoes "ID: ".
Anyone else experience this? I am using Xalan build 1.2.
-Chris Saint-Amant <ch...@st-amant.net>