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.  I can't get some data from XML file by using XQuery

    Posted 01/28/03 05:10 AM

    In my xml file I have couple tags from which I can’t get data. For exmp:

    >> OUT

    I need to get all attribute names so I write query:

    {
    for $c in document(“C:\QuiP_2.2.1.1\MyQuipFiles\FigA.xml”)//class
    let $a := $c/attributes
    return

    { $c/@name }
    { $a/@count}

    { $a/attribute/@name }



    }

    But appears that attribute is one of the key words in XQuery language and it highlights in blue as soon as I type it. If I change the tag name attribute, in my xml file, into attrib then I can cet data I need but this is not solution. Could you please help me on what syntax I have to use in order to solve my problem.
    Thank you! Please help me, I appreciate!!!


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: I can't get some data from XML file by using XQuery

    Posted 01/28/03 10:32 AM

    Hello Dalius,

    Tamino XQuery 4 follows an earlier WD of W3C XQuery, which uses reserved keywords.
    That means the keywords of the language cannot be directly used as identifiers.
    There is a not documented syntactical extension that allows to escape those keywords:

    The use of a prefix token “:” is allowed on unprefixed QNames to visually distinguish tokens that are spelled the same as keywords. For instance, the following is a path expression containing the element names “for”, “if”, and “return”: :for/:if/:return.

    Example:
    for $i in input()/e1
    return $i/:attribute


    The newest version of the W3C Xquery draft
    has abolished reserved keywords.
    Therefore please note that a future version
    of Tamino XQuery 4 will very probably no
    longer support this syntactical extension.

    Best regards
    Walter
    Tamino R&D


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: I can't get some data from XML file by using XQuery

    Posted 01/28/03 03:37 PM

    Thank you, Mr. Walter, very much for you help, it works.
    Best wishes, Dalius


    #API-Management
    #Tamino
    #webMethods