<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>2448</bug_id>
          
          <creation_ts>2005-11-04 10:03:26 +0000</creation_ts>
          <short_desc>[F&amp;O] Clarification for semantics of upper-case() and lower-case()</short_desc>
          <delta_ts>2006-03-04 18:12:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>Functions and Operators 1.0</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Colin Adams">colin</reporter>
          <assigned_to name="Ashok Malhotra">ashok.malhotra</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>7027</commentid>
    <comment_count>0</comment_count>
    <who name="Colin Adams">colin</who>
    <bug_when>2005-11-04 10:03:26 +0000</bug_when>
    <thetext>I am not totally clear on the semantics of upper-case() and lower-case().
Are they suppose to implement full case mappings (as is strongly suggested by:
&quot;Case mappings may change the length of a string.&quot;), or simple case mappings?
It would be nice to explicitly say that the full default mappings must be used.

It think it would also be good to add a warning that
lower-case ($A) eq lower-case ($B) is not a true case-insensitive comparison
(for that we would need a fold-case() function, but I&apos;m not suggesting taht be
added for 2.0 at this late stage).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8084</commentid>
    <comment_count>1</comment_count>
    <who name="Joanne Tong">joannet</who>
    <bug_when>2006-02-01 15:34:56 +0000</bug_when>
    <thetext>The XSL and XQuery working group discussed this issue on Feb 1, 2006 and 
accepted the following proposed text for fn:upper-case (and similarly for 
fn:lower-case):

Summary: Returns the value of $arg after translating every character to 
its upper-case correspondent as defined &lt;new&gt;in the appropriate case 
mappings section&lt;/new&gt; in the Unicode standard [The Unicode Standard]. 
&lt;new&gt;For versions of Unicode beginning with 2.1.8 update, only 
locale-insensitive case mappings should be applied.  Beginning with 
version 3.2.0 (and likely future versions) of Unicode, precise mappings 
are described in default case operations, which is case mappings in the 
absence of tailoring for particular languages and environments.&lt;/new&gt; 
Every lower-case character that does not have an upper-case correspondent, 
as well as every upper-case character, is included in the returned value 
in its original form. 

Note that the last sentence differ from the CR draft due to another comment 
that was accepted by the working groups.

Regarding your suggestion to add a warning that lower-case ($A) eq lower-case 
($B) is not a true case-insensitive comparison, the working groups felt that 
such details should be left to the Unicode specification.

Thank-you for raising this comment.  Please let us know within one week if the 
proposed text is acceptable.

Joanne</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8099</commentid>
    <comment_count>2</comment_count>
    <who name="Ashok Malhotra">ashok.malhotra</who>
    <bug_when>2006-02-02 00:09:50 +0000</bug_when>
    <thetext>The joint WGs decided to close this issue on 2006-02-01 by implementing wording
suggested by Joanne Tong and Jim Melton.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8102</commentid>
    <comment_count>3</comment_count>
    <who name="Joanne Tong">joannet</who>
    <bug_when>2006-02-02 13:47:30 +0000</bug_when>
    <thetext>Comment from Colin Adams:

I&apos;m still not entirely happy with the wording. This phrase:

&quot; Beginning with 
version 3.2.0 (and likely future versions) of Unicode, precise mappings 
are described in default case operations, which is case mappings in the 
absence of tailoring for particular languages and environments.&quot;

In fact, two mappings are described - simple mappings in which the
string length doesn&apos;t change), and full mappings (in which the string
length can change). Both apply &quot; in the absence of tailoring for
particular languages and environments&quot;. 
The simple mappings are only intended for use in legacy applications
that cannot cope with string-length changes (it says this somewhere in
the standard).

Your wording leaves open the possibility of either mapping being used, I
think. If that is intended, then it is implementation defined or
dependent behaviour.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8445</commentid>
    <comment_count>4</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2006-02-24 21:50:29 +0000</bug_when>
    <thetext>Colin, thanks for your pushback; it forced us to re-read the Unicode material
dealing with case conversions.  I think that we can satisfy both the Working
Groups&apos; intent and your last concern by inserting the word &quot;full&quot; as follows:

&quot;Beginning with version 3.2.0 (and likely future versions) of Unicode, precise
mappings are described in default case operations, which are full case mappings
in the absence of tailoring for particular languages and environments.&quot;

I believe that change requires implementations of these two functions to use
both UnicodeData.txt and SpecialCasing.txt, but without application of a
&quot;higher-level protocol&quot; that would invoke tailoring for &quot;particular languages
and environments&quot;.  And *that*, I&apos;m virtually positive, satisfies the intent of
the Working Groups for these functions. 

Would you be so kind as to respond to this note indicating your level of comfort
with that solution? 

This is a PERSONAL opinion only and has not been approved by the Working Groups. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8452</commentid>
    <comment_count>5</comment_count>
    <who name="Colin Adams">colin</who>
    <bug_when>2006-02-25 08:35:41 +0000</bug_when>
    <thetext>I&apos;m very happy with your proposed wording, Jim.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8545</commentid>
    <comment_count>6</comment_count>
    <who name="Jim Melton">jim.melton</who>
    <bug_when>2006-03-04 00:22:57 +0000</bug_when>
    <thetext>Colin, thanks for your confirmation that our proposed wording resolves your
concern.  We would be grateful if you would explicitly change the status of the
bug to CLOSED.  Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>