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

RE: Using position predicate in XPath string within s

Subject: RE: Using position predicate in XPath string within selectSingleNode DOM method
From: "Matthieu Ricaud" <matthieu.ricaud@xxxxxxx>
Date: Thu, 25 Nov 2004 15:22:50 +0100
Last post on this subject which may not interrest everybody on the list
since it's not a pure xsl problem but more DOM and manipulation of XML

So I've learnt the reason why Xpath expression is not always understood
within selectSingleNode DOM Method.
Just because, despite the msdn spec I found
l/xmmthselectsinglenode.asp) describing this method, the language supported
is not Xpath by default, but rather a strange "XSLPattern" (the default
language obviously depends on the parser progID).

To be sure Xpath querys are understood, we must specifie it :

ObjXML.setProperty "SelectionLanguage", "XPath"

That's all

subject closed !


-----Message d'origine-----
De : Matthieu Ricaud [mailto:matthieu.ricaud@xxxxxxx]
Envoyi : jeudi 25 novembre 2004 10:54
@ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet : RE:  Using position predicate in XPath string within
selectSingleNode DOM method

Hi Pieter,

Thanks a lot for your proposition of finding a solution together to my

At the moment I was going to tell you what ITEM[1] return, I noticed it
returns the SECOND <ITEM> node and not the FIRST !

And actually this is the solution of my problem !

With SelectSingleNode Method the Xpath position indice starts at 0 and not 1
like in XSL's Xpath query.

That means for example  :


select the same node as :

<xsl:for-each select="/FORMATION[1]/EPREUVES[1]/EPREUVEAOPT[2]/OPTION[1]">

Everything's ok now ! exept that I'm really angry with Microsoft which did
not specify this in the msdn !

But anyway, that's great !!

thanks all for helping !


Current Thread


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.
First Name
Last Name
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.