Solved

how to use like operater in xslt keeping processing as concern

Posted on 2011-02-21
3
770 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
Comment Utility
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
Comment Utility
ok then I am using contain and xslt choose this would require less processing.
thanks
0
 
LVL 60

Expert Comment

by:Geert Bormans
Comment Utility
welcome
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now