Actions
Bug #6476
closed![Author: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
XPathParser.parseNamespaceTest()
Start date:
2024-07-10
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
12
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Java
Description
This bug may be symptomless - I encountered it during development of Saxon 13 and I don't know if the relevant code is executed in previous releases.
XPathParser.makeNamespaceTest()
contains the code:
if (prefix.startsWith("Q{")) {
String uri = prefix.substring(2, prefix.length() - 2);
return new NamespaceTest(pool, nodeKind, NamespaceUri.of(uri));
}
This truncates the last character of the URI. It should be prefix.length() - 1
.
Updated by Michael Kay 6 days ago
On investigation, it seems that in 12.x the string passed as prefix is actually in the form Q{uri}*
including the trailing *
, so -2 is correct. I hit the problem in 13.x because I was calling it without the trailing *
.
Updated by Michael Kay 6 days ago
- Status changed from New to Resolved
- Applies to branch 12 added
- Platforms Java added
Committed an improvement to the Javadoc on the 12.x branch; no code change.
Please register to edit this issue
Actions