Query Tamino server with xql parameter in URL. Exclude nodes with specific child.
        Posted  
        
            by Anon
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Anon
        
        
        
        Published on 2010-05-28T19:23:04Z
        Indexed on 
            2010/05/29
            0:52 UTC
        
        
        Read the original article
        Hit count: 304
        
xquery
I have to query a Tamino database through HTTP.
http://example.com/db?DocumentType=publication&year=all
gives me a list of all publication in the database, something like:
<publication>
  <title>
    The first publications title
  </title>
  <author>
    Author, M
  </author>
  <LastModification>
    <year>
      2008
    </year>
    <month>
      05
    </month>
  </LastModification>
  <year>
    2006
  </year>
</publication>
<publication>
  <title>
    The second publications title
  </title>
  <author>
    Secauthor, M
  </author>
  <LastModification>
    <year>
      2005
    </year>
    <month>
      01
    </month>
  </LastModification>
  <year>
    2000
  </year>
</publication>
<publication>
  <title>
    Another publications title
  </title>
  <author>
    Anauthor, M
  </author>
  <year>
    2008
  </year>
</publication>
(Simplified values)
There is a xql parameter that can be specified and that can be used to filter the output, so I can do:
http://example.com/db?DocumentType=publication&year=all&xql=LastModification/year~>2008
Which results in:
<publication>
  <title>
    The publications title
  </title>
  <author>
    Author, M
  </author>
  <LastModification>
    <year>
      2008
    </year>
    <month>
      05
    </month>
  </LastModification>
  <year>
    2006
  </year>
</publication>
<publication>
  <title>
    Another publications title
  </title>
  <author>
    Anauthor, M
  </author>
  <year>
    2008
  </year>
</publication>
There is very little documentation... I want to be able to first get all publications that have changed since the last update (and only those), and then in a second query all publications that do not have a <LastModification> tag.
© Stack Overflow or respective owner