IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  "text" an xquery keyword?

    Posted Wed March 16, 2005 08:06 PM

    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.


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: "text" an xquery keyword?

    Posted Thu March 17, 2005 11:47 AM

    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


    #API-Management
    #webMethods
    #Tamino