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

Re: Xpath problem

Subject: Re: Xpath problem
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Tue, 5 Mar 2002 14:00:07 +0000
objxmldom.setproperty
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


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.