[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Problems with usage of certain characters in compa

Subject: RE: Problems with usage of certain characters in comparison expressions in XPath
From: Bagchi Ratul <bratul@xxxxxxxx>
Date: Tue, 26 Mar 2002 11:28:12 +0100
ratul
Hi,
Actually even after making those corrections I was getting the problem. But
then I could resolve it. I had to escape the "\" with "\\" and it worked
just fine. 
Regards,
Ratul. 

-----Original Message-----
From: Jarno.Elovirta@xxxxxxxxx [mailto:Jarno.Elovirta@xxxxxxxxx]
Sent: Tuesday, March 26, 2002 2:54 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Problems with usage of certain characters in
comparison expressions in XPath


Hi,

> <function name="x">
> <CalledIn>
> 	<Page name="a\b\c\d">
> 	<occurence>
> 	<LineNo>177</LineNo>
> 	<Text>call x()</Text>
> 	</occurence>
> 	<occurence>
> 	<LineNo>194</LineNo>
> 	<Text>call y :call x()</Text>
> 	</occurence>
> 	<occurence>
> 	<LineNo>210</LineNo>
> 	<Text>call x()</Text>
> 	</occurence>
> 	<occurence>
> 	<LineNo>229</LineNo>
> 	<Text>call x()</Text>
> 	</occurence>
> 	</Page>
> </CalledIn>
> </Function>
> 
> I have a XPath Query which goes like :
> "//Function[name='x']/CalledIn/Page[@name='a/b/c/d']"

In your example source you have "function" start tag and "Function" end tag
- which one should it be? Anyhow, this should be

  //Function[@name='x']/CalledIn/Page[@name='a\b\c\d']

> which should return the specified nodes, but it doesnt do 
> that.Also when I
> say
> "//Function[name='x']/CalledIn/Page[@name!='']"
> it returns these nodes. I think the problem is with using the 
> character "\"

In your source you have '\' and in your XPath statement '/'.

Santtu

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.