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.  where clause with variables ??

    Posted Fri May 11, 2007 11:13 AM

    hi all,
    i’ll show you my problem!

    it’s possible to replace something like this:

    
    for $a in doc( '/db/tesi/UtentiIstanza.xml' )/utenti/utente
    where $a/credenziali/unacredenziale[nomecredenziale='CI']/residenza='Milano'
    return $a/id

    with something like this:

    
    let $expcred := "credenziali/unacredenziale[nomecredenziale='CI']/residenza='Milano'"
    for $a in doc( '/db/tesi/UtentiIstanza.xml' )/utenti/utente
    where $a/$expcred
    return $a/id

    the first example works,the second no,how can i do?
    i’ve tryied many other solutions but it never works :cry:
    I need to use this in a function and $expcred is one of my parameters

    thanks a lot for your help
    Matthew


    this is my XML

    0 admin admin 1 teyo qwerty CI O'Brien Matthew Milano studente BIB O'Brien Matthew MI12345
    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: where clause with variables ??

    Posted Mon May 14, 2007 10:17 AM

    Hi,

    this is the Tamino foru, Please understand, that non-Tamino related questions (like yours) might not be answered

    Regards

    Harald


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: where clause with variables ??

    Posted Thu May 17, 2007 09:39 PM

    It looks like you’re looking for some kind of macro functionality, or an “eval” function, or some such. No, XQuery doesn’t provide that.


    #Tamino
    #API-Management
    #webMethods