Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 31st, 2007, 01:38 AM
Authorized User
 
Join Date: Jan 2006
Posts: 59
Thanks: 0
Thanked 0 Times in 0 Posts
Default or condition

hello

I am trying to write a condition of if with multiple restrictions that divided by 'or' (if one of the condition apply, enter the condition. I wanted to know what if there is a right way to write it, and what it is?

<xsl:if test = "$class = $instance_column_name | $server_column_name | concat($instance_column_name, '_grouping') | concat($server_column_name, '_grouping')">
    <xsl:attribute name="ca-key">
        <xsl:value-of select= "$class"/>
    </xsl:attribute>
</xsl:if>

Thanks
Kfir


 
Old July 31st, 2007, 03:44 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

The "or" operator in XPath is written "or", as in SQL and English. The "|" operator forms the union of two node-sets.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
where condition...? mnr555 Crystal Reports 0 June 18th, 2006 05:32 PM
Please check my where condition mat41 SQL Language 4 May 26th, 2006 08:52 AM
if then else condition mateenmohd Classic ASP Basics 0 April 16th, 2005 07:08 AM
Condition mateenmohd SQL Server 2000 6 May 6th, 2004 03:49 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.