xsl-list
[Top] [All Lists]

Comparing Node Text Content with a String Set

2003-10-27 22:41:08
Hello all,

Yes I am an XSLT newbie, but I have searched
everywhere for an answer to this seemingly simple
problem with no success.

I am trying to work out a way to encapsulate comparing
a node's text with a string set for a possible match.

ie.. instead of having the following <if test> syntax
all through my multiple xslt files:

<xsl:if test="ACCTTYPE = 'AAA' or
              ACCTTYPE = 'BBB' or
              ACCTTYPE = 'CCC' or
              ACCTTYPE = 'DDD' or
              ACCTTYPE = 'EEE'">
                
I am curious if there is a way to define this once in
a common xslt file which is then imported into my many
xslt files, so if new types are added or removed, it
only has to be changed once?

Thanks!

Matt


http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list