you are getting from your query is actually an attribute node: if what you see
is 'id="SER1735434134"' then this is because the software invoking the query has
chosen to display an attribute node in this particular way (or because this is
the display style that you selected, explicitly or
If you want your query to return the string value of
the attribute node you can write it as
between the two is that the first expression converts a sequence of attributes
into a sequence of strings; the second expression requires a single attribute
/child::text(), and in the XPath data model attribute nodes do not have
PS: general XQuery
coding questions that aren't specifically relevant to the Saxon product are
better asked on firstname.lastname@example.org; XPath
questions can equally well be asked on xsl-list at mulberrytech.com Both lists
give you a very high chance of getting an authoritative answer to your question,
often more than one.
I have a very simple question:
I want to get the value of an attribute inside an XQuery:
Here is my XQuery in fact the document in the real life is itself a
This is almost working,
The result I get is => 'id="SER1735434134"'
My problem is that I only want 'SER1735434134'.
Is there a proper way to do this ?
me the fowllowing error (which is logic in a way): The child
axis starting at an attribute() node will never select anything
I have seen some former mails where this question was asked when the
attribute value was get from an XSL but I've got no idea on how doing this in
an XQuery ?