I am having trouble with an XSLT stylesheet. When I test this, I am
getting an error of "Unable to replace tokens in string
'{$invoiceNumber}. Value for token 'invoiceNumber' not found." Can
anyone explain what i am doing wrong?

This code is in the command transform in the subscriber channel
connecting to an Oracle database (JDBC driver). I can hardcode a value
and get the called function process correctly. The issue is purely with
populating a variable into the command, which needs to come from the
source document.

<Xxml version="1.0" encoding="UTF-8"?><xsl:stylesheet
exclude-result-prefixes="query cmd dncv" version="1.0"
xmlns:cmd="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor"
xmlns:jdbc="urn:dirxml:jdbc"
xmlns:dncv="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.DNConverter"
xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- parameters passed in from the DirXML engine -->
<xslaram name="srcQueryProcessor"/>
<xslaram name="destQueryProcessor"/>
<xslaram name="srcCommandProcessor"/>
<xslaram name="destCommandProcessor"/>
<xslaram name="dnConverter"/>
<xslaram name="fromNds"/>
<!-- identity transformation template -->
<!-- in the absence of any other templates this will cause -->
<!-- the stylesheet to copy the input through unchanged to the
output -->
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<!-- BEGIN Policy Declaration -->

<!-- END Policy Declaration -->
<xsl:template match="add[@class-name='User']">
<xsl:variable name="invoiceNumber"
select="add-attr['aemInvoiceNumber']/value"/>
<xsl:variable name="lastName"
select="add-attr['Surname']/value"/>
<xsl:variable name="firstName" select="add-attr['Given
Name']/value"/>
<xsl:variable name="eMail" select="add-attr['Internet Email
Address']/value"/>
<xsl:variable name="passwd"
select="add-attr['procedurepassword']/value"/>
<jdbc:statement event-id="0">
<jdbc:call-function
jdbc:name="apps.xxar_self_reg_validation_pkg.xxar_ self_reg">
<jdbcaram>
<jdbc:value>{$invoiceNumber}</jdbc:value>
</jdbcaram>
<jdbcaram>
<jdbc:value>{$firstName)</jdbc:value>
</jdbcaram>
<jdbcaram>
<jdbc:value>($lastName)</jdbc:value>
</jdbcaram>
<jdbcaram>
<jdbc:value>($eMail)</jdbc:value>
</jdbcaram>
<jdbcaram>
<jdbc:value>($passwd)</jdbc:value>
</jdbcaram>
</jdbc:call-function>
</jdbc:statement>
</xsl:template>
</xsl:stylesheet>


--
tparker05
------------------------------------------------------------------------
tparker05's Profile: http://forums.novell.com/member.php?userid=15436
View this thread: http://forums.novell.com/showthread.php?t=325773