This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Xpath problem
- From: "Kanthi Damodaran" <kdsm17 at hotmail dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 06 Mar 2002 13:06:12 +0000
- Subject: Re: [xsl] Xpath problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Jeni -
Thanks for the input, I think its very likely that this could be the
problem. But I tried what you suggested and couldn't get it to work. I am
using a cached DOM and calling it thus
Set objCachedDOM = Application("CachedXMLDOM").cloneNode(true)
And I assume this should still work if I did the following : -
objCachedDOM .setProperty("SelectionLanguage", "XPath")
objCachedDOM .selectSingleNode("//Outer[value = '2111']")
But somehow I see no change in the results ...
Thanks
Kan
>From: Jeni Tennison <jeni@jenitennison.com>
>Reply-To: xsl-list@lists.mulberrytech.com
>To: "Kanthi Damodaran" <kdsm17@hotmail.com>
>CC: xsl-list@lists.mulberrytech.com
>Subject: Re: [xsl] Xpath problem
>Date: Tue, 5 Mar 2002 14:00:07 +0000
>
>Hi Kan,
>
> > I want to get at the node where the value element is 2111.
> > ie //Outer[value='2111']
> >
> > But the problem is that it goes to the node that matches just the
> > first four digits if it exists in the DOM ... so it goes to the node
> > where value = 21110. So I am not able to specify that it should go
> > to the first node that exactly matches 2111.
>
>In XPath, the path that you've specified should only select the Outer
>elements whose value element children exactly match '2111'.
>
>I suspect, therefore, that you're using Microsoft's "XSL Pattern"
>syntax, which looks a lot like XPath but isn't. Try using the
>setProperty() method on the DOMDocument object to state that when
>you use selectSingleNode(), you are doing so using XPath rather than
>an XSL Pattern:
>
> objXMLDOM.setProperty("SelectionLanguage", "XPath");
> objXMLDOM.selectSingleNode("//Outer[value = '2111']");
>
>Cheers,
>
>Jeni
>
>---
>Jeni Tennison
>http://www.jenitennison.com/
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list