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.  tf:getDocname: Document vs. Element

    Posted Fri July 29, 2005 02:34 PM

    Hi,

    i want to retrieve the document name of nonxml files, which are indexed with the NonXML indexer. Here’s how my query looks like:

    
    declare namespace tf="http://namespaces.softwareag.com/tamino/TaminoFunction"
    for $f in input()/nixe[tf:containsText(properties/content, "Dauerbremse")]
    let $n := tf:getDocname($f/..)
    return $n

    The same query fails, if I use tf:getDocname($f). The error message states, that $f has to be a “document”. (Most probably a DOM document, or something similar.)

    Is this behaviour as expected?

    Regards,

    Jochen


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: tf:getDocname: Document vs. Element

    Posted Fri July 29, 2005 04:48 PM

    Jochen,

    yes, this is expected behaviour. The function requires a document node as input. Document node is one of the 7 node types defined in the XQuery data model. It is the root node of an XML document

    Regards

    Harald


    #webMethods
    #API-Management
    #Tamino


  • 3.  RE: tf:getDocname: Document vs. Element

    Posted Mon August 01, 2005 09:57 AM

    Harald,

    thanks for the reply. Sorry, if my question possible wasn’t very precise. Actually, I would like to ask the following:

    • Obviously I need this …/ in the case of documents created by the NonXML
      indexer. Do I need it in case of other documents as well?
    • If so: Shouldn’t the use of …/ be documented? Or, even better, couldn’t
      tf:getDocname be made that smart? Otherwise: Shouldn’t the exception
      for nixe documents be documented?

    I really found this less than obvious.

    Jochen


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: tf:getDocname: Document vs. Element

    Posted Mon August 01, 2005 12:18 PM

    Jochen,

    you need this for any document. The most general way to call
    tf:getDocname is
    tf:getDocname(xf:root($whatevernode))

    We try to improve documentation for Tamino 4.4 in this respect

    Regards

    Harald


    #API-Management
    #Tamino
    #webMethods