BizTalk Utilities CV ,   Jobs ,   Code library
 
Home Page


Add/Edit your code items
Search the code library
Browse for the code library


XSLT
Cross Reference Lookup in XSLT using embedded XML
XTrans 1.0
XML Explorer 2.5
Create an N-Column Table from XML node-set
XSLT Select Option Example
XSLT Date filtering, sorting, comparing, and evaluating
XSLT Template for HTML INPUT Tag
XSLT Template for HTML IMG Tag
XSLT Search and Replace Template
Word wrap and text replace templates for XSLT
nxslt 1.3
Visual XPath
xframe - xsddoc
-xsl-fo-->-pdf--making-an-e-book/documentation.aspx>BIBLE PDF from (xml & xsl)-> xsl-fo -> pdf ; Making an E-book/documentation
Sum(round(.))
DISTINCT list of attributes using XPATH only
How to add a XSL information to the XML file with the XmlTextWriter?
How to update an XML file with XmlDocument?
How to select specific nodes in XmlDocument()?
How to use GetElementsByTagName in XmlDocument?


 
 

<< XQuery.NET and XML >>


By John Workman
First Posted 06/04/2003
Times viewed 950

Variable Variables


Summary This simple example shows how to set a variable value based on a condition.

This is one thing that I've seen many programmers struggle with. Your instincts tell you to say: If (x=y) then variable='a' else variable='b' of course, this doesn't work in XSL. To set a variable based on a condition, first you define the variable and then you set the value based on the condition.

Additional information


Rate this article on a scale of 1 to 10 (0 votes, average 0)

Your vote :  

<< XQuery.NET and XML >>





Leave a comment for this article
Your name
Your email (optional)
Your comment
Optional: Upload an attachment
Enter the code shown:

 
 

    Email TopXML