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.  empty element (sort of)

    Posted Thu February 03, 2005 05:00 PM

    I’m looking for a way to find horizontal tabulations (unicode 0009) in ‘empty’ elements.

    I’ve tried the following xquery:

    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    for $a in input()/self_test
    where tf:containsText($a//emphasis, " ")
    return $a/@identifier

    It seems as if this xquery returns all documents. Because when I use … where tf:containsText($a//emphasis, "
    "), I get the same amount of documents.

    I’ve studied the tamino documentation on transliteration (Unicode and text retrieval) and I wonder if it’s possible to add a tabular stop (as a character) to the existing transliteration. I did a first attempt, but I wasn’t successful. It seemed as if tamino ignored the query.
    Am I thinking into the right direction? Would this be the right way to be able to search for tabular stops?

    One other thing, on the W3C-site (http://www.w3.org/TR/2004/WD-xquery-20041029/#doc-xquery-SequenceType) I found that it should be possible to search for unicode characters in an xquery. The search string could for example look like “€99.50” when you’re searching for “?99.50”. Could I get this to work in tamino? If I create a query like:

    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    for $a in input()/self_test
    where tf:containsText($a//emphasis, “&#0009*”)
    return $a/@identifier

    I get error code “INOXIE8306 Invalid cursor position”

    I would be very grateful if someone could advise me.


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: empty element (sort of)

    Posted Fri February 04, 2005 04:48 PM

    You could do it like this:

       for $a in input()/self_test
    where contains($a//emphasis, "	")
    return $a/@identifier


    Be aware that there is no index support for the contains() function.

    No problem with a literal Euro sign, provided you are using a proper encoding for your request. Of course you could use a character reference (“€”) again to circumvent encoding problems.

    [This message was edited by Gunther Rademacher on 04 February 2005 at 16:30.]


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: empty element (sort of)

    Posted Fri February 04, 2005 05:03 PM

    Hi,

    yo write


    I’ve tried the following xquery:

    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    for $a in input()/self_test
    where tf:containsText($a//emphasis, " ")
    return $a/@identifier

    It seems as if this xquery returns all documents. Because when I use … where tf:containsText($a//emphasis, "
    “), I get the same amount of documents.


    yes, * stands for a single word in this case, because U+0009 is a separator by default.

    You can search for U+0009 if you add the following to ino:transliteration:
    <ino:character ino:class=“single” ino:value=” “/>

    Remember to recreate all text indexes involved.

    Then an XQuery such as
    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction
    for $i in input()/*
    where tf:containsText($i,” ")
    return $i

    will be successful.


    Regards

    Harald


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: empty element (sort of)

    Posted Mon February 07, 2005 11:11 PM

    Thanks to your replies I’ve done some additional experiments and I’ve seen the proof with my own eyes.

    I’ve made a test-document, containing the EURO-sign (utf-8 encoding). I got back the right document with xquery…where tf:containsText($a, “€”)…

    But as you wrote, the horizontal tabulation is a tricky one. Guess I’ll have to work on my transliteration-modification-skills.

    Regards, Bart


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: empty element (sort of)

    Posted Tue February 08, 2005 07:01 AM

    Of course I wanted to write:
    I’ve made a test-document, containing the EURO-sign (utf-8 encoding). I got back the right document with xquery…where tf:containsText($a, “€”)…

    instead of



    Bart.


    #Tamino
    #webMethods
    #API-Management