This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
From the minutes of 29 Jun 2007: Perhaps just add a note pointing out that user-defined types are not available (and so the function is not as useful as one might want)? Or a possible approach to a solution is that if module A imports a schema S, and then imports/includes module B, then the user-defined types of schema S are available for inspection within module B. Need to check how disruptive this would be to implementors.
The actual use case which drove the addition was the then inability to know if types such as xs:int were available to a basic XSLT processor. Adding the function solved that problem, so it is not useless.
Decision on 19/7/2007 - we will essentially leave the spec as it is, and change the wording around it to make it clear what you can and can't achieve by using this facility.
M Kay to re-phrase descriptive text. Keep type-available() function as written. Descriptive text fixed as erratum E15