Donate Share

Saxon XSLT and XQuery Processor

Tracker: Bugs

5 Conflicts in xsl:strip-space - ID: 641948
Last Update: Comment added ( mhkay )

XSLT 1.0 (see erratum 30) says that it is a recoverable
error to have two xsl:strip-space or xsl:preserve-space
declarations that match the same element. Previous
releases of Saxon took the recovery action: no error
was reported. Saxon 7.3 detects the error, and falls
over with a NullPointerException trying to report it.
Further, if Crimson is being used as the XML parser,
this NullPointerException is not actually reported,
because of bug 941940. All that happens is the single
line message "Transformation failed - run-time errors
were reported".

The NullPointerException occurs in method
reportAmbiguity of class net.sf.saxon.trans.Mode, while
trying to call Navigator.getPath. This doesn't work
because the element node used for strip-space testing
is a dummy node, and doesn't support all the properties
of a real node. Also, the patterns used for strip-space
testing have no location information, so the line
number and system ID are wrong.

Previous releases avoided the problem as an accidental
consequence of the fact that no ambiguity was reported
in the case of two patterns having the same line number
(which was taken to mean that they were probably
components of a union pattern in the same template rule).


Michael Kay ( mhkay ) - 2002-11-21 15:59

5

Closed

Fixed

Michael Kay

XSLT conformance

v7.3

Public


Comments ( 2 )

Date: 2002-12-10 15:47
Sender: mhkayProject Admin

Logged In: YES
user_id=251681

Fixed in 7.3.1


Date: 2002-11-21 16:21
Sender: mhkayProject Admin

Logged In: YES
user_id=251681

Source code fixed.

Test case added: whte19


Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
close_date 2002-12-10 15:45 2002-12-10 15:47 mhkay
status_id Open 2002-12-10 15:45 mhkay
resolution_id None 2002-12-10 15:45 mhkay
close_date - 2002-12-10 15:45 mhkay