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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  CDATA support in XQuery (or displaying an attrib as a node)

    Posted 05/17/04 04:42 PM

    Hello everyone,

    I was wondering if XQuery fro Tamino 4.1.4.4 supports using CDATA?

    I’d like to acomplish something like this:

    for $p in input()/person[instances/instance/@id=$people/person/@iid]
    where $p/@active=1
    return
    <![CDATA[<]]{local-name($p/instances/instance/@role)}<![CDATA[>]]


    The idea is, that I have an attribute in the doc instance, and I’d like to return it as a node. I tried simply <{local-name($p/instances/instance/@role)}> which obviously didn’t work.

    If you have any other suggestion on how to acomplish this, I’d apreaciate it greatly.

    Thank you very much!

    Peter Endisch

    ---------------------------------------
    I’m a Zen Garden Maintenance Engineer
    ---------------------------------------


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: CDATA support in XQuery (or displaying an attrib as a node)

    Posted 05/17/04 06:08 PM

    Hi,

    Unfortunately Tamino 4.1.4 does not support CDATA constructors. It also does not support the construction of an element that gets its name from evaluating an expression.
    But in your example query the result of calling the local-name() function is fixed. So you can specify your query by putting an constructor that creates a “role” element into the return clause.
    The resulting query looks like this:

    for $p in input()/person[instances/instance/@id=$people/person/@iid]
    where $p/@active=1
    return


    If the result of calling local-name() is not fixed, I would suggest to construct for each extracted element an element with a fixed name that holds an attribute with the local-name of the extracted element.

    Regards,

    Thorsten


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: CDATA support in XQuery (or displaying an attrib as a node)

    Posted 05/17/04 06:19 PM

    Thank you Thorsten for answering my question.

    At least now I know what job will my XQuery do and what job will my XSLT (which gets the result of the XQuery) will do.

    And thank you for being so active on this NS. I apreciate all your answers!

    Peter Endisch

    ---------------------------------------
    I’m a Zen Garden Maintenance Engineer
    ---------------------------------------


    #webMethods
    #API-Management
    #Tamino