Project

Profile

Help

Bug #6417

closed

Using xsl:mode on-no-match="skip" gives error Error XTDE0555 but should give XTSE0020

Added by Martin Honnen 2 months ago. Updated about 11 hours ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
XSLT Conformance
Sprint/Milestone:
Start date:
2024-05-08
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

I got sloppy when typing some XSLT 3.0 and ended up with <xsl:mode on-no-match="skip"/>. While Saxon Java just tells me

 XTSE0020  Attribute xsl:mode/@on-no-match must be
  text-only-copy|shallow-copy|deep-copy|shallow-skip|deep-skip|fail

SaxonJS (tested with 2.6/xslt3 command line) gives a very different error

Transformation failure: Error XTDE0555
  No matching template rule for document #13

I think the wrong value for on-no-match should be caught during stylesheet compilation and not as a transformation failure. And that error code XTDE0555 given seems misleading.

Minimal XSLT:

<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  version="3.0"
  exclude-result-prefixes="#all">

  <xsl:mode on-no-match="skip"/>

</xsl:stylesheet>

run with e.g. xslt3 -s:sample1.xml -xsl:test1.xsl against e.g.

<root></root>

gives

Transformation failure: Error XTDE0555
  No matching template rule for document #13
Error XTDE0555
  No matching template rule for document #13
Actions #4

Updated by Norm Tovey-Walsh about 11 hours ago

  • Status changed from New to Resolved
  • Applies to JS Branch 2, Trunk added
  • Fix Committed on JS Branch Trunk added

Fixed.

Please register to edit this issue

Also available in: Atom PDF Tracking page