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
  • 1.  help on tf:createTextRerence()

    Posted 05/05/05 11:28 PM

    Hello! I want to group two groups of reference descriptions into one, but the following code returns empty ones:

    
    for $d in input()/TEI.2/:text//text()
    let $a := (let $ref1 := tf:createTextReference($d, "Kansas City")
    for $refeach in $ref1
    return <entry>{xs:int($refeach/@ino:start)}</entry>
    )
    let $b := (let $ref2 := tf:createTextReference($d, "New York City")
    for $refeach in $ref2
    return <entry>{xs:int($refeach/@ino:start)}</entry>
    )
    return <output>{$a}{$b}</output>

    However the following test example returns perfect result:

    
    for $d in input()/TEI.2/:text//text()
    let $a := (let $ref1 := (1,2,3)
    for $refeach in $ref1
    return <entry>{$refeach}</entry>)
    let $b := (let $ref2 := (5,5,5)
    for $refeach in $ref2
    return <entry>{$refeach}</entry>)
    return <output>{$a}{$b}</output>

    I assumed tf:createTextReferece() returns a sequence of reference descriptions and therefore I could not understand why the first Xquery does not return any results.


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: help on tf:createTextRerence()

    Posted 05/12/05 06:01 PM

    Hi,

    I tested the following query
    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    declare namespace xs = “XML Schema
    declare namespace ino=“http://namespaces.softwareag.com/tamino/response2

    let $X:=Dies ist Kansas City und New York City
    for $d in $X//text()
    let $a := (let $ref1 := tf:createTextReference($d, “Kansas City”)
    for $refeach in $ref1
    return $refeach)
    let $b := (let $ref2 := tf:createTextReference($d, “New York City”)
    for $refeach in $ref2
    return $refeach
    )
    return {$a}{$b}

    and it works ok and delivers

    <ino:object ino:docid=“1” ino:doctypeid=“0” ino:end=“15” ino:nodeid=“2” ino:start=“9” xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” />
    <ino:object ino:docid=“1” ino:doctypeid=“0” ino:end=“20” ino:nodeid=“2” ino:start=“16” xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” />
    <ino:object ino:docid=“1” ino:doctypeid=“0” ino:end=“28” ino:nodeid=“2” ino:start=“25” xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” />
    <ino:object ino:docid=“1” ino:doctypeid=“0” ino:end=“33” ino:nodeid=“2” ino:start=“29” xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” />
    <ino:object ino:docid=“1” ino:doctypeid=“0” ino:end=“38” ino:nodeid=“2” ino:start=“34” xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” />

    So I cannot reproduce


    #Tamino
    #webMethods
    #API-Management