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 May 5th, 2006, 12:16 AM
Authorized User
Join Date: May 2006
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multiple conditions

hi i have a code written like this

 <xsl:when test="$lastNode 'true' AND $lastNode2 = 'true'">
but here i am getting invalid XPath expression.

I would like to check for multiple conditions

Thanks in advance
Old May 5th, 2006, 02:38 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

You will need an "=" sign in the first condition $lastNode = 'true', and you will need to spell "AND" as "and". XPath, like XML, is case-sensitive.

There are plenty of places where you can find information on XPath syntax, for example http://www.w3schools.com/xpath/default.asp. This kind of question really doesn't justify a forum message, unless there was something specific in one of the reference sources that gave you problems.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
using multiple conditions in sql loader elygp Oracle 0 October 9th, 2008 10:21 PM
SQL LIKE Multiple Conditions takwirira ASP.NET 2.0 Basics 1 April 16th, 2008 06:24 AM
IIf Function - Multiple conditions carrie09 Access 2 June 13th, 2007 10:27 AM
Multiple conditions austinf XSLT 1 May 5th, 2006 02:55 AM
Multiple db fields each with different conditions? sfinc Crystal Reports 1 February 27th, 2004 09:46 PM

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