Project

Profile

Help

Bug #6130

closed

No error is reported for `schema-element(*:foo)`

Added by Michael Kay over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Features new in 4.0
Sprint/Milestone:
-
Start date:
2023-07-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

If 4.0 syntax is enabled, Saxon incorrectly accepts the forms schema-element(*:foo) and schema-element(foo:*) (but correctly rejects schema-element(*)). Ditto for schema-attribute(...).

Actions #1

Updated by Michael Kay over 1 year ago

In fact, on the 12.x branch, the expression

{<a/> instance of schema-element(*:a)}

fails with

java.lang.IllegalArgumentException: Primary item type must not be null
	at net.sf.saxon.expr.InstanceOfExpression.<init>(InstanceOfExpression.java:45)

That is, the schema-element test is parsed without error, but the resulting SequenceType is unusable.

Actions #2

Updated by Michael Kay over 1 year ago

  • Category set to Features new in 4.0
  • Status changed from New to Resolved
  • Priority changed from Low to Normal
  • Applies to branch 11, 12, trunk added
  • Fix Committed on Branch 11, 12, trunk added
  • Platforms .NET, Java added

It seems that on 11.x, the incorrect syntax produces a test that matches everything; on 12.x, it produces a test that crashes when evaluated.

Fixed on both branches (the code is rather different in the two cases).

Actions #3

Updated by Debbie Lockett over 1 year ago

  • % Done changed from 0 to 50
  • Fixed in Maintenance Release 11.6 added

Bug fix applied in the Saxon 11.6 maintenance release.

Actions #4

Updated by O'Neil Delpratt about 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 50 to 100
  • Fixed in Maintenance Release 12.4 added

Bug fix applied in the Saxon 12.4 Maintenance release

Please register to edit this issue

Also available in: Atom PDF