| # | XPath | Result | Test | XPath DOM result | Note |
|---|
| 1 | / | TestBean(root) | ok | [#document: null] | |
| 2 | . | TestBean(root) | ok | [#document: null] | |
| 3 | /. | TestBean(root) | ok | [#document: null] | |
| 4 | //. | TestBean(root) | ok | [#document: null] | |
| 5 | /./. | TestBean(root) | ok | [#document: null] | |
| 6 | /././. | TestBean(root) | ok | [#document: null] | |
| 7 | /./*/../. | TestBean(root) | ok | [#document: null] | |
| 8 | * | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 9 | */. | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 10 | /* | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 11 | //* | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 12 | @* | root | ok | --no match-- | |
| 13 | @*/. | root | ok | --no match-- | |
| 14 | /@* | root | ok | --no match-- | |
| 15 | //@* | root | ok | beanName="root" | |
| 16 | node() | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 17 | /node() | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 18 | //node() | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 19 | text() | {null} | ok | --no match-- | |
| 20 | /text() | {null} | ok | --no match-- | |
| 21 | //text() | {null} | ok | [#text:
] | |
| 22 | //*/text() | {null} | ok | [#text:
] | |
| 23 | integer | 13 | ok | --no match-- | |
| 24 | /integer | 13 | ok | --no match-- | |
| 25 | //integer | 13 | ok | <integer>13</integer> | |
| 26 | @integer | 13 | ok | --no match-- | |
| 27 | /@integer | 13 | ok | --no match-- | |
| 28 | /*/integer | 27 | ok | <integer>13</integer> | |
| 29 | /*/@integer | 27 | ok | --no match-- | |
| 30 | Integer | {null-or-not-found-jxpathexception} | ok | --no match-- | |
| 31 | string | ciao | ok | --no match-- | |
| 32 | /string | ciao | ok | --no match-- | |
| 33 | //string | ciao | ok | <string>ciao</string> | |
| 34 | String | {null-or-not-found-jxpathexception} | ok | --no match-- | |
| 35 | //string[0] | {null} | ok | --no match-- | |
| 36 | //string[1] | ciao | ok | <string>ciao</string> | |
| 37 | descendant-or-self::string[1] | ciao | ok | <string>ciao</string> | |
| 38 | //string[2] | {null} | ok | --no match-- | |
| 39 | //string[3] | {null} | ok | --no match-- | |
| 40 | //zlast | last | ok | <zlast>last</zlast> | |
| 41 | //integer[0] | {null} | ok | --no match-- | |
| 42 | //integer[1] | 13 | ok | <integer>13</integer> | |
| 43 | //integer[2] | {null} | ok | --no match-- | One could expect 27 but also Xalan return null, see 47 |
| 44 | //integer[3] | {null} | ok | --no match-- | |
| 45 | /descendant-or-self::node()/child::integer[0] | {null} | ok | --no match-- | Full version of //integer[0] |
| 46 | /descendant-or-self::node()/child::integer[1] | 13 | ok | <integer>13</integer> | Full version of //integer[1] |
| 47 | /descendant-or-self::node()/child::integer[2] | {null} | ok | --no match-- | Expanded version of //integer[2], |
| 48 | descendant-or-self::integer[0] | 13 | Expected null | --no match-- | Hmm..here zero index should be null (or exception ?) |
| 49 | descendant-or-self::integer[1] | 13 | ok | <integer>13</integer> | |
| 50 | descendant-or-self::integer[2] | 27 | ok | <integer>27</integer> | Here is 27 |
| 51 | /descendant-or-self::integer[1] | 13 | ok | <integer>13</integer> | |
| 52 | /descendant-or-self::integer[2] | 27 | ok | <integer>27</integer> | |
| 53 | //descendant-or-self::integer[1] | 13 | ok | <integer>13</integer> | |
| 54 | //descendant-or-self::integer[2] | 27 | ok | <integer>27</integer> | |
| 55 | */ancestor-or-self::integer[1] | 13 | ok | --no match-- | |
| 56 | //ancestor-or-self::integer[1] | 13 | ok | <integer>13</integer> | |
| 57 | //ancestor-or-self::integer[2] | {null} | ok | --no match-- | |
| 58 | */*/ancestor-or-self::integer[1] | 27 | ok | <integer>13</integer> | |
| 59 | //*[0] | {null} | ok | --no match-- | |
| 60 | //*[1] | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 61 | //*[2] | 13 | ok | <string>ciao</string> | |
| 62 | //*[3] | ciao | ok | <testBean beanName='child'>
27
</testBean> | |
| 63 | //*[4] | TestBean(child) | ok | <zlast>last</zlast> | |
| 64 | //*[5] | last | ok | --no match-- | Here one could expect string 'child' but.. also xalan does not include 'child' and 27 so 'last' is ok |
| 65 | //*[6] | {null} | ok | --no match-- | |
| 66 | //*[7] | {null} | ok | --no match-- | |
| 67 | //*[8] | {null} | ok | --no match-- | here over limit is null |
| 68 | //node()[0] | {null} | ok | --no match-- | |
| 69 | //node()[1] | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 70 | //node()[2] | 13 | ok | <integer>13</integer> | |
| 71 | //node()[3] | ciao | ok | [#text:
] | |
| 72 | //node()[4] | TestBean(child) | ok | <string>ciao</string> | |
| 73 | //node()[5] | last | ok | [#text:
] | |
| 74 | //node()[6] | {null} | ok | <testBean beanName='child'>
27
</testBean> | |
| 75 | //node()[7] | {null} | ok | [#text:
] | |
| 76 | //node()[8] | {null} | ok | <zlast>last</zlast> | |
| 77 | descendant-or-self::node()[0] | TestBean(root) | Expected null | --no match-- | Hmm... here ? [0] returns root ?? |
| 78 | descendant-or-self::node()[1] | TestBean(root) | ok | [#document: null] | |
| 79 | descendant-or-self::node()[2] | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 80 | descendant-or-self::node()[3] | 13 | ok | [#text:
] | |
| 81 | descendant-or-self::node()[4] | ciao | ok | <integer>13</integer> | |
| 82 | descendant-or-self::node()[5] | TestBean(child) | ok | [#text: 13] | |
| 83 | descendant-or-self::node()[6] | child | ok | [#text:
] | |
| 84 | descendant-or-self::node()[7] | 27 | ok | <string>ciao</string> | |
| 85 | descendant-or-self::node()[8] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but last | [#text: ciao] | Not sure why here (for bean) throws exception or is null, probably because in the 'scheme' there is the property but no value |
| 86 | descendant-or-self::node()[9] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but null | [#text:
] | Not sure why here (for bean) throws exception, see up |
| 87 | descendant-or-self::node()[10] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but null | <testBean beanName='child'>
27
</testBean> | |
| 88 | descendant-or-self::node()[11] | last | Expected null | [#text:
] | |
| 89 | descendant::node()[0] | root | Expected null | --no match-- | Hmm... here ? [0] returns root ?? |
| 90 | descendant::node()[1] | root | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 91 | descendant::node()[2] | 13 | ok | [#text:
] | |
| 92 | descendant::node()[3] | ciao | ok | <integer>13</integer> | |
| 93 | descendant::node()[4] | TestBean(child) | ok | [#text: 13] | |
| 94 | descendant::node()[5] | child | ok | [#text:
] | |
| 95 | descendant::node()[6] | 27 | ok | <string>ciao</string> | |
| 96 | descendant::node()[7] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but last | [#text: ciao] | Not sure why here (for bean) throws exception or is null, probably because in the 'scheme' there is the property but no value |
| 97 | descendant::node()[8] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but null | [#text:
] | Not sure why here (for bean) throws exception, see up |
| 98 | descendant::node()[9] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but null | <testBean beanName='child'>
27
</testBean> | |
| 99 | descendant::node()[10] | last | Expected null | [#text:
] | |
| 100 | descendant::node()[11] | {null} | ok | <integer>27</integer> | |
| 101 | descendant-or-self::*[0] | TestBean(root) | Expected null | --no match-- | Hmm... here ? [0] returns root ?? |
| 102 | descendant-or-self::*[1] | TestBean(root) | ok | <testBean beanName='root'>
13
ciao
27
last
</testBean> | |
| 103 | descendant-or-self::*[2] | root | ok | <integer>13</integer> | |
| 104 | descendant-or-self::*[3] | 13 | ok | <string>ciao</string> | |
| 105 | descendant-or-self::*[4] | ciao | ok | <testBean beanName='child'>
27
</testBean> | |
| 106 | descendant-or-self::*[5] | TestBean(child) | ok | <integer>27</integer> | |
| 107 | descendant-or-self::*[6] | child | ok | <zlast>last</zlast> | |
| 108 | descendant-or-self::*[7] | 27 | ok | --no match-- | |
| 109 | descendant-or-self::*[8] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but last | --no match-- | Not sure why here (for bean) throws exception or is null, probably because in the 'scheme' there is the property but no value |
| 110 | descendant-or-self::*[9] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but null | --no match-- | Not sure why here (for bean) throws exception, see up |
| 111 | descendant-or-self::*[10] | {not-found-jxpathexception} | NO EXCEPTION EXPECTED but null | --no match-- | |
| 112 | descendant-or-self::*[11] | last | Expected null | --no match-- | |