"text" an xquery keyword?

I’m dealing with running xqueries across xml docs that contain elements named “text”. However, tamino seems unable to deal with the word “text” in an xpath expression.

Example:

11.6 ....

I need to find text elements in sections; e.g. root/section/code[@code = ‘blah’]/… gives me access to the appropriate “section” element, but adding /text makes Tamino barf. Adding /component2 works correctly, though, so I assume there’s something special about the word “text”. Is it a keyword of some sort or otherwise privilaged? If so, is there some way around this - some manner of escaping it, or some xpath or xquery function that would accept it as a string (eg something along the lines of getElementByName(‘text’))?

Thanks in advance for anyone’s help with this.

Hi,

Due to historical reasons “text” is a keyword in Tamino XQuery. But you can use keywords in path expressions by “escaping” them with a colon. For example the following query finds all “text” elements inside a “section” doctype:

input()/section//:text

Best regards,

Thorsten