Next page Previous page Start of chapter End of chapter

Running example

Write in XPath the following queries for the DBLP application and run them:

  1. The PhD thesis of Andreas Neumann
  2. /dblp/phdthesis[author = "Andreas Neumann"]
  3. All journal articles with at least four authors
  4. /dblp/article[count(author) >= 4]
  5. All articles published in 2000 either at a conference or in a journal that contain the word XML in the title
  6. /dblp/*[year = 2000 and contains(title, "XML")  and 
           (self::inproceedings or self::article)] 
    
    oppure
    /dblp/inproceedings[year = 2000 and contains(title, "XML")] |   
    /dblp/article[year = 2000 and contains(title, "XML")]
    
  7. The percentage of journal papers in the bibliography
  8. count(/dblp/article) div count(/dblp/*) 
  9. The percentage of solo journal papers (papers with only one author)
  10. count(/dblp/article[count(author) = 1]) div count(/dblp/article) 
  11. The average number of authors of conference papers
  12. count(/dblp/inproceedings/author) div count(/dblp/inproceedings) 
  13. The first author of all papers written by Massimo Franceschet
  14. /dblp/*[author = "Massimo Franceschet"]/author[position() = 1] 
  15. The first and last authors of paper with key journals/ci/CervesatoFM00
  16. /dblp/*[@key = "journals/ci/CervesatoFM00"]/author[position() = 1] | 
    /dblp/*[@key = "journals/ci/CervesatoFM00"]/author[position() = last()]
  17. All authors that follow Massimo Franceschet in paper with key journals/ci/CervesatoFM00
  18. /dblp/*[@key = "journals/ci/CervesatoFM00"]
    /author[preceding-sibling::author[. = "Massimo Franceschet"]] 
    oppure
    /dblp/*[@key = "journals/ci/CervesatoFM00"]
    /author[. = "Massimo Franceschet"]/following-sibling::author 
  19. All proceedings that follow paper with key journals/ci/CervesatoFM00 in the bibliography
  20. dblp/*[@key = "journals/ci/CervesatoFM00"]/following::proceedings
  21. All i elements in the title of a paper (at any depth)
  22. /dblp/*/title//i
Next page Previous page Start of chapter End of chapter
Caffè XML - Massimo Franceschet