This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Problems with usage of certain characters in comparison expressions in XPath
- From: Jarno dot Elovirta at nokia dot com
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 26 Mar 2002 11:24:26 +0200
- Subject: RE: [xsl] Problems with usage of certain characters in comparison expressions in XPath
- Reply-to: xsl-list at lists dot mulberrytech dot com
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