I'm using Saxon 9.2 and I'm wondering whether the following XPath query is
possible - please consider the following:
If I evaluate a query on the <record ref="efg"> element, how can I retrieve
the value of the ref attribute on the first <record> node? The following won't
parse - is such a query even possible?
Please note that this forum is intended for questions and comments that are
specific to Saxon. For general XPath programming advice, a better place is the
xsl-list at mulberrytech.com.
I don't really know the answer. Your English-language description of the
problem refers to ref="efg" which isn't present in your source document. Your
(incorrect) XPath expression can most easily be corrected to
/import/record/@ref but that assumes you're in XSLT and current() is the the
Thanks for your response, and apologies for using the wrong forum. I did mean
ref="def" in my description, so you are correct in assuming current is equal
to that node.
I note with interest that you write:
id = current()/parent
id/text() = current()/parent/text()
The former being a shorthand for the latter, I assume?
So, is this something that is supported with Saxon's XPath implementation
assuming I am executing an XPath query against a DOM? There's no XSLT in