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.  Some XQuerys doesn

    Posted Tue October 26, 2004 02:16 PM

    I have migrated a database from 4.1.4 to 4.2.1 and some XQuerys have disparate results
    an example of these XQuerys is :

    for $a in input()/general/anyo
    where $a/@id=“1995”
    return

    {$a/@id}
    {$a/[count()=0]}


    with 4.1.4, I have the next response:


    <min_margen>110960.75</min_margen>
    <min_ventas>554803.75</min_ventas>
    <ventas_coste>443843</ventas_coste>
    <ventas_neto>590957</ventas_neto>
    <ventas_bruto>631905</ventas_bruto>
    <num_clientes>84</num_clientes>
    <max_t_entrega>21.6605</max_t_entrega>
    <media_t_entrega>19.6605</media_t_entrega>
    <min_num_clientes>82</min_num_clientes>


    And with 4.2.1 this one:


    Have I forgotten anything, or is some kind of bug?


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Some XQuerys doesn

    Posted Tue October 26, 2004 04:23 PM

    What type does the id attribute have in the schema? One of the changes between 4.1 and 4.2 is stricter type checking. I know I had to change queries from things like ?@date=“2004-10-11”? to ?@date=xs:date(“2004-10-11”)? when I upgraded.


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: Some XQuerys doesn

    Posted Tue October 26, 2004 05:35 PM

    The type is String.
    I believe that the problems is in the result part “{$a/[count()=0]}”. If I change the XQuery to something like this:

    for $a in input()/general/anyo
    where $a/@id=“1995”
    return

    {$a/@id}
    {$a/[not()]}


    it works again.
    But I think that modifing the query is not the solution…


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: Some XQuerys doesn

    Posted Wed October 27, 2004 02:02 PM

    Hi,

    The different results of the queries:

    for $a in input()/general/anyo
    where $a/@id=“1995”
    return

    {$a/@id}
    {$a/[count()=0]}


    and

    for $a in input()/general/anyo
    where $a/@id=“1995”
    return

    {$a/@id}
    {$a/[not()]}


    is caused by a bug in the Tamino 4.2 XQuery processor. We will fix that problem.

    Best regards,

    Thorsten


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: Some XQuerys doesn

    Posted Wed October 27, 2004 02:11 PM

    Hi,

    The type of your id attribute depends on your schema. But the name of the attribute suggests that it has the type xs:ID.
    An attribute of type xs:ID can be compared with a string literal. This is due to the fact that xs:string is a subtype of xs:ID.

    Best regards,

    Thorsten


    #webMethods
    #API-Management
    #Tamino