--- /dev/null
+#!/bin/sh
+
+echo Result for query "$1"
+cat xpath-pt/xpath/"$1".xpl
+echo
+echo
+cat results/"$1".saxon
+echo
+echo --------------------------------------------------------
+echo
+cat results/"$1".sxsi
--- /dev/null
+/site/closed_auctions/closed_auction/annotation/description/text/keyword
\ No newline at end of file
--- /dev/null
+//closed_auction//keyword
\ No newline at end of file
--- /dev/null
+/site/closed_auctions/closed_auction//keyword
\ No newline at end of file
--- /dev/null
+/site/closed_auctions/closed_auction[annotation/description/text/keyword]/date
\ No newline at end of file
--- /dev/null
+/site/closed_auctions/closed_auction[descendant::keyword]/date
\ No newline at end of file
--- /dev/null
+/site/people/person[profile/gender and profile/age]/name
\ No newline at end of file
--- /dev/null
+/site/people/person[phone or homepage]/name
\ No newline at end of file
--- /dev/null
+/site/people/person[address and (phone or homepage) and (creditcard or profile)]/name
\ No newline at end of file
--- /dev/null
+/site/regions/*/item[parent::namerica or parent::samerica]/name
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) and (bidder/following::bidder and bidder/preceding::bidder)]/interval
\ No newline at end of file
--- /dev/null
+//keyword/ancestor::listitem/text/keyword
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction/bidder[following-sibling::bidder]
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction/bidder[preceding-sibling::bidder]
\ No newline at end of file
--- /dev/null
+/site/regions/*/item[following::item]/name
\ No newline at end of file
--- /dev/null
+/site/regions/*/item[preceding::item]/name
\ No newline at end of file
--- /dev/null
+//person[profile/@income]/name
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[bidder and not(bidder/preceding-sibling::bidder)]/interval
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) or (bidder/following::bidder and bidder/preceding::bidder)]/interval
\ No newline at end of file
--- /dev/null
+/site/people/person[profile/age >= 18 and profile/@income < 10000 and address/city != 'Dallas']/name
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[bidder/increase = current]/interval
\ No newline at end of file
--- /dev/null
+/site/people/person[profile/@income = /site/open_auctions/open_auction/current]/name
\ No newline at end of file
--- /dev/null
+/site/people/person[watches/watch/id(@open_auction)/seller/@person = @id]/name
\ No newline at end of file
--- /dev/null
+id('person0')/name
\ No newline at end of file
--- /dev/null
+/site/people/person/watches/watch/id(@open_auction)/interval
\ No newline at end of file
--- /dev/null
+/site/people/person[watches/watch/id(@open_auction)/itemref/id(@item)/parent::australian]/name
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[(count(bidder) mod 2) = 0]/interval
\ No newline at end of file
--- /dev/null
+count(//text) + count(//bold) + count(//emph) + count(//keyword)
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[sum(bidder/increase) > 10 * initial]/interval
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[sum(bidder/increase) != (current - initial)]/interval
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[bidder and (sum(bidder/increase) div count(bidder)) > 2 * initial]/interval"
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction[number(bidder[1]/increase) < number(bidder[floor((last() + 1) div 2)]/increase) and number(bidder[floor((last() + 1) div 2)]/increase) < number(bidder[last()]/increase)]/interval
\ No newline at end of file
--- /dev/null
+/site/regions/europe/item/description/descendant::keyword[last()]
\ No newline at end of file
--- /dev/null
+//keyword/ancestor::listitem[1]/text/keyword
\ No newline at end of file
--- /dev/null
+/site/open_auctions/open_auction/bidder[number(preceding-sibling::bidder[1]/increase) <= number(increase) and number(increase) <= number(following-sibling::bidder[1]/increase)]
\ No newline at end of file
--- /dev/null
+/site/regions/*/item[preceding::item[100] and following::item[100]]/name
\ No newline at end of file
--- /dev/null
+/site/regions/*/item[contains(description, name)]/name
\ No newline at end of file
--- /dev/null
+/site/regions/*/item[contains(substring-before(description, 'eros'), 'passion') and contains(substring-after(description, 'eros'), 'dangerous')]/name
\ No newline at end of file
--- /dev/null
+/site/regions/*/item[string-length(translate(normalize-space(description),' ','')) > 10000]/name
\ No newline at end of file
--- /dev/null
+/site/regions
--- /dev/null
+/site/regions/*/item[mailbox/mail/from]/mailbox/mail
--- /dev/null
+/site/regions/*/item[mailbox/mail/from]//keyword
--- /dev/null
+/descendant-or-self::keyword/ancestor::listitem/parent::parlist
--- /dev/null
+//keyword/ancestor::listitem
--- /dev/null
+//keyword/ancestor-or-self::mail
--- /dev/null
+/site/closed_auctions
--- /dev/null
+/site/regions/europe/item/mailbox/mail/text/keyword
--- /dev/null
+/site/closed_auctions/closed_auction/annotation/description/parlist/listitem
--- /dev/null
+/site/closed_auctions/closed_auction/annotation/description/parlist/listitem/parlist/listitem/*//keyword
--- /dev/null
+/site/regions/*/item
--- /dev/null
+/descendant-or-self::listitem/descendant-or-self::keyword
--- /dev/null
+/site/regions/*/item//keyword
--- /dev/null
+/site/people[address and (name or homepage)]
--- /dev/null
+doc()/site/closed_auctions/closed_auction/annotation/description/text/keyword
\ No newline at end of file
--- /dev/null
+doc()//closed_auction//keyword
\ No newline at end of file
--- /dev/null
+doc()/site/closed_auctions/closed_auction//keyword
\ No newline at end of file
--- /dev/null
+doc()/site/closed_auctions/closed_auction[annotation/description/text/keyword]/date
\ No newline at end of file
--- /dev/null
+doc()/site/closed_auctions/closed_auction[descendant::keyword]/date
\ No newline at end of file
--- /dev/null
+doc()/site/people/person[profile/gender and profile/age]/name
\ No newline at end of file
--- /dev/null
+doc()/site/people/person[phone or homepage]/name
\ No newline at end of file
--- /dev/null
+doc()/site/people/person[address and (phone or homepage) and (creditcard or profile)]/name
\ No newline at end of file
--- /dev/null
+doc()/site/regions/*/item[parent::namerica or parent::samerica]/name
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) and (bidder/following::bidder and bidder/preceding::bidder)]/interval
\ No newline at end of file
--- /dev/null
+doc()//keyword
\ No newline at end of file
--- /dev/null
+doc()//keyword/ancestor::parlist/descendant::keyword
\ No newline at end of file
--- /dev/null
+doc()//keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword
\ No newline at end of file
--- /dev/null
+doc()//keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword
\ No newline at end of file
--- /dev/null
+doc()//keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword
\ No newline at end of file
--- /dev/null
+doc()//keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword/ancestor::parlist/descendant::keyword
\ No newline at end of file
--- /dev/null
+doc()//keyword/ancestor::listitem/text/keyword
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction/bidder[following-sibling::bidder]
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction/bidder[preceding-sibling::bidder]
\ No newline at end of file
--- /dev/null
+doc()/site/regions/*/item[following::item]/name
\ No newline at end of file
--- /dev/null
+doc()/site/regions/*/item[preceding::item]/name
\ No newline at end of file
--- /dev/null
+doc()//person[profile/@income]/name
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[bidder and not(bidder/preceding-sibling::bidder)]/interval
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) or (bidder/following::bidder and bidder/preceding::bidder)]/interval
\ No newline at end of file
--- /dev/null
+doc()/site/people/person[profile/age >= 18 and profile/@income < 10000 and address/city != 'Dallas']/name
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[bidder/increase = current]/interval
\ No newline at end of file
--- /dev/null
+doc()/site/people/person[profile/@income = /site/open_auctions/open_auction/current]/name
\ No newline at end of file
--- /dev/null
+doc()/site/people/person[watches/watch/id(@open_auction)/seller/@person = @id]/name
\ No newline at end of file
--- /dev/null
+doc()/id('person0')/name
\ No newline at end of file
--- /dev/null
+doc()/site/people/person/watches/watch/id(@open_auction)/interval
\ No newline at end of file
--- /dev/null
+doc()/site/people/person[watches/watch/id(@open_auction)/itemref/id(@item)/parent::australian]/name
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[(count(bidder) mod 2) = 0]/interval
\ No newline at end of file
--- /dev/null
+doc()/(count(//text) + count(//bold) + count(//emph) + count(//keyword))
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[sum(bidder/increase) > 10 * initial]/interval
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[sum(bidder/increase) != (current - initial)]/interval
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[bidder and (sum(bidder/increase) div count(bidder)) > 2 * initial]/interval"
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction[number(bidder[1]/increase) < number(bidder[floor((last() + 1) div 2)]/increase) and number(bidder[floor((last() + 1) div 2)]/increase) < number(bidder[last()]/increase)]/interval
\ No newline at end of file
--- /dev/null
+doc()/site/regions/europe/item/description/descendant::keyword[last()]
\ No newline at end of file
--- /dev/null
+doc()//keyword/ancestor::listitem[1]/text/keyword
\ No newline at end of file
--- /dev/null
+doc()/site/open_auctions/open_auction/bidder[number(preceding-sibling::bidder[1]/increase) <= number(increase) and number(increase) <= number(following-sibling::bidder[1]/increase)]
\ No newline at end of file
--- /dev/null
+doc()/site/regions/*/item[preceding::item[100] and following::item[100]]/name
\ No newline at end of file
--- /dev/null
+doc()/site/regions/*/item[contains(description, name)]/name
\ No newline at end of file
--- /dev/null
+doc()/site/regions/*/item[contains(substring-before(description, 'eros'), 'passion') and contains(substring-after(description, 'eros'), 'dangerous')]/name
\ No newline at end of file
--- /dev/null
+doc()/site/regions/*/item[string-length(translate(normalize-space(description),' ','')) > 10000]/name
\ No newline at end of file
--- /dev/null
+declare namespace fun = 'have.more.fun';
+
+declare function fun:closure($input as node()*, $result as node()*) as node()*
+{
+ let $current := $input/following-sibling::bidder[position()=1 and number(increase) <= 10]
+ let $new := $current except $result
+ let $all := ($result,$new)
+
+ return
+ if(exists($new))
+ then ($new, fun:closure($new,$all))
+ else ()
+};
+
+doc()//bidder[number(increase) <= 10 and (following-sibling::bidder[position()=1 and number(increase) > 10] or fun:closure(.,())/following-sibling::bidder[position()=1 and number(increase) > 10])]
\ No newline at end of file
--- /dev/null
+declare namespace fun = 'have.more.fun';
+
+declare function fun:closure($input as node()*, $result as node()*) as node()*
+{
+ let $current := $input/preceding-sibling::bidder[position()=1 and number(increase) <= 10]
+ let $new := $current except $result
+ let $all := ($result,$new)
+
+ return
+ if(exists($new))
+ then ($new, fun:closure($new,$all))
+ else ()
+};
+
+doc()//bidder[number(increase) <= 10 and (preceding-sibling::bidder[position()=1 and number(increase) > 10] or fun:closure(.,())/preceding-sibling::bidder[position()=1 and number(increase) > 10])]
\ No newline at end of file
--- /dev/null
+declare namespace fun = 'have.more.fun';
+
+declare function fun:closure($input as node()*, $result as node()*) as node()*
+{
+ let $current := $input/parlist/listitem/parlist/listitem
+ let $new := $current except $result
+ let $all := ($result,$new)
+
+ return
+ if(exists($new))
+ then ($new, fun:closure($new,$all))
+ else ()
+};
+
+doc()//listitem[text/keyword or fun:closure(.,())/text/keyword]/text/keyword
\ No newline at end of file
--- /dev/null
+declare namespace fun = 'have.more.fun';
+
+declare function fun:closure($input as node()*, $result as node()*) as node()*
+{
+ let $current := $input/seller/id(@person)/watches/watch/id(@open_auction)
+ let $new := $current except $result
+ let $all := ($result,$new)
+
+ return
+ if(exists($new))
+ then ($new, fun:closure($new,$all))
+ else ()
+};
+
+doc()/site/open_auctions/open_auction[position() <= 5]/fun:closure(.,())/interval
--- /dev/null
+declare namespace fun = 'have.more.fun';
+
+declare function fun:closure($input as node()*, $result as node()*) as node()*
+{
+ let $current := $input/watches/watch/id(@open_auction)/bidder/personref/id(@person)
+ let $new := $current except $result
+ let $all := ($result,$new)
+
+ return
+ if(exists($new))
+ then ($new, fun:closure($new,$all))
+ else ()
+};
+
+doc()/site/people/person[position() <= 5]/fun:closure(.,())/name
--- /dev/null
+doc()/site/people/person[1]/idref(@id)/..
\ No newline at end of file
--- /dev/null
+declare namespace fun = 'have.more.fun';
+
+declare function fun:closure($input as node()*, $result as node()*) as node()*
+{
+ let $current := ($input | doc()//edge[@from = $input]/@to)
+ let $new := $current except $result
+ let $all := ($result,$new)
+
+ return
+ if(exists($new))
+ then ($new, fun:closure($new,$all))
+ else ()
+};
+
+doc()//category[@id="category0"]/@id/fun:closure(.,())/id(.)/name
\ No newline at end of file
--- /dev/null
+declare namespace fun = 'have.more.fun';
+
+declare function fun:closure($input as node()*, $result as node()*) as node()*
+{
+ let $current := $input/idref(.)[name() = "from"]/../@to
+ let $new := $current except $result
+ let $all := ($result,$new)
+
+ return
+ if(exists($new))
+ then ($new, fun:closure($new,$all))
+ else ()
+};
+
+doc()//category[@id="category0"]/@id/fun:closure(.,())/id(.)/name
--- /dev/null
+doc()/site/regions
--- /dev/null
+doc()/site/regions/*/item[mailbox/mail/from]/mailbox/mail
--- /dev/null
+doc()/site/regions/*/item[mailbox/mail/from]//keyword
--- /dev/null
+doc()//keyword/ancestor::listitem/parent::parlist
--- /dev/null
+doc()//keyword/ancestor::listitem
--- /dev/null
+doc()//keyword/ancestor-or-self::mail
--- /dev/null
+doc()/site/closed_auctions
--- /dev/null
+doc()/site/regions/europe/item/mailbox/mail/text/keyword
--- /dev/null
+doc()/site/closed_auctions/close_auction/annotation/description/parlist/listitem
--- /dev/null
+doc()/site/closed_auctions/close_auction/annotation/description/parlist/listitem/parlist/listitem/*//keyword
--- /dev/null
+doc()/site/regions/*/item
--- /dev/null
+doc()/descendant-or-self::listitem/descendant-or-self::keyword
--- /dev/null
+doc()/site/regions/*/item//keyword
--- /dev/null
+doc()/site/people[address and (name or homepage)]
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/closed_auctions/closed_auction/annotation/description/text/keyword"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="//closed_auction//keyword"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/closed_auctions/closed_auction//keyword"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/closed_auctions/closed_auction[annotation/description/text/keyword]/date"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/closed_auctions/closed_auction[descendant::keyword]/date"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person[profile/gender and profile/age]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person[phone or homepage]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person[address and (phone or homepage) and (creditcard or profile)]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/regions/*/item[parent::namerica or parent::samerica]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) and (bidder/following::bidder and bidder/preceding::bidder)]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="//keyword/ancestor::listitem/text/keyword"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction/bidder[following-sibling::bidder]"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction/bidder[preceding-sibling::bidder]"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/regions/*/item[following::item]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/regions/*/item[preceding::item]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="//person[profile/@income]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[bidder and not(bidder/preceding-sibling::bidder)]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[(not(bidder/following::bidder) or not(bidder/preceding::bidder)) or (bidder/following::bidder and bidder/preceding::bidder)]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person[profile/age >= 18 and profile/@income < 10000 and address/city != 'Dallas']/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[bidder/increase = current]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person[profile/@income = /site/open_auctions/open_auction/current]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person[watches/watch/id(@open_auction)/seller/@person = @id]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="id('person0')/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person/watches/watch/id(@open_auction)/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/people/person[watches/watch/id(@open_auction)/itemref/id(@item)/parent::australian]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[(count(bidder) mod 2) = 0]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="count(//text) + count(//bold) + count(//emph) + count(//keyword)"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[sum(bidder/increase) > 10 * initial]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[sum(bidder/increase) != (current - initial)]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[bidder and (sum(bidder/increase) div count(bidder)) > 2 * initial]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction[number(bidder[1]/increase) < number(bidder[floor((last() + 1) div 2)]/increase) and number(bidder[floor((last() + 1) div 2)]/increase) < number(bidder[last()]/increase)]/interval"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/regions/europe/item/description/descendant::keyword[last()]"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="//keyword/ancestor::listitem[1]/text/keyword"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/open_auctions/open_auction/bidder[number(preceding-sibling::bidder[1]/increase) <= number(increase) and number(increase) <= number(following-sibling::bidder[1]/increase)]"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/regions/*/item[preceding::item[100] and following::item[100]]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/regions/*/item[contains(description, name)]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="site/regions/*/item[contains(substring-before(description, 'eros'), 'passion') and contains(substring-after(description, 'eros'), 'dangerous')]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <xsl:copy-of select="/site/regions/*/item[string-length(translate(normalize-space(description),' ','')) > 10000]/name"/>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
--- /dev/null
+#!/bin/sh
+
+DISPLAY=0
+case "$1" in
+ [A-Z])
+ SERIE="$1";;
+ [A-Z][0-9]*)
+ DISPLAY=1
+ SERIE="$1";;
+ *)
+ SERIE="";;
+esac
+
+
+for i in xpath-pt/xpath/$SERIE*
+do
+querybase=`basename "$i" .xpl`
+query=`cat $i`
+
+xqueryorig="xpath-pt/xquery/$querybase".xql
+cat $xqueryorig | sed -e "s/doc()/doc(\"xmark_tiny.xml\")/g" >tmp.xql
+../main xmark_tiny.xml "$query" results/"$querybase".sxsi
+saxonb-xquery -o:results/"$querybase".saxon tmp.xql
+echo >> results/"$querybase".saxon
+diff -w results/"$querybase".sxsi results/"$querybase".saxon >/dev/null || echo $querybase gives different results
+done
+
+if [ "$DISPLAY" = "1" ]
+then
+./show.sh "$SERIE"
+fi
+