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
Expand all | Collapse all

Problems by generation a new XML-file with XQuery

  • 1.  Problems by generation a new XML-file with XQuery

    Posted 06/07/05 05:39 PM

    hi there! would be really great, if someone could take a short look at my code!:slight_smile: i got the following error-message: Error on line 7 column 5 of file:/E:/path/aufgabe2a.xpath: XPST0003: XQuery syntax error in #…gory{“test”}} { if#: expected “)”, found “{” Failed to compile query the passage, where the error raises is the following:

    <books> { for $x in //book return ( element { node-name($x) }{attribute category{"test"}} { if(contains(string($x/title),"XML")) then (

    so… now i have two possibles… 1. delete the ‘{attribute category{“test”}}’ passage… or 2. delete all the inner content

    if(contains(string($x/title),"XML")) then (

    both variants work fine… 1. only with the element and not attributs but with inner elements or 2. with element and attribute, but without more inner elements… :frowning: has someone an idea?? thanx a lot!


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Problems by generation a new XML-file with XQuery

    Posted 06/07/05 05:56 PM

    problem solved!!!

    the fault was, that i hadn’t to close the last braket ‘}’ after the attribute, because on that position the content has to follow…

    <books>
    {
    for $x in //book 
    return
    (
    element { node-name($x) }{attribute category{"test"},
    
    if(contains.........

    greetinx


    #webMethods
    #API-Management
    #Tamino