[Bug 28850] New: New function "default-language()" provides the default language

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28850

            Bug ID: 28850
           Summary: New function "default-language()" provides the default
                    language
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: enhancement
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: markus@headcrashing.eu
        QA Contact: public-qt-comments@w3.org

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.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 25 June 2015 19:50:45 UTC