Bug #4546

Bad location information when @use-when expression in an imported module has a syntax error

Added by Norman Tovey-Walsh over 1 year ago. Updated 11 months ago.

Start date:
Due date:
% Done:


Estimated time:
Legacy ID:
Applies to branch:
10, 9.9
Fix Committed on Branch:
10, 9.9
Fixed in Maintenance Release:


Hi Mike,

If you run the attached stylesheet, you'll get a message like this:

Static error on line 9 column 32 of driver.xsl:
  XPST0003  Unmatched quote in expression
Unmatched quote in expression

The actual error is the missing quote in use-when on line 10 of module.xsl

I had to binary search my module to find the error :-)

driver.xsl (580 Bytes) driver.xsl Norman Tovey-Walsh, 2020-05-07 12:27
module.xsl (435 Bytes) module.xsl Norman Tovey-Walsh, 2020-05-07 12:27


#1 Updated by Michael Kay over 1 year ago

Appears to be a side-effect of the fix for bug 2244 (yes, that's November 2014).

Fixed by changing the catch block in UseWhenFilter.processIncludeImport() to use err.maybeSetLocation() instead of err.setLocation().

Confirmed that we still get a sensible error message when the xsl:import has a bad @href, which was the subject of the original bug.

#2 Updated by Michael Kay over 1 year ago

  • Subject changed from Unhelpful error message to Bad location information when @use-when expression in an imported module has a syntax error
  • Category set to Diagnostics
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal
  • Applies to branch 10, 9.9 added
  • Fix Committed on Branch 10, 9.9 added

#3 Updated by O'Neil Delpratt over 1 year ago

  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.1 added

Bug fix committed in the Saxon 10.1 maintenance release.

#4 Updated by O'Neil Delpratt 11 months ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 10.2, added
  • Fixed in Maintenance Release deleted (10.1)

Bug fix applied on the Saxon maintenance release.

Please register to edit this issue

Also available in: Atom PDF