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.  Use tf:containsText

    Posted Wed November 10, 2004 02:04 PM

    Hi

    How can i use the fonction tf:containsText in a JSP

    i must declare

    declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction

    but where and how???


    Thanks


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 2.  RE: Use tf:containsText

    Posted Thu November 11, 2004 10:45 AM

    hi poussing,

    it may well be me, but i don’t get the connection between a JSP and the acual XQuery.
    what the beast usually looks like is this:

    declare namespace tf="http://namespaces.softwareag.com/tamino/TaminoFunction"
    for $a in input()/bib/book
    where tf:containsText($a/title, "UNIX")
    return $a


    (to be found here in documentation: …/Tamino/Tamino 4.1.4.1/Documentation/xquery/xq-query-examples.htm#xq-fs-contains )

    hope this helps.

    gruss,
    andreas f.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 3.  RE: Use tf:containsText

    Posted Thu November 11, 2004 11:10 AM

    hi

    but the problem is

    this declaration make a error when i try it in a jsp

    " declare namespace tf=“http://namespaces.softwareag.com/tamino/TaminoFunction” "


    #API-Management
    #webMethods-Tamino-XML-Server-APIs
    #webMethods


  • 4.  RE: Use tf:containsText

    Posted Thu November 11, 2004 11:35 AM

    hi poussin,

    unfortunately i am fresh out of crystal balls, so you’ll have to elaborate a little. what exactly is the error? how does your actual code look like?

    or, would it be as simple as a problem with quotes in a string? then your declaration has to look like this:

    String myXQuery = "declare namespace tf=\"http://.../TaminoFunction\""
    + "for ... where ... let ..."



    gruss,
    andreas f.


    #webMethods
    #API-Management
    #webMethods-Tamino-XML-Server-APIs


  • 5.  RE: Use tf:containsText

    Posted Thu November 11, 2004 12:51 PM

    Hi, poussin!

    You have to declare the namespace directly at the begin of your query as andreas f. pointed out.

    So somewhere you have your

    http://localhost/tamino/mydb/collection?_xquery =[B]declare ...[/B] for ... where tf:containsText... 



    Probably you have to write the blanks as %20 if you use it literally.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management