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.  ino:docname

    Posted Mon August 02, 2004 10:47 PM

    Hi taminoes,

    How can I get ino:docname using tf:containsText, tf:containsNearText, etc?

    I tried something like this:

    declare namespace tf=‘http://namespaces.softwareag.com/tamino/TaminoFunction
    for $a in input()/docnixe
    where tf:containsText($a/properties/@mimetype,“image/")
    and tf:containsText(root($a),"INO
    .jpg”)
    return
    { tf:getDocname(root($a)) }


    But, I just have got

    Thanx in advance, Ito


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: ino:docname

    Posted Fri August 06, 2004 08:55 AM

    Hi Ito,

    how about this:

       declare namespace tf='http://namespaces.softwareag.com/tamino/TaminoFunction' 
    for $a in input()/docnixe
    let $docName := <docName>{tf:getDocname(root($a))}</docName>
    where tf:containsText($a/properties/@mimetype,"image/*")
    and tf:containsText($docName, "INO*.jpg")
    return <out>
    { $docName/text() }
    </out>


    The tricky thing here is that the tf:containsText() function requires a node for the first parameter - so we can’t just pass the result of tf:getDocname(), because this is a string not a node. Unfortunately the result of root($a) is the document root, which doesn’t help much.

    An alternative approach could be to use the xf:contains, xf:starts-with, xs:ends-with, etc. functions on the value of tf:getDocname(). These functions accept a string parameter, although they don’t have the same full-text capabilities as tf:containsText().

    I hope that helps,
    Trevor.


    #API-Management
    #Tamino
    #webMethods