I ve been trying to see if ASSIGN might return a list of current attributes
(or ideally a specific ndexed attribute)
Having hunted around I came across
which seems to suggest that
<assign var="?findattributenames"
expr="contains(local-name(@*),'gender')"/>
should select the attribute 'gender' (using people.xml). this returns
false.
Is this correct?
- if this is a bug PLEASE DONT FIX IT!!
"rvj" <r...@rolemodels.net> wrote in message
news:bY6dnRW2zMqWsbjU...@mozilla.org...
"rvj" <r...@rolemodels.net> wrote in message
news:_dadnexv1J9D9bjU...@mozilla.org...
>> expr="contains(local-name(@*),'gender')"/>
@* selects a node-set of all attribute but local-name(@*) returns the
name of the first node in that node-set.
--
Martin Honnen
http://JavaScript.FAQTs.com/
ps had any problem with parent syntax ? ../@*[1] seems ok but problems
with
a) ../name()
b) ../name(@*[1])
"Martin Honnen" <maho...@yahoo.de> wrote in message
news:bYydnUzyeb5TDrjU...@mozilla.org...
> b) ../name(@*[1])
name(../@*[1])
gives you the name of the first attribute of the parent in XPath 1.0.
The syntax you have choosen is allowed in XPath 2.0 and XQuery 1.0 but
not in XPath 1.0.