xsl-list
[Top] [All Lists]

RE: Using position predicate in XPath string within selectS ingleNode DOM method

2004-11-23 17:51:29
Hi Matthieu,

Try

Set objNode= objXML.selectSingleNode("foo[.=3]") 

Obviously, using MSXML 3.0, objXML should be of type MSXML2.DOMDocument.3.0,
and objNode should be of type MSXML2.IXMLDOMNode.

HTH,
<prs/>

-----Original Message-----
From: Matthieu Ricaud [mailto:matthieu(_dot_)ricaud(_at_)cned(_dot_)fr] 
Sent: Tuesday, November 23, 2004 10:20 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com; Hardy Merrill
Subject: [xsl] Using position predicate in XPath string within
selectSingleNode DOM method

Hi !

Does anybody know why I can't write something like this :

Set objNode= objXML.selectSingleNode("foo[3]")

(no node matched)

Whereas objNode= objXML.selectSingleNode("foo") works fine

foo[3] is the abreviation for foo[position()=3]

position() is a function, would that means that function are not allowed in
Xpath string within selectSingleNode

I've also tried with SelectNodes method, but I still have the same problem

I use ASP with DOM and my parser is MSXML3

Has anybody an explanation for this,

In advance Thanks,

Regards,

Matthieu.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--