[Bug 4696] [XSLT 2.0] type-available() in use-when

http://www.w3.org/Bugs/Public/show_bug.cgi?id=4696

           Summary: [XSLT 2.0] type-available() in use-when
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


The stated intent of the type-available() function is to allow conditional
logic to be included in use-when expressions. See 18.1.4: "The type-available 
function can be used, for example with the [xsl:]use-when attribute (see 3.12
Conditional Element Inclusion), to explicitly control how a stylesheet behaves
if a particular schema type is not available in the static context."

The function returns true if the type is present in the in-scope schema type
definitions for that expression.

However, the static context for a use-when expression (3.12) contains only "The
type definitions that would be available in the absence of any
xsl:import-schema  declaration" - that is, it contains no user-defined types.

This essentially makes the function (a very late addition to the spec) useless.

Received on Friday, 22 June 2007 20:46:56 UTC