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.  xquery and x-query

    Posted Sat September 03, 2005 07:18 PM

    Dear all,

    I have little confusion in my mind. so please help to get rid out of the problems.

    i have one collection for storing employee details.

    when i try with the following url
    http://localhost/tamino/welcome_4_4_0/colemployees?_XQL=//employee
    i am able to view all the employees

    http://localhost/tamino/welcome_4_4_0/colemployees/employees/@1
    is not displaying enything. a blank page only

    why the second one is not working

    please help

    regards


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: xquery and x-query

    Posted Sun September 04, 2005 09:21 PM

    Is your document type “employee” or “employees”? The second example has “employees”, the first has “employee”.


    #Tamino
    #API-Management
    #webMethods


  • 3.  RE: xquery and x-query

    Posted Sun September 04, 2005 10:56 PM

    thanks for replying

    my doc type is employees

    employee is a tag inside that that contains subnodes name and title.

    regards sreeju


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: xquery and x-query

    Posted Tue September 06, 2005 06:33 PM

    Perhaps an obvious question, but does the document with ino:id=1 still exist? Because the first query is asking for all the employee nodes, but the second one points to a specific document which may have been deleted.


    #API-Management
    #webMethods
    #Tamino


  • 5.  RE: xquery and x-query

    Posted Thu September 08, 2005 11:45 AM

    Can you please make it clear. what was my belief that @1 will return the first existing documet from doctype. is it wrong

    regards sreeju


    #webMethods
    #Tamino
    #API-Management


  • 6.  RE: xquery and x-query

    Posted Fri September 09, 2005 04:40 PM

    When Tamino stores a document it assigns it a unique value for the ino:id attribute. If you delete the document, Tamino no longer has a document with that ino:id. (There’s a flag in the schema that lets you tell Tamino to reuse ino:id values, but I think it’s off by default.) “http://localhost/tamino/welcome_4_4_0/colemployees/employees/@1” is really just an abbreviation for “http://localhost/tamino/welcome_4_4_0/colemployees?_XQL=/employees[@ino:id=1]
    so if you’ve deleted the first document you created it will not return anything.


    #API-Management
    #Tamino
    #webMethods


  • 7.  RE: xquery and x-query

    Posted Fri September 09, 2005 09:43 PM

    when you use your first query, one of the attributes returned with each document is the ino:id. You can try the second query with any of the ino:id values that are returned there.


    #webMethods
    #Tamino
    #API-Management