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.