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.


#TechXchangePresenter
 View Only
  • 1.  Confusing syntax error

    Posted Fri April 25, 2003 06:00 PM

    Hello,

    If have some xml instances of the following form
    stored in Tamino:


    Left and leaving
    The Weakerthans


    The following Xquery works as expected:

    for $s in input()/song
    where $s/title = “The Weakerthans”
    return $s

    In this one I have ony changed the node for comparison in the where part from “title” to “by” and the xquery fails with a syntax error in line 2:

    for $s in input()/song
    where $s/by = “The Weakerthans”
    return $s

    I suspect that the xquery parser thinks that by is
    part of a function e.g. “sort by” and therefore throws
    a syntax error, or did I miss something essential here?

    Thank you very much,

    Ben


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Confusing syntax error

    Posted Fri April 25, 2003 06:35 PM

    Hi Ben,

    you are right, ‘by’ is taken as an XQuery keyword, try

    for $s in input()/song
    where $s/:by = “The Weakerthans”
    return $s

    regards,
    Juliane.


    #API-Management
    #webMethods
    #Tamino


  • 3.  RE: Confusing syntax error

    Posted Fri April 25, 2003 07:19 PM

    Hi Juliane,

    That’s what I was looking for!
    Thank you very much,

    Ben


    #API-Management
    #Tamino
    #webMethods