Solved

how to use like operater in xslt keeping processing as concern

Posted on 2011-02-21
3
780 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

688 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