webMethods

webMethods

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.  distinct help

    Posted Tue April 26, 2005 10:21 AM

    hello as it is possible to be known. Doing distinct I number of elements of a registry I have proven with:

    for $d in distinct(/book/Titulo)
    return {
    count($d)
    }

    does not work.


    #API-Management
    #webMethods
    #Tamino


  • 2.  RE: distinct help

    Posted Tue April 26, 2005 07:31 PM

    Hi,

    A distinct() function is not part of the W3C draft. Instead it specifies the
    distinct-values() function which extracts distinct values from a given input sequence. Applied on a node sequence it extracts the typed value from each node and performs a duplicate elimination.

    In order to count the number of distinct values hold by the “Titulo” element you have to rewrite your query in the following way:

    count(distinct-values(input()/book/Titulo))

    Best regards,

    Thorsten Fiebig


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: distinct help

    Posted Wed April 27, 2005 01:28 PM

    As it is the space of names of this function???. it returns unknown function

    declare namespace xf = “W3C XQuery 1.0 and XPath 2.0 Functions and Operators
    count(xf:distinct-values(input()/Titulos/Titulo))


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: distinct help

    Posted Wed April 27, 2005 02:25 PM

    Hi,

    You don’t need to specify a namespace for the distinct-values() function, since it belongs to the default function namespace. Please note that the support for distinct-values() was introduced with Tamino 4.2.

    Best regards,

    Thorsten Fiebig


    #API-Management
    #webMethods
    #Tamino


  • 5.  RE: distinct help

    Posted Thu April 28, 2005 10:00 AM

    This is what gives back when proving function? in XQUERY count(distinct-values(input()/monografia/Titulos/Titulo) some idea? my version of Tamino is Tamino 4.1.4.1

    <?xml version="1.0" encoding="windows-1252" ?>
    #Tamino
    #API-Management
    #webMethods


  • 6.  RE: distinct help

    Posted Thu April 28, 2005 11:34 AM

    Hi,

    There is definitely no support for distinct-values() in Tamino 4.1.4. You have to go for a newer version.

    Best regards,

    Thorsten Fiebig


    #webMethods
    #API-Management
    #Tamino