Subject: Re: [xsl] Xpath problem From: "Kanthi Damodaran" <kdsm17@xxxxxxxxxxx> Date: Wed, 06 Mar 2002 13:06:12 +0000 |
objCachedDOM .setProperty("SelectionLanguage", "XPath") objCachedDOM .selectSingleNode("//Outer[value = '2111']")
Thanks Kan
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: "Kanthi Damodaran" <kdsm17@xxxxxxxxxxx> CC: xsl-list@xxxxxxxxxxxxxxxxxxxxxx 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.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Xpath problem, Michael Kay | Thread | Re: [xsl] Xpath problem, Jeni Tennison |
[xsl] How to display more complicat, shenjun | Date | [xsl] apply templates to the nth re, Lea Allison |
Month |