|
| 1 | +(: |
| 2 | + : eXist-db Open Source Native XML Database |
| 3 | + : Copyright (C) 2001 The eXist-db Authors |
| 4 | + : |
| 5 | + |
| 6 | + : http://www.exist-db.org |
| 7 | + : |
| 8 | + : This library is free software; you can redistribute it and/or |
| 9 | + : modify it under the terms of the GNU Lesser General Public |
| 10 | + : License as published by the Free Software Foundation; either |
| 11 | + : version 2.1 of the License, or (at your option) any later version. |
| 12 | + : |
| 13 | + : This library is distributed in the hope that it will be useful, |
| 14 | + : but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | + : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 | + : Lesser General Public License for more details. |
| 17 | + : |
| 18 | + : You should have received a copy of the GNU Lesser General Public |
| 19 | + : License along with this library; if not, write to the Free Software |
| 20 | + : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 21 | + :) |
| 22 | +xquery version "3.1"; |
| 23 | + |
| 24 | +(: |
| 25 | + : Tests created for issue https://github.com/exist-db/exist/issues/2445 |
| 26 | + :) |
| 27 | +module namespace tnst="http://exist-db.org/xquery/test/no-static-typing"; |
| 28 | + |
| 29 | +import module namespace test="http://exist-db.org/xquery/xqsuite" at "resource:org/exist/xquery/lib/xqsuite/xqsuite.xql"; |
| 30 | + |
| 31 | +declare |
| 32 | + %test:assertEmpty |
| 33 | +function tnst:self-other-node-name() { |
| 34 | + <a/>[self::b] |
| 35 | +}; |
| 36 | + |
| 37 | +declare |
| 38 | + %test:assertEmpty |
| 39 | +function tnst:element-after-attribute() { |
| 40 | + <a/>/@b/c |
| 41 | +}; |
| 42 | + |
| 43 | +declare |
| 44 | + %test:assertEmpty |
| 45 | +function tnst:element-after-text() { |
| 46 | + <a/>/text()/b |
| 47 | +}; |
| 48 | + |
| 49 | +declare |
| 50 | + %test:assertEmpty |
| 51 | +function tnst:descendant-or-self-other-node-name() { |
| 52 | + <a/>[descendant-or-self::b] |
| 53 | +}; |
| 54 | + |
| 55 | +declare |
| 56 | + %test:assertEmpty |
| 57 | +function tnst:element-after-attribute() { |
| 58 | + <a/>/descendant-or-self::attribute(b)/c |
| 59 | +}; |
| 60 | + |
| 61 | +declare |
| 62 | + %test:assertEmpty |
| 63 | +function tnst:element-after-text() { |
| 64 | + <a/>/descendant-or-self::text()/b |
| 65 | +}; |
| 66 | + |
0 commit comments