Removing files not present in DOM Level 3 Core.
git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226243 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7827b8b3e4
commit
275f1a69f6
303
java/external/xdocs/dom/core/i18n.html
vendored
303
java/external/xdocs/dom/core/i18n.html
vendored
@ -1,303 +0,0 @@
|
|||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<!--
|
|
||||||
Generated: Thu Nov 09 17:43:02 EST 2000 jfouffa.w3.org
|
|
||||||
-->
|
|
||||||
<html lang='en' xmlns="http://www.w3.org/1999/xhtml">
|
|
||||||
<head>
|
|
||||||
<title>Accessing code point boundaries</title>
|
|
||||||
<link rel='stylesheet' type='text/css' href='./spec.css' />
|
|
||||||
<link rel='stylesheet' type='text/css' href='W3C-REC.css' />
|
|
||||||
<link rel='next' href='idl-definitions.html' />
|
|
||||||
<link rel='contents' href='Overview.html#contents' />
|
|
||||||
<link rel='index' href='def-index.html' />
|
|
||||||
<link rel='previous' href='changes.html' />
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class='navbar' align='center'><a accesskey='p'
|
|
||||||
href='changes.html'>previous</a> <a accesskey='n'
|
|
||||||
href='idl-definitions.html'>next</a> <a accesskey='c'
|
|
||||||
href='Overview.html#contents'>contents</a> <a accesskey='i'
|
|
||||||
href='def-index.html'>index</a>
|
|
||||||
|
|
||||||
<hr title='Navigation area separator' />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='noprint' style='text-align: right'>
|
|
||||||
<p style='font-family: monospace;font-size:small'>13 November,
|
|
||||||
2000</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='div1'><a id="i18n" name='i18n'></a>
|
|
||||||
|
|
||||||
<h1 id='i18n-h1' class='adiv1'>Appendix B: Accessing code point
|
|
||||||
boundaries</h1>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dd>Mark Davis, IBM</dd>
|
|
||||||
|
|
||||||
<dd>Lauren Wood, SoftQuad Software Inc.</dd>
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<div class='noprint'>
|
|
||||||
<h2 id='table-of-contents'>Table of contents</h2>
|
|
||||||
|
|
||||||
<ul class='toc'>
|
|
||||||
<li class='tocline3'><a class='tocxref'
|
|
||||||
href='#i18n-introduction'>2.1. Introduction</a></li>
|
|
||||||
|
|
||||||
<li class='tocline3'><a class='tocxref' href='#i18n-methods'>2.2.
|
|
||||||
Methods</a>
|
|
||||||
|
|
||||||
<ul class='toc'>
|
|
||||||
<li class='tocline4'><a
|
|
||||||
href='#i18n-methods-StringExtend'>StringExtend</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class='div2'><a id="i18n-introduction"
|
|
||||||
name='i18n-introduction'></a>
|
|
||||||
|
|
||||||
<h2 id='i18n-introduction-h2' class='adiv2'>B.1: Introduction</h2>
|
|
||||||
|
|
||||||
<p>This appendix is an informative, not a normative, part of the
|
|
||||||
Level 2 DOM specification.</p>
|
|
||||||
|
|
||||||
<p>Characters are represented in Unicode by numbers called <i>code
|
|
||||||
points</i> (also called <i>scalar values</i>). These numbers can
|
|
||||||
range from 0 up to 1,114,111 = 10FFFF<sub>16</sub> (although some
|
|
||||||
of these values are illegal). Each code point can be directly
|
|
||||||
encoded with a 32-bit code unit. This encoding is termed UCS-4 (or
|
|
||||||
UTF-32). The DOM specification, however, uses UTF-16, in which the
|
|
||||||
most frequent characters (which have values less than
|
|
||||||
FFFF<sub>16</sub>) are represented by a single 16-bit code unit,
|
|
||||||
while characters above FFFF<sub>16</sub> use a special pair of code
|
|
||||||
units called a <i>surrogate pair</i>. For more information, see [<a
|
|
||||||
class='noxref' href='references.html#Unicode'>Unicode</a>] or the
|
|
||||||
Unicode Web site.</p>
|
|
||||||
|
|
||||||
<p>While indexing by code points as opposed to code units is not
|
|
||||||
common in programs, some specifications such as XPath (and
|
|
||||||
therefore XSLT and XPointer) use code point indices. For
|
|
||||||
interfacing with such formats it is recommended that the
|
|
||||||
programming language provide string processing methods for
|
|
||||||
converting code point indices to code unit indices and back. Some
|
|
||||||
languages do not provide these functions natively; for these it is
|
|
||||||
recommended that the native <code>String</code> type that is bound
|
|
||||||
to <a href='core.html#DOMString'><code>DOMString</code></a> be
|
|
||||||
extended to enable this conversion. An example of how such an API
|
|
||||||
might look is supplied below.</p>
|
|
||||||
|
|
||||||
<p><b>Note:</b> Since these methods are supplied as an illustrative
|
|
||||||
example of the type of functionality that is required, the names of
|
|
||||||
the methods, exceptions, and interface may differ from those given
|
|
||||||
here.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- div2 i18n-introduction -->
|
|
||||||
<div class='div2'><a id="i18n-methods" name='i18n-methods'></a>
|
|
||||||
|
|
||||||
<h2 id='i18n-methods-h2' class='adiv2'>B.2: Methods</h2>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><b>Interface <i><a id="i18n-methods-StringExtend"
|
|
||||||
name='i18n-methods-StringExtend'>StringExtend</a></i></b></dt>
|
|
||||||
|
|
||||||
<dd>
|
|
||||||
<p>Extensions to a language's native String class or interface</p>
|
|
||||||
|
|
||||||
<dl>
|
|
||||||
<dt><br />
|
|
||||||
<b>IDL Definition</b></dt>
|
|
||||||
|
|
||||||
<dd>
|
|
||||||
<div class='idl-code'>
|
|
||||||
<pre>
|
|
||||||
interface StringExtend {
|
|
||||||
int findOffset16(in int offset32)
|
|
||||||
raises(StringIndexOutOfBoundsException);
|
|
||||||
int findOffset32(in int offset16)
|
|
||||||
raises(StringIndexOutOfBoundsException);
|
|
||||||
};
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br />
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><b>Methods</b></dt>
|
|
||||||
|
|
||||||
<dd>
|
|
||||||
<dl>
|
|
||||||
<dt><code class='method-name'><a
|
|
||||||
id="i18n-methods-StringExtend-findOffset16"
|
|
||||||
name='i18n-methods-StringExtend-findOffset16'>findOffset16</a></code></dt>
|
|
||||||
|
|
||||||
<dd>
|
|
||||||
<div class='method'>Returns the UTF-16 offset that corresponds to a
|
|
||||||
UTF-32 offset. Used for random access.
|
|
||||||
|
|
||||||
<p><b>Note:</b> You can always round-trip from a UTF-32 offset to a
|
|
||||||
UTF-16 offset and back. You can round-trip from a UTF-16 offset to
|
|
||||||
a UTF-32 offset and back if and only if the offset16 is not in the
|
|
||||||
middle of a surrogate pair. Unmatched surrogates count as a single
|
|
||||||
UTF-16 value.</p>
|
|
||||||
|
|
||||||
<div class='parameters'><b>Parameters</b>
|
|
||||||
|
|
||||||
<div class='paramtable'>
|
|
||||||
<dl>
|
|
||||||
<dt><code class='parameter-name'>offset32</code> of type
|
|
||||||
<code>int</code></dt>
|
|
||||||
|
|
||||||
<dd>UTF-32 offset.<br />
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- parameters -->
|
|
||||||
<div class='return'><b>Return Value</b>
|
|
||||||
|
|
||||||
<div class='returntable'>
|
|
||||||
<table
|
|
||||||
summary='Layout table: the first cell contains the type of the return value, the second contains a short description'
|
|
||||||
border='0'>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<p><code>int</code></p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>UTF-16 offset</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- return -->
|
|
||||||
<div class='exceptions'><b>Exceptions</b>
|
|
||||||
|
|
||||||
<div class='exceptiontable'>
|
|
||||||
<table
|
|
||||||
summary='Layout table: the first cell contains the type of the exception, the second contains the specific error code and a short description'
|
|
||||||
border='0'>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<p><code>StringIndexOutOfBoundsException</code></p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>if <code>offset32</code> is out of bounds.</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- exceptions -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- method -->
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt><code class='method-name'><a
|
|
||||||
id="i18n-methods-StringExtend-findOffset32"
|
|
||||||
name='i18n-methods-StringExtend-findOffset32'>findOffset32</a></code></dt>
|
|
||||||
|
|
||||||
<dd>
|
|
||||||
<div class='method'>Returns the UTF-32 offset corresponding to a
|
|
||||||
UTF-16 offset. Used for random access. To find the UTF-32 length of
|
|
||||||
a string, use:
|
|
||||||
|
|
||||||
<div class='eg'>
|
|
||||||
<pre>
|
|
||||||
len32 = findOffset32(source, source.length());
|
|
||||||
</pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p><b>Note:</b> If the UTF-16 offset is into the middle of a
|
|
||||||
surrogate pair, then the UTF-32 offset of the <em>end</em> of the
|
|
||||||
pair is returned; that is, the index of the char after the end of
|
|
||||||
the pair. You can always round-trip from a UTF-32 offset to a
|
|
||||||
UTF-16 offset and back. You can round-trip from a UTF-16 offset to
|
|
||||||
a UTF-32 offset and back if and only if the offset16 is not in the
|
|
||||||
middle of a surrogate pair. Unmatched surrogates count as a single
|
|
||||||
UTF-16 value.</p>
|
|
||||||
|
|
||||||
<div class='parameters'><b>Parameters</b>
|
|
||||||
|
|
||||||
<div class='paramtable'>
|
|
||||||
<dl>
|
|
||||||
<dt><code class='parameter-name'>offset16</code> of type
|
|
||||||
<code>int</code></dt>
|
|
||||||
|
|
||||||
<dd>UTF-16 offset<br />
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- parameters -->
|
|
||||||
<div class='return'><b>Return Value</b>
|
|
||||||
|
|
||||||
<div class='returntable'>
|
|
||||||
<table
|
|
||||||
summary='Layout table: the first cell contains the type of the return value, the second contains a short description'
|
|
||||||
border='0'>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<p><code>int</code></p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>UTF-32 offset</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- return -->
|
|
||||||
<div class='exceptions'><b>Exceptions</b>
|
|
||||||
|
|
||||||
<div class='exceptiontable'>
|
|
||||||
<table
|
|
||||||
summary='Layout table: the first cell contains the type of the exception, the second contains the specific error code and a short description'
|
|
||||||
border='0'>
|
|
||||||
<tr>
|
|
||||||
<td valign='top'>
|
|
||||||
<p><code>StringIndexOutOfBoundsException</code></p>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<p>if offset16 is out of bounds.</p>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- exceptions -->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- method -->
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</dd>
|
|
||||||
</dl>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- div2 i18n-methods --></div>
|
|
||||||
|
|
||||||
<!-- div1 i18n -->
|
|
||||||
<div class='navbar' align='center'>
|
|
||||||
<hr title='Navigation area separator' />
|
|
||||||
<a accesskey='p' href='changes.html'>previous</a> <a
|
|
||||||
accesskey='n' href='idl-definitions.html'>next</a> <a
|
|
||||||
accesskey='c' href='Overview.html#contents'>contents</a> <a
|
|
||||||
accesskey='i' href='def-index.html'>index</a></div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
||||||
BIN
java/external/xdocs/dom/core/images/table.gif
vendored
BIN
java/external/xdocs/dom/core/images/table.gif
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB |
Loading…
x
Reference in New Issue
Block a user