I agree, C was a typo, I meant CCC
But I do believe I'm leaving out some important point, but I don't know what it is.
I distilled the XML/XSLT down to something I could easily post, in reality there is more going on. Namepsaces, for example. I have to contend with a few namespaces when I'm doing the transformation. When I create $myData, it is in a namespace: xmlns="http://software/nmitl1", so when I define myTemplate, I give it xpath-default-namespace="http://software/nmitl1". That alone caused me much grief until I remembered I had to deal with the namespace issue.
The call to myTemplate actually happens inside another template
Code:
<xsl:template name="myOtherTemplate" xpath-default-namepsace="http://software/nmitl1">
<xsl:param name="myData"/>
<xsl:if test="exists($myData//BBB)">
<xsl:call-template name="myTemplate">
<xsl:with-param name="myData" select="$myData"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
I didn't think this was important since it essentially just passes myData through to myTemplate. Eventually, more processing will go on in this template.
The way I set the values for CCC and DDD are also a bit convoluted.
I have to follow a cross reference to other parts of the input document to find the values for CCC and DDD. These are stored in a temporary result and xpath'd out later to fill in CCC and DDD using something like
Code:
<xsl:variable name="myData">
<AAA>ABC<BBB>
<CCC><xsl:value-of select="$tmpData//tmpCCC"/></CCC>
<DDD><xsl:value-of select="$tmpData//tmpDDD"/></DDD>
</BBB>XYZ</AAA>
When I call to myOtherTemplate, I do it in a variable as I am wanting to capture the output in a temporary result for later use.
Code:
<xsl:variable name="myResult">
<RESULT>
<xsl:call-template name="myOtherTemplate">
<xsl:with-param name="myData" select="$myData"/>
</call-template>
</RESULT>
</xsl:variable>
I wasn't trying to leave important stuff out, I was just trying to distill the problem down to, what I thought was, a minimal series of events.
Thanks again!