reserved words

M

Miel Bronneberg

Hi,

My xquery parser doesn't like 'text' when it appears as an element name,
e.g. "for $text in $card/text". I think it expects 'text' to be a
function, because it doesn't complain about "$card/text()". Is this
expected behaviour, or should it be possible to use 'text' as an elemant
name?

Regards, Miel.
 
M

Martin Honnen

Miel Bronneberg wrote:

My xquery parser doesn't like 'text' when it appears as an element name,
e.g. "for $text in $card/text". I think it expects 'text' to be a
function, because it doesn't complain about "$card/text()". Is this
expected behaviour, or should it be possible to use 'text' as an elemant
name?

I am not familiar enough with the XQuery syntax specification to give an
answer to that but when I use Saxon 8.1.1 to run the following query

let $xml := <doc><text>Kibology for all.</text></doc>
return for $text in $xml//text return $text

it runs it without problems so at least the XQuery parser in Saxon can
deal with 'text' as an element name in a path expression.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,765
Messages
2,569,568
Members
45,042
Latest member
icassiem

Latest Threads

Top