T
tfsquare
All,
I am new to XSLT and having some problems understanding the syntax of
XPath which selects nodes in the XML document. Consider this bit of
XML, which contains three outer XML elements.
<FOO>foo.top.level</FOO>
<BOO><FOO>foo.second.level</FOO></BOO>
<CHOO><BOO><FOO>foo.third.level</FOO></BOO></CHOO>
My testing shows
(a) "/*/FOO" results in a empty string
(b) "//FOO" results in "foo.top.level"
(c) "/FOO" results in a empty string
(d) "//*/FOO" results in "foo.top.level"
(e) "//*/*/FOO" results in "foo.top.level"
(f) "//BOO/FOO" results in "foo.second.level"
I'm picking up the results like this...
<xsl:variable name="foo1" select="/*/FOO"/>
I'm hopelessly confused as to why various XPath's pick various nodes.
Any help you can provide is greatly appreciated.
Thanks,
TFSquare
I am new to XSLT and having some problems understanding the syntax of
XPath which selects nodes in the XML document. Consider this bit of
XML, which contains three outer XML elements.
<FOO>foo.top.level</FOO>
<BOO><FOO>foo.second.level</FOO></BOO>
<CHOO><BOO><FOO>foo.third.level</FOO></BOO></CHOO>
My testing shows
(a) "/*/FOO" results in a empty string
(b) "//FOO" results in "foo.top.level"
(c) "/FOO" results in a empty string
(d) "//*/FOO" results in "foo.top.level"
(e) "//*/*/FOO" results in "foo.top.level"
(f) "//BOO/FOO" results in "foo.second.level"
I'm picking up the results like this...
<xsl:variable name="foo1" select="/*/FOO"/>
I'm hopelessly confused as to why various XPath's pick various nodes.
Any help you can provide is greatly appreciated.
Thanks,
TFSquare