I
inquirydog
Can anyone explain to me why the following XQuery expression (a simple
xpath expression) returns a different result than the same expression
in xslt?
document("document.xml")//a/@b
For the following sample document:
<root>
<a b="1" />
<a b="2" />
</root>
for XQuery (using 'java kawa.repl --xquery -e
'document("document.xml")//a/@b') I get:
b=1 b=2
for xslt (using <xsl:value-of select="document('document.xml')//a/@b"
/>) I get:
1
There seem to be two large descrepancies- first, XQuery includes the
attribute name as well as the value (b=1 instead of 1), and XQuery
lists all the attributes, while xslt only lists the first. Am I just
confused or is there some ambiguity with this?
thanks
-I
xpath expression) returns a different result than the same expression
in xslt?
document("document.xml")//a/@b
For the following sample document:
<root>
<a b="1" />
<a b="2" />
</root>
for XQuery (using 'java kawa.repl --xquery -e
'document("document.xml")//a/@b') I get:
b=1 b=2
for xslt (using <xsl:value-of select="document('document.xml')//a/@b"
/>) I get:
1
There seem to be two large descrepancies- first, XQuery includes the
attribute name as well as the value (b=1 instead of 1), and XQuery
lists all the attributes, while xslt only lists the first. Am I just
confused or is there some ambiguity with this?
thanks
-I