This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Abstract The intent of this issue is to propose a new function "default-language()" to be added to this specification. Justification Version 3.0 of the specification added several functions which take respect of the default language at time of execution. The format-date and format-integer functions for example have versions that use the default language in case no explicit language is provided. The XPath language allows to provide user defined functions, and is also able to invoke user defined functions defined in XSLT. There might exist cases when users or library vendors author user defined functions having a need to know the default language. For example, a user defined function could format phone numbers according to local formatting rules. Also loading of translated string literals is a valid example for the need of knowing the default language. Currently there is no standard way for a user defined function to learn about the default language. Hence it makes sense to provide a "default-language()" function which taks no argument but returns a language token string in exactly that form that also is accepted by the existing format-date and format-integer functions.
Many thanks for raising this. There is a strong presumption against adding new functionality during the Candidate Recommendation phase, but you have provided a good justification of the requirement. The WG will consider the request.
The Working Group has considered this request, and will add the function.
The function is now in the spec.