Next page Previous page Start of chapter End of chapter

XPathMark: a benchmark for XPath

XPathMark consists of a set of queries which covers the main aspects of XPath 1.0, including different axes, node tests, Boolean operators, filters, references, and functions. These queries have been designed with a natural interpretation with respect to XML documents generated under the XMark benchmark.

Since XPath is the core retrieval language for relevant XML technologies like XSLT and XQuery, the proposed benchmark might help the evaluation of functional completeness, efficiency, and scalability of XML engines implementing these technologies. In particular, most of the queries are such that the sizes of the intermediate and final results they compute, and hence the response times as well, increase as the size of the document grows. XMark comes with an XML generator that produces XML documents according to a numeric scaling factor. Document can be generated from 100 KB up to 10 GB and more. Some examples of XPathMark queries follow:

The American items:

/site/regions/*/item[parent::namerica or parent::samerica]

The open auctions in which a certain person issued a bid before another person:

/site/open_auctions/open_auction[bidder[personref/@person="person0"]
/following-sibling::bidder[personref/@person="person1"]]

The items that follow, in document order, a given item:

/site/regions/*/item[@id="item0"]/following::item

The elements having declared an attribute id:

//*[@id]

The sellers of the open auctions that a given person is watching:

/site/people/person[@id="person1"]/watches/watch/id(@open_auction)/seller/id(@person)

The items sold by Alassane Hogan:

/site/closed_auctions/closed_auction[seller/id(@person)/name="Alassane Hogan"]/itemref/id(@item)

The open auctions having more than 5 bidders:

/site/open_auctions/open_auction[count(bidder) > 5]

The items whose description contains the word gold:

/site/regions/*/item[contains(description,"gold")]

Open auctions with a total increase less or equal to 70:

/site/open_auctions/open_auction[sum(bidder/increase) <= 70]
Next page Previous page Start of chapter End of chapter
Caffè XML - Massimo Franceschet