As defined in the XSLT specification, in section 2.5 :
An element enables forwards-compatible mode for itself, its attributes, its descendants and their attributes if either it is an xsl:stylesheet element whose version attribute is not equal to 1.0. (...)
(...)
If an element is processed in forwards-compatible mode, then:
- if it is an element in a template and XSLT 1.0 does not allow such elements to occur in templates, then if the element is not instantiated, an error must not be signaled, and if the element is instantiated, the XSLT must perform fallback for the element as specified in [15 Fallback];
This document contains the following XSLT stylesheet appended:
]]>
If your browser supports XSLT, and you are reading this document, then
your browser performed fallback for the unknown element undefined
in the first template, as expected, and ignored the unknown element undefined
,
in the second template, because the later wasn't instantiated,
therefore conforming to rule two of forward compatible processing. Otherwise you would have
seen a XSLT processing error.