xml.XSLTtransformer.getParameter
Get the value of a given parameter in an instance of an
XSLTTransformer
corresponding to the XSLT entry named by
param
.
Syntax
xml.XSLTtransformer.getParameter(
param STRING)
RETURNS STRING
- param defines the name of the parameter.
Usage
Get parameters corresponding to the XSLT entries named by param
.
For example, this XSLT sample contains two
param
definitions:<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:param name="QADIR" />
<xsl:param name="NODE_NAME"/>
...
<MyNode><xsl:value-of select="$QADIR" /></MyNode>
...
<xsl:when test="name()=$NODE_NAME">
<xsl:copy>
<xsl:copy-of select="@*"/>
</xsl:copy>
</xsl:when>
</xsl:stylesheet>
To get the parameter
QADIR
:DEFINE dir STRING
SET dir=xslt.getParameter("QADIR")
In case of error, the method throws an exception and sets the
STATUS
variable. Depending on the error, a human-readable description of the
problem is available in the SQLCA.SQLERRM
register. See Error handling in GWS calls (STATUS).
To see these methods in a working example, see Example: Using xml.XSLTtransformer methods.