Skip to content

Commit 807b3e1

Browse files
disallow whitespace in wildcards (#2630)
1 parent 2a0eded commit 807b3e1

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

basex-core/src/main/java/org/basex/query/QueryParser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2459,6 +2459,7 @@ private ExprInfo simpleNodeTest(final Kind kind, final boolean all) throws Query
24592459
} else {
24602460
NameTest.Scope scope = NameTest.Scope.FULL;
24612461
if(!name.hasPrefix()) {
2462+
pos = p;
24622463
if(consume(":*")) {
24632464
// name test: prefix:*
24642465
name = new QNm(concat(name.string(), cpToken(':')));

basex-core/src/test/java/org/basex/query/simple/SimpleTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ public final class SimpleTest extends QueryTest {
178178
{ "Path 1", emptySequence(), "<a/>[./(@*)]" },
179179
{ "Path 2", strings("A", "B"), "<_><x><x>A</x>B</x></_>//x/node()[last()] ! string()" },
180180
{ "Path 3", integers(2, 2), "<a><b/><b/></a>/b/last()" },
181+
{ "Path 4", "<local:a/>/self::local :*" },
181182

182183
{ "Cast 1", integers(1), "xs:integer('+1')" },
183184
{ "Cast 2", "xs:integer('++1')" },

0 commit comments

Comments
 (0)