This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with usage of XPath functions as argument in selectNodes method of MSXML2


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]