[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 selectS ingleNode DOM method
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Thu, 25 Nov 2004 09:13:49 -0600
xsl xpath position
Thanx for the pointer, Matthieu :-)

I'm sure the subject will be opened somewhere near in the future - it keeps
coming up those nasty issues we have when using Microsoft products... life
isn't everything.

Cheers,
<prs/>

-----Original Message-----
From: Matthieu Ricaud [mailto:matthieu.ricaud@xxxxxxx]
Sent: Thursday, November 25, 2004 8:23 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Using position predicate in XPath string within
selectSingleNode DOM method

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
files.

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
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm
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 !

Matthieu.


-----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
problem.

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  :

SelectSingleNode("/FORMATION[0]/EPREUVES[0]/EPREUVEAOPT[1]/OPTION[0]")

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 !

Matt

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.