[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] relative . not working in complex xpath

Subject: [xsl] relative . not working in complex xpath
From: "Philipp Kursawe phil.kursawe@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jul 2014 03:35:44 -0000

I have selected an element from an XSD file and want to find its base class
to accumulate all xs:attributes.
So I first select the node in question with

Then I want to go on from there and collect all xs:attribute
node.selectNodesNS(".//xs:attribute |
//xs:complexType[@name=./xs:extension/@base]/@name]//xs:attribute", xsns)

Unfortunately that only gives me the attributes of the "node" I perform the
select from.
I get the correct results if I explicitly use the node in my query, instead
of the relative expression of "." in "@name=./xs:extension/@base" like this:

node.selectNodesNS(".//xs:attribute | //xs:complexType[@name =

What is going on here?
Using XPath 1.0 with MSXML.


Current Thread