Solved

how to use like operater in xslt keeping processing as concern

Posted on 2011-02-21
3
777 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

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

820 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