Is there a way in xsl 1.0 to mention the xpath expression as below, to get the value of node "a"
/Root/a - doesnt work
instead of
/Root/*[local-name() = 'a'] - this will work
This is my xml file
<Root xmlns:ns="http://abc">
<ns:a>value</ns:a>
</Root>
The reason am asking, in my xslt, in many lines, we specified the xpath expression as /Root/a
(or other nodes), because the xml file did not have any namespaces before. However the xml file has namespaces now, we have to change everywhere, with *[local - name()]
. Instead of that, is there a way to change my xsl, in one place, so that the earlier xpath expressions also work, even with namespace included xml?
/Root/a
to/Root/b
, how can you change your xsl in one place so that the earlier xpath expressions also work? – choroba