Solved

how to use like operater in xslt keeping processing as concern

Posted on 2011-02-21
3
775 Views
Last Modified: 2012-05-11
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
Comment
Question by:SANbuddies
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 50 total points
ID: 34942323
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
 

Author Comment

by:SANbuddies
ID: 34943096
ok then I am using contain and xslt choose this would require less processing.
thanks
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 34943099
welcome
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question