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]
Other format: [Raw text]

Cant see params passed to the xsl sheet


I'm using the Xalan 2.3.1 processor and can't see the parameters I've passed
to it using when using <xml:param>and <xml:value-of>.  Anyone ever had a
similar problem? I've tried passing parameters programatically with
Transformer.setParam() and running org.apache.xalan.xslt.Process from the
command line and passing them in there with the -PARAM option.  Niether
seems to work so I suspect my stylesheet is incorrect.  Here it is:

<?xml version="1.0"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="1.0"
    xmlns:java="http://xml.apache.org/xslt/java";
    xmlns:xalan="org.apache.xalan.lib.Redirect"
    extension-element-prefixes="xalan"
    exclude-result-prefixes="java">

<xsl:param name="tablename" select="none"/>
<xsl:param name="package" select="none"/>

<xsl:output method = "text"/>

<!-- Collect parameters that have been passed to us -->
<xsl:template match="app-data">
    <!-- Dump the settings for this stylesheet -->
    in app-data
    my table name is: <value-of select="$tablename"/>
    <xsl:apply-templates select="database"/>
</xsl:template>

<xsl:template match="database">
    in database
    my table name is: <value-of select="$tablename"/>
</xsl:template>
</xsl:stylesheet>


Thanks in advance.




 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]