[IndexedDB] Spec changes for international language support

We discussed international language support last time at the TPAC and I said I'd propose spec text for it. Please find the patch below, the changes mirror exactly the proposal described in the bug we have for tracking this:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=9903

btw - the bug is assigned to Nikunj right now but I think that's just because of an editing glitch. Nikunj please let me know if you were working on it, otherwise I'll just submit the changes once I hear some feedback from this group.

Thanks
-pablo


Left file: \IndexedDB Specs\20110217\Speclet_023_IDB_API_Asynchronous_APIs.original.html
Right file: \IndexedDB Specs\20110217\Speclet_023_IDB_API_Asynchronous_APIs.html
copy 6
add 7
            <dt>readonly attribute DOMString language</dt>
            <dd>
                On getting, this attribute MUST return the <a title="database language">language</a>
                that is configured in this database for string collation. If no collation has been
                configured for a database this value is <code>null</code> and the database will
                use binary collation.
            </dd>
copy 6
copy 6
add 24
            <dt>IDBRequest setLanguage()</dt>
            <dd>
                <p>
                This method changes the <a title="database language">language</a> used by the database
                for string collation. Note that this method must only
                be called from a <a><code>VERSION_CHANGE</code></a> <a>transaction</a> callback.
                </p>
                <p class="note">
                Changing the language in a database that already contains data typically involves reading and 
                re-writing the entire database and thus can be a time consuming operation.
                </p>
                <dl class="parameters">
                    <dt>optional DOMString language</dt>
                    <dd>The language to be used in the database specified as a language identifier as
                    described in [[!BCP47]].</dd>
                </dl>
                <dl class="exception" title="IDBDatabaseException">
                    <dt>NOT_ALLOWED_ERR</dt>
                    <dd>This method was not called from a <a><code>VERSION_CHANGE</code></a> <a>transaction</a> callback.</dd>
                    <dt>DATA_ERR</dt>
                    <dd>The language parameter contained a string that was not a valid language identifier or was a language
                    identifier not supported by the system.</dd>
                </dl>
            </dd>
copy 6



Left file: \IndexedDB Specs\20110217\Speclet_022_IDB_API_Synchronous_APIs.original.html
Right file: \IndexedDB Specs\20110217\Speclet_022_IDB_API_Synchronous_APIs.html
copy 6
add 7
            <dt>readonly attribute DOMString language</dt>
            <dd>
                On getting, this attribute MUST return the <a title="database language">language</a>
                that is configured in this database for string collation. If no collation has been
                configured for a database this value is <code>null</code> and the database will
                use binary collation.
            </dd>
copy 6
copy 6
add 24
            <dt>void setLanguage()</dt>
            <dd>
                <p>
                This method changes the <a title="database language">language</a> used by the database
                for string collation. Note that this method must only
                be called from a <a><code>VERSION_CHANGE</code></a> <a>transaction</a> callback.
                </p>
                <p class="note">
                Changing the language in a database that already contains data typically involves reading and 
                re-writing the entire database and thus can be a time consuming operation.
                </p>
                <dl class="parameters">
                    <dt>optional DOMString language</dt>
                    <dd>The language to be used in the database specified as a language identifier as
                    described in [[!BCP47]].</dd>
                </dl>
                <dl class="exception" title="IDBDatabaseException">
                    <dt>NOT_ALLOWED_ERR</dt>
                    <dd>This method was not called from a <a><code>VERSION_CHANGE</code></a> <a>transaction</a> callback.</dd>
                    <dt>DATA_ERR</dt>
                    <dd>The language parameter contained a string that was not a valid language identifier or was a language
                    identifier not supported by the system.</dd>
                </dl>
            </dd>
copy 6



Left file: \IndexedDB Specs\20110217\Speclet_020_IDB_API_Constructs.original.html
Right file: \IndexedDB Specs\20110217\Speclet_020_IDB_API_Constructs.html
copy 6
add 4
            Every <a>database</a> also has a <dfn title="database language">language</dfn> that indicates the 
            language that should be used for collating strings when comparing keys.
          </p>
          <p>
copy 6
copy 6
delete 1
add 2
            value with no need to separate them by type. When comparing a <code>DOMString</code> with another <code>DOMString</code>, the <a>database
            language</a> should be used to determine the specific collation rules to be used.
copy 6

Received on Friday, 18 February 2011 02:39:03 UTC