473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

xslt :how to check whether the value of a string variable is Yes or No?

how to check whether the value of a string variable is Yes or No?
Expand|Select|Wrap|Line Numbers
  1. xsl;variable name="test1" select="DBE:OBJECT/DBE:ATTRIBUTE[@name='test1']/DBE:String"/>
  2. xsl;variable name="test2" select="DBE:OBJECT/DBE:ATTRIBUTE[@name='test2']/DBE:String"/>
  3.  
  4. xsl;choose>
  5. xsl;when test="$test1 = 'Yes'>
  6.     xsl;apply-templates select="YES"/>
  7. /xsl;when>
  8. xsl;when test="$test2 = 'Yes'>
  9.     xsl;apply-templates select="Invalid"/>
  10. /xsl:when>
  11. xsl;otherwise>
  12.      xsl;apply-templates select="DBE:OBJECT/DBE:ATTRIBUTE[@name='test3']/DBE:String"/>
  13. /xsl;otherwise>
  14. /xsl;choose>
  15.  
Please let me know what is wrong in the above?
Oct 31 '09 #1
0 1619

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: inquirydog | last post by:
Hi- Does anyone know a way to compare whether two nodes contain the same information in xslt (the name, attributes, and all content recursivly should be the same. I am interested in the case...
4
by: David Blickstein | last post by:
I have an application where I have a shared "method" of selecting a nodeset. The method currently is duplicated everywhere it is needed but I'd like that code to be shared. The method also...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
2
by: Sharkie | last post by:
I'm relatively new to XSLT, having strong background in bunch of other programming languages (Perl, Java, etc.). I'm writing an XSLT stylesheet, converting XML into HTML. Everything works just...
10
by: Bilal | last post by:
Hello, I'm trying to perform some string manipulations in my stylesheet and have gotten stuck on the issue below so hopefully can elicit some useful hints. Namely, the problem is that I need to...
2
by: 张韡武 | last post by:
We have preffered language set as variable in xslt: <xsl:variable name="preferred_language"> zh </xsl:variable> Data: <name xml:lang="de">Raw Materials (Mining incl.)</name> <name...
1
by: balderdash | last post by:
Hi I am very close to achieving the output I need but I cant seem to get it right. The problem is I am looping through a table and selecting values, if there are 2 values per (row) Issuer I...
2
by: rajan sood | last post by:
Hi How can i get the single node value if i have node value is in multiple nodes under parent node. I need <START_DATE> in output ..what code should i need to write in XSL so that below XML...
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.