• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 783
  • Last Modified:

how to use like operater in xslt keeping processing as concern

I have to compare a variable with string values.
I can use the following but wondering if XSLT has an operator 'like' or eqivalent which compare variable with different string.

  <xsl:if test="contains($curAttribute,'string1') or contains($curAttribute,'string1')">
do some job
</xsl:if>

My actual concern is to make the instruction less process consuming.
0
SANbuddies
Asked:
SANbuddies
  • 2
1 Solution
 
Geert BormansCommented:
XSLT has no equivalent function to 'like'
contains() is about the best option you have

If you would be using XSLT2, there is regular expressions,
that could be helpful in a sense
0
 
SANbuddiesAuthor Commented:
ok then I am using contain and xslt choose this would require less processing.
thanks
0
 
Geert BormansCommented:
welcome
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now