#978 xsl:copy when context item is undefined

v9.2
closed
Michael Kay
5
2012-10-08
2009-09-15
Michael Kay
No

If xsl:copy is used when the context item is undefined (for example, within xsl:function), then (a) if it is known statically that the context item is undefined, Saxon fails at compile time with a NullPointerException during the optimize() phase of processing; (b) if the situation is not known statically, xsl:copy is a null operation: it completes without error.

The XSLT 2.0 specification is not explicit about this situation. In the W3C bugzilla entry 7624 I have proposed adding a new error code XTTE0945, and a patch is being raised in Subversion for the 9.2 and 9.1 branches that has this effect. Test cases copy903err and copy904err have been submitted to the W3C test suite to test the static and dynamic cases respectively.

Discussion

  • Michael Kay
    Michael Kay
    2009-10-22

    Fixed in 9.2.0.3

     
  • Michael Kay
    Michael Kay
    2009-10-29

    Also fixed in 9.1.0.8