- From: <bugzilla@wiggum.w3.org>
- Date: Thu, 15 Jun 2006 19:53:36 +0000
- To: public-qt-comments@w3.org
- CC:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3165 mike@saxonica.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from mike@saxonica.com 2006-06-15 19:53 ------- The Working Group discussed this on 14 June 2006 and decided to add a new interrogative function. Colin, could you please confirm that this is an acceptable resolution. The function will appear in a new section 18.1.4 as follows: 18.1.1 Testing Availability of Types 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. type-available($type-name as xs:string) as xs:boolean A schema type (that is, a simple type or a complex type) is said to be available within an XPath expression if it is a type definition that is present in the in-scope schema componentsXP for that expression (see 5.4.1 Initializing the Static Context). This includes built-in types, types imported using <elcode>xsl:import-schema</elcode>, and extension types defined by the implementation. The value of the $type-name argument must be a string containing a lexical QName. The lexical QName is expanded into an expanded-QName using the namespace declarations in scope for the expression. If the lexical QName is unprefixed, then the default namespace is used in the expanded QName. The function returns true if and only if there is an available type whose name matches the value of the $type-name argument. [ERR XTDE1425] It is a non-recoverable dynamic error if the argument does not evaluate to a string that is a valid QName, or if there is no namespace declaration in scope for the prefix of the QName. If the processor is able to detect the error statically (for example, when the argument is supplied as a string literal), then the processor may optionally signal this as a static error.
Received on Thursday, 15 June 2006 19:53:47 UTC