Hello.
I'm attempting to determine if a node exists on a sibling to an ancestor of
the current node. In the following "tree" payerid is the current node being
processed and I need to determine if the reject node exists. What's a good
way to do this?
Log
|
transaction
|
---------------------
| |
origreq response
| |
eliginq eligresp
| |
payerid subscribe
|
reject
The path (ancestor::transaction)/response/eligresp/subscribe/reject works to
find the node, and I thought using
<xsl:choose>
<xsl:when test="(ancestor::transaction)/response/eligresp/subscribe/rejct" >
/* call template recursively to update count */
</xsl:when>
<xsl:otherwise>
/* output total minus count */
</xsl:otherwise>
</xsl:choose>
would be the best way to handle things. Unfortunately, the otherwise path is
always taken. I need to move through the entire node-set selected by the
template before it gets to the otherwise clause. Would a for-each loop be a
better way to do this? Do I need to create another template with the same
node-set that doesn't output anything but does update the counter?
Any suggestions, guidance would be appreciated.
Thanks,
Erika Marlow
-
------------ Gateway EDI, Inc.
---------------------------------------------------------------------------------------------------
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed. If
you are not the intended addressee, or the person responsible for delivering it
to them, you may not copy, forward, disclose or otherwise use it or any part of
it in any way. To do so may be unlawful. If you receive this email by
mistake, please advise the sender immediately and destroy all copies of the
original message.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list