This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Problems with usage of XPath functions as argument in selectNodes method of MSXML2
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: Bagchi Ratul <bratul at baan dot com>
- Cc: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 5 Mar 2002 12:27:54 +0000
- Subject: Re: [xsl] Problems with usage of XPath functions as argument in selectNodes method of MSXML2
- Organization: Jeni Tennison Consulting Ltd
- References: <8987824ED22DD2118E3D00805F15192805E8A2BE@ex-ind-hu1.baan.com>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi Ratul,
> And if I give the setProperty statement then it gives the following error :
> Reference to undeclared namespace prefix: 'xsl'.
You need to use the setProperty() method again:
/* Tell MSXML to use XPath with this DOM */
oXMLDoc.setProperty("SelectionLanguage", "XPath");
/* Set the namespace-prefix associations through things that look
like namespace decarations */
oXMLDoc.setProperty("SelectionNamespaces",
"xmlns:xsl='http://www.w3.org/1999/XSL/Transform'");
/* Run the query */
var oNodeList =
oXMLDoc.selectNodes("//xsl:text[contains(., 'abc')]");
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list