- From: Yves Savourel via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 01 Sep 2012 02:53:15 +0000
- To: public-multilingualweb-lt-commits@w3.org
Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20 In directory hutz:/tmp/cvs-serv19566 Modified Files: its20.html its20.odd Log Message: Added the Allowed Characters data category. Index: its20.odd =================================================================== RCS file: /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/its20.odd,v retrieving revision 1.144 retrieving revision 1.145 diff -u -d -r1.144 -r1.145 --- its20.odd 31 Aug 2012 19:59:00 -0000 1.144 +++ its20.odd 1 Sep 2012 02:53:12 -0000 1.145 @@ -2164,6 +2164,18 @@ <cell>tbd</cell> </row> + <row> + <cell> + <ref target="#allowedchars">Allowed Characters</ref> + </cell> + <cell>Yes</cell> + <cell>Yes</cell> + <cell>Yes</cell> + <cell>Yes</cell> + <cell>None</cell> + <cell>Textual content of element, <emph>including</emph> child elements, but excluding attributes</cell> + <cell>tbd</cell> + </row> </table> <exemplum> @@ -5128,6 +5140,145 @@ <p>The MT Confidence data category will be defined in an updated version of this document.</p> </div> + <div xml:id="allowedchars"> + <head>Allowed Characters</head> + <div xml:id="allowedchars-definition"> + <head>Definition</head> + <p>The <ref target="#allowedchars">Allowed Characters</ref> data category is used to specify what characters are allowed in a given + content.</p> + <p>This data category can be used for various purposes, including the following examples:</p> + <list type="unordered"> + <item>Limit the characters which may be used in the UI of a game because of some special font restrictions.</item> + <item>Prevent illegal characters to be entered for text content that are file or directory names.</item> + <item>Control what characters can be used when translating examples of login name in a content.</item> + </list> + <p>The set of characters that are allowed is specified using a regular expression. That is, each character in the selected content + <ref target="#rfc-keywords">MUST</ref> be included in the set specified by the regular expression.</p> + <p>The regular expression is a Character Class construct as defined in the Regular Expression syntax of XML Schema + (http://www.w3.org/TR/xmlschema-2/#nt-charClass).</p> + <p>Example of expressions (shown as XML source):</p> + <list type="unordered"> + <item><code>[abc]</code> : allows the characters 'a', 'b' and 'c'.</item> + <item><code>[a-c]</code> : allows the characters 'a', 'b' and 'c'.</item> + <item><code>[a-zA-Z]</code> : allows the characters from 'a' to 'z' and from 'A' to 'Z'.</item> + <item><code>[^[abc]</code> : allows any characters except 'a', 'b', and 'c'.</item> + <item><code>[^&#x0061-c]</code> : allows any characters except 'a', 'b', and 'c'.</item> + <item><code>\w</code> : allows any character except the set of "punctuation", "separator" and "other" characters.</item> + <item><code>[&#x20;-&#x1ffff;-[&lt;>:&quot;\\/|\?*]]</code> : allows only the characters valid for Windows + file names.</item> + <item><code>.</code> : allows any character.</item> + <item><code>[a-&#x00ff;-[\s]]</code> : allows all characters between U+0061 and U+00FF except the characters SPACE (U+0020), + TABULATION (U+0009), CARRIAGE RETURN (U+000D) and LINE FEED (U+000F).</item> + </list> + </div> + <div xml:id="allowedchars-implementation"> + <head>Implementation</head> + <p>The <ref target="#allowedchars">Allowed Characters</ref> data category can be expressed with global rules, or locally + on individual elements. For elements, the data category information <ref target="#def-inheritance">inherits</ref> to the + textual content of the element, <emph>including</emph> child elements, but <emph>excluding</emph> attributes.</p> + <p xml:id="allowedchars-global">GLOBAL: The <gi>allowedCharactersRule</gi> element contains the following:</p> + <list type="unordered"> + <item><p>A required <att>selector</att> attribute. It contains an <ref target="#selectors">absolute selector</ref> which + selects the nodes to which this rule applies.</p></item> + <item><p>Exactly one of the following:</p> + <list type="unordered"> + <item><p>A <att>allowedCharacters</att> attribute that contains the regular expression indicating the allowed + characters.</p></item> + <item><p>A <att>allowedCharactersPointer</att> attribute that contains a <ref target="#selectors">relative + selector</ref> pointing to a node with the exact same semantics as <att>allowedCharacters</att>.</p></item> + </list> + </item> + </list> + <exemplum xml:id="EX-allowedCharacters-global-1"> + <head>The <ref target="#allowedchars">Allowed Characters</ref> data category expressed globally in XML</head> + <p>The <gi>allowedCharactersRule</gi> element states that the translated content of elements <gi>content</gi> must not + contain the characters <code>*</code> and <code>+</code>.</p> + <egXML xmlns="http://www.tei-c.org/ns/Examples" + target="examples/xml/EX-allowedCharacters-global-1.xml" /> + </exemplum> + <exemplum xml:id="EX-allowedCharacters-global-2"> + <head>Mapping the <ref target="#allowedchars">Allowed Characters</ref> data category in XML</head> + <p>The attribute <att>allowedCharactersPointer</att> is used to map the data category to the non-ITS attribute <att>set</att> + in this document. The attribute has the same semantics as <att>allowedCharacters</att>.</p> + <egXML xmlns="http://www.tei-c.org/ns/Examples" + target="examples/xml/EX-allowedCharacters-global-2.xml" /> + </exemplum> + + <p xml:id="allowedchars-local">LOCAL: the following local markup is available for the <ref target="#allowedchars">Allowed + Characters</ref> data category:</p> + <list type="unordered"> + <item><p>A <att>allowedCharacters</att> attribute that contains the regular expression indicating the allowed + characters.</p></item> + </list> + <exemplum xml:id="EX-allowedCharacters-local-1"> + <head>The <ref target="#allowedchars">Allowed Characters</ref> data category expressed locally in XML</head> + <p>The local <att>allowedCharacters</att> attribute specifies that the translated content of element <gi>panelmsg</gi> + must contain only Unicode characters between U+0020 and U+00FE.</p> + <egXML xmlns="http://www.tei-c.org/ns/Examples" + target="examples/xml/EX-allowedCharacters-local-1.xml" /> + </exemplum> + <exemplum xml:id="EX-allowedCharacters-html5-local-1"> + <head>The <ref target="#allowedchars">Allowed Characters</ref> data category expressed locally in HTML</head> + <p>The local <att>its-allowed-characters</att> attribute specifies that the translated content of element <gi>code</gi> must + not contain the characters other than 'a' to 'z' in any case and the characters underscore and minus.</p> + <egXML xmlns="http://www.tei-c.org/ns/Examples" + target="examples/html5/EX-allowedCharacters-html5-local-1.html" /> + </exemplum> + </div> + <div xml:id="allowedchars-markup"> + <head>Markup Declarations for Allowed Characters</head> + <specGrp xml:id="spec-its-allowedchars"> + <elementSpec ident="allowedCharactersRule" ns="http://www.w3.org/2005/11/its"> + <desc>Rule about the <ref target="#allowedchars">Allowed Characters</ref> data category.</desc> + <classes> + <memberOf key="att.selector" /> + </classes> + <content> + <rng:empty /> + </content> + <attList> + <attDef ident="allowedCharacters" usage="opt"> + <desc>TODO</desc> + <datatype> + <rng:data type="string" /> + </datatype> + </attDef> + <attDef ident="allowedCharactersPointer" usage="opt"> + <desc>TODO</desc> + <datatype> + <rng:data type="string" /> + </datatype> + </attDef> + </attList> + </elementSpec> + <classSpec ident="att.allowedchars" type="atts"> + <attList> + <attDef ident="allowedCharacters" usage="opt" + ns="http://www.w3.org/2005/11/its"> + <desc>TODO</desc> + <datatype> + <rng:data type="string" /> + </datatype> + </attDef> + </attList> + </classSpec> + <classSpec ident="att.allowedchars.html5" type="atts"> + <attList> + <attDef ident="its-allowed-characters" usage="opt" + ns="http://www.w3.org/1999/xhtml"> + <desc>TODO</desc> + <datatype> + <rng:data type="string" /> + </datatype> + </attDef> + </attList> + </classSpec> + </specGrp> + + </div> + + </div> + </div> <!-- <div xml:id="catalogues"> <head>Catalogues</head> @@ -5911,6 +6062,7 @@ <list type="ordered"> <item>Addition of a <att>locQualityPrecisVote</att> attribute and a <att>locQualityPrecisVotePointer</att> attribute to <ptr target="#lqprecis" type="specref"/>.</item> <item>A <ref target="#its-information_versus_content">clarification</ref> of ITS data category information and processing of content in <ptr type="specref" target="#datacategories-defaults-etc"/>.</item> + <item>Added <ptr type="specref" target="#allowedchars"/>.</item> </list> <p xml:id="changelog-since-20120731">The following log records major changes that have been made to this document since the <ref target="http://www.w3.org/TR/2012/WD-its20-20120731/">ITS 2.0 Working Draft Index: its20.html =================================================================== RCS file: /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/its20.html,v retrieving revision 1.143 retrieving revision 1.144 diff -u -d -r1.143 -r1.144 --- its20.html 31 Aug 2012 19:59:00 -0000 1.143 +++ its20.html 1 Sep 2012 02:53:12 -0000 1.144 @@ -126,6 +126,10 @@ <div class="toc3">6.19.3 <a href="#lqprecis-markup" shape="rect">Markup Declarations for Localization Quality Issue</a></div> </div> <div class="toc2">6.20 <a href="#mt-confidence" shape="rect">MT Confidence</a></div> +<div class="toc2">6.21 <a href="#allowedchars" shape="rect">Allowed Characters</a><div class="toc3">6.21.1 <a href="#allowedchars-definition" shape="rect">Definition</a></div> +<div class="toc3">6.21.2 <a href="#allowedchars-implementation" shape="rect">Implementation</a></div> +<div class="toc3">6.21.3 <a href="#allowedchars-markup" shape="rect">Markup Declarations for Allowed Characters</a></div> +</div> </div> </div> <h3><a name="appendices" id="appendices" shape="rect"/>Appendices</h3><div class="toc1">A <a href="#normative-references" shape="rect">References</a></div> @@ -1173,7 +1177,9 @@ <a href="#lqissue" shape="rect">Localization Quality Issue</a> </td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">None</td><td rowspan="1" colspan="1">Textual content of element, <em>including</em> child elements, but excluding attributes</td><td rowspan="1" colspan="1">tbd</td></tr><tr><td rowspan="1" colspan="1"> <a href="#lqprecis" shape="rect">Localization Quality Précis</a> - </td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">None</td><td rowspan="1" colspan="1">Textual content of element, <em>including</em> child elements, but excluding attributes</td><td rowspan="1" colspan="1">tbd</td></tr></tbody></table><div class="exampleOuter"><div class="exampleHeader"><a name="d3e3489" id="d3e3489" shape="rect"/>Example 24: Defaults, inheritance and overriding behavior of data categories</div><p>In this example, the content of all the <code>data</code> elements is translatable because the + </td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">None</td><td rowspan="1" colspan="1">Textual content of element, <em>including</em> child elements, but excluding attributes</td><td rowspan="1" colspan="1">tbd</td></tr><tr><td rowspan="1" colspan="1"> + <a href="#allowedchars" shape="rect">Allowed Characters</a> + </td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">Yes</td><td rowspan="1" colspan="1">None</td><td rowspan="1" colspan="1">Textual content of element, <em>including</em> child elements, but excluding attributes</td><td rowspan="1" colspan="1">tbd</td></tr></tbody></table><div class="exampleOuter"><div class="exampleHeader"><a name="d3e3512" id="d3e3512" shape="rect"/>Example 24: Defaults, inheritance and overriding behavior of data categories</div><p>In this example, the content of all the <code>data</code> elements is translatable because the default for the <a href="#trans-datacat" shape="rect">Translate</a> data category in elements is "yes". The content of <code>revision</code> and <a class="itsmarkup" href="#locNote" shape="rect">locNote</a> is not translatable because the default is overridden by the local <code>its:translate="no"</code> @@ -1341,7 +1347,7 @@ <body> <msg id="NotFound">Cannot find {0} on {1}.</msg> </body> -</myRes></pre></div><p>[Source file: <a href="examples/xml/EX-locNoteRef-attribute-1.xml" shape="rect">examples/xml/EX-locNoteRef-attribute-1.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e3980" id="d3e3980" shape="rect"/>Example 31: The <a class="itsmarkup" href="#locNoteRule.attributes" shape="rect">locNoteRefPointer</a> attribute</div><p>The <a class="itsmarkup" href="#locNoteRule.attributes" shape="rect">locNoteRefPointer</a> attribute contains a <a href="#selectors" shape="rect">relative +</myRes></pre></div><p>[Source file: <a href="examples/xml/EX-locNoteRef-attribute-1.xml" shape="rect">examples/xml/EX-locNoteRef-attribute-1.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4003" id="d3e4003" shape="rect"/>Example 31: The <a class="itsmarkup" href="#locNoteRule.attributes" shape="rect">locNoteRefPointer</a> attribute</div><p>The <a class="itsmarkup" href="#locNoteRule.attributes" shape="rect">locNoteRefPointer</a> attribute contains a <a href="#selectors" shape="rect">relative selector</a> pointing to a node that holds the URI referring to the location of the note.</p><div class="exampleInner"><pre xml:space="preserve"> <dataFile @@ -1363,7 +1369,7 @@ itself.</p></li><li><p>A <a class="itsmarkup" href="#att.local.no-ns.attribute.locNoteRef" shape="rect">locNoteRef</a> attribute that contains a URI referring to the location of the localization note.</p></li></ul></li><li><p>An optional <a class="itsmarkup" href="#att.local.no-ns.attribute.locNoteType" shape="rect">locNoteType</a> attribute with the value "description" or "alert". If the <a class="itsmarkup" href="#att.local.no-ns.attribute.locNoteType" shape="rect">locNoteType</a> attribute is not present, the type of localization note will be - assumed to be "description". </p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4042" id="d3e4042" shape="rect"/>Example 32: The <a href="#locNote-datacat" shape="rect">Localization Note</a> data category expressed + assumed to be "description". </p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4065" id="d3e4065" shape="rect"/>Example 32: The <a href="#locNote-datacat" shape="rect">Localization Note</a> data category expressed locally</div><div class="exampleInner"><pre xml:space="preserve"> <msgList xmlns:its="http://www.w3.org/2005/11/its" xml:space="preserve" @@ -1377,7 +1383,7 @@ its:locNote="%1\$s is the original text's date in the format YYYY-MM-DD HH:MM always in GMT"> <value>Translated from English content dated <span id="version-info">%1\$s</span> GMT.</value> </data> -</msgList></pre></div><p>[Source file: <a href="examples/xml/EX-locNote-selector-2.xml" shape="rect">examples/xml/EX-locNote-selector-2.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4055" id="d3e4055" shape="rect"/>Example 33: The <a href="#locNote-datacat" shape="rect">Localization Note</a> data category expressed +</msgList></pre></div><p>[Source file: <a href="examples/xml/EX-locNote-selector-2.xml" shape="rect">examples/xml/EX-locNote-selector-2.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4078" id="d3e4078" shape="rect"/>Example 33: The <a href="#locNote-datacat" shape="rect">Localization Note</a> data category expressed locally in HTML5</div><div class="exampleInner"><pre xml:space="preserve"><!DOCTYPE html>
 <html lang="en"> <head> @@ -1427,7 +1433,7 @@ "no".</p></li><li><p>Exactly one of the following:</p><ul><li><p>A <a class="itsmarkup" href="#termRule.attributes" shape="rect">termInfoPointer</a> attribute that contains a <a href="#selectors" shape="rect">relative selector</a> pointing to a node that holds the terminology information.</p></li><li><p>A <a class="itsmarkup" href="#att.local.no-ns.attribute.termInfoRef" shape="rect">termInfoRef</a> attribute that contains a URI referring to the resource providing information about the term.</p></li><li><p>A <a class="itsmarkup" href="#termRule.attributes" shape="rect">termInfoRefPointer</a> attribute that contains a <a href="#selectors" shape="rect">relative selector</a> pointing to a node that holds - the URI referring to the location of the terminology information.</p></li></ul></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4294" id="d3e4294" shape="rect"/>Example 34: Usage of the <a class="itsmarkup" href="#termRule.attributes" shape="rect">termInfoPointer</a> attribute</div><div class="exampleInner"><pre xml:space="preserve"> + the URI referring to the location of the terminology information.</p></li></ul></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4317" id="d3e4317" shape="rect"/>Example 34: Usage of the <a class="itsmarkup" href="#termRule.attributes" shape="rect">termInfoPointer</a> attribute</div><div class="exampleInner"><pre xml:space="preserve"> <text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> @@ -1438,7 +1444,7 @@ structure, between the implied author or some other addresser, and the fiction.</gloss> </p> -</text></pre></div><p>[Source file: <a href="examples/xml/EX-terms-selector-1.xml" shape="rect">examples/xml/EX-terms-selector-1.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4307" id="d3e4307" shape="rect"/>Example 35: Usage of the <a class="itsmarkup" href="#att.local.no-ns.attribute.termInfoRef" shape="rect">termInfoRef</a> attribute</div><div class="exampleInner"><pre xml:space="preserve"> +</text></pre></div><p>[Source file: <a href="examples/xml/EX-terms-selector-1.xml" shape="rect">examples/xml/EX-terms-selector-1.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4330" id="d3e4330" shape="rect"/>Example 35: Usage of the <a class="itsmarkup" href="#att.local.no-ns.attribute.termInfoRef" shape="rect">termInfoRef</a> attribute</div><div class="exampleInner"><pre xml:space="preserve"> <text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> @@ -1449,7 +1455,7 @@ structure, between the implied author or some other addresser, and the fiction.</gloss> </p> -</text></pre></div><p>[Source file: <a href="examples/xml/EX-terms-selector-2.xml" shape="rect">examples/xml/EX-terms-selector-2.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4320" id="d3e4320" shape="rect"/>Example 36: Usage of the <a class="itsmarkup" href="#termRule.attributes" shape="rect">termInfoRefPointer</a> attribute</div><div class="exampleInner"><pre xml:space="preserve"> +</text></pre></div><p>[Source file: <a href="examples/xml/EX-terms-selector-2.xml" shape="rect">examples/xml/EX-terms-selector-2.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4343" id="d3e4343" shape="rect"/>Example 36: Usage of the <a class="itsmarkup" href="#termRule.attributes" shape="rect">termInfoRefPointer</a> attribute</div><div class="exampleInner"><pre xml:space="preserve"> <text xmlns:its="http://www.w3.org/2005/11/its" > <its:rules version="2.0"> @@ -1538,7 +1544,7 @@ xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:dirRule dir="rtl" selector="//*[@direction='rtlText']"/> </its:rules></pre></div><p>[Source file: <a href="examples/xml/EX-dir-selector-2.xml" shape="rect">examples/xml/EX-dir-selector-2.xml</a>]</p></div><p id="directionality-local">LOCAL: The following local markup is available for the <a href="#directionality" shape="rect">Directionality</a> data category:</p><ul><li><p>A <a class="itsmarkup" href="#att.local.no-ns.attribute.dir" shape="rect">dir</a> attribute with the value "ltr", "rtl", - "lro" or "rlo".</p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4668" id="d3e4668" shape="rect"/>Example 41: The <a href="#directionality" shape="rect">Directionality</a> data category expressed + "lro" or "rlo".</p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4691" id="d3e4691" shape="rect"/>Example 41: The <a href="#directionality" shape="rect">Directionality</a> data category expressed locally</div><p>On the first <code>quote</code> element, the <code>its:dir="rtl"</code> attribute indicates a right-to-left content.</p><div class="exampleInner"><pre xml:space="preserve"> <text @@ -1549,7 +1555,7 @@ its:dir="rtl"><span dir="rtl">نشاط التدويل، W3C</span></quote> means <quote>Internationalization Activity, W3C</quote>.</par> </body> -</text></pre></div><p>[Source file: <a href="examples/xml/EX-dir-selector-3.xml" shape="rect">examples/xml/EX-dir-selector-3.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4692" id="d3e4692" shape="rect"/>Example 42: The <a href="#directionality" shape="rect">Directionality</a> data category expressed locally +</text></pre></div><p>[Source file: <a href="examples/xml/EX-dir-selector-3.xml" shape="rect">examples/xml/EX-dir-selector-3.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="d3e4715" id="d3e4715" shape="rect"/>Example 42: The <a href="#directionality" shape="rect">Directionality</a> data category expressed locally in HTML5</div><div class="exampleInner"><pre xml:space="preserve"><!DOCTYPE html>
 <html lang="en"> <head> @@ -1688,7 +1694,7 @@ <h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="within-text-implementation" id="within-text-implementation" shape="rect"/>6.8.2 Implementation</h4><p>The <a href="#elements-within-text" shape="rect">Elements Within Text</a> data category can be expressed with global rules, or locally on an individual element. There is no inheritance. The default is that elements are not within text.</p><p id="withintext-global">GLOBAL: The <a class="itsmarkup" href="#withinTextRule" shape="rect">withinTextRule</a> element contains the following:</p><ul><li><p>A required <a class="itsmarkup" href="#att.selector.attribute.selector" shape="rect">selector</a> attribute. It contains an <a href="#selectors" shape="rect">absolute selector</a> which selects the nodes to which this rule applies.</p></li><li><p>A required <a class="itsmarkup" href="#att.local.no-ns.attribute.withinText" shape="rect">withinText</a> attribute with the value "yes", - "no" or "nested".</p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e5376" id="d3e5376" shape="rect"/>Example 46: Specifying elements within text with a <a class="itsmarkup" href="#withinTextRule" shape="rect">withinTextRule</a> element</div><div class="exampleInner"><pre xml:space="preserve"> + "no" or "nested".</p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="d3e5399" id="d3e5399" shape="rect"/>Example 46: Specifying elements within text with a <a class="itsmarkup" href="#withinTextRule" shape="rect">withinTextRule</a> element</div><div class="exampleInner"><pre xml:space="preserve"> <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0"> <its:withinTextRule withinText="yes" selector="//b | //em | //i"/> @@ -2840,7 +2846,84 @@ attribute its-loc-quality-precis-vote { xsd:integer }?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="att.locqualityprecis.html5.attribute.its-loc-quality-precis-threshold" id="att.locqualityprecis.html5.attribute.its-loc-quality-precis-threshold" shape="rect"/>[170] </td><td rowspan="1" colspan="1"><code>att.locqualityprecis.html5.attribute.its-loc-quality-precis-threshold</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> attribute its-loc-quality-precis-threshold { xsd:integer }?</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="att.locqualityprecis.html5.attribute.its-loc-quality-precis-profile-ref" id="att.locqualityprecis.html5.attribute.its-loc-quality-precis-profile-ref" shape="rect"/>[171] </td><td rowspan="1" colspan="1"><code>att.locqualityprecis.html5.attribute.its-loc-quality-precis-profile-ref</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> attribute its-loc-quality-precis-profile-ref { xsd:anyURI }?</code></td></tr></tbody></table></dd></dl></div></div><div class="div2"> -<h3><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="mt-confidence" id="mt-confidence" shape="rect"/>6.20 MT Confidence</h3><p>The MT Confidence data category will be defined in an updated version of this document.</p></div></div></div><div class="back"><div class="div1"> +<h3><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="mt-confidence" id="mt-confidence" shape="rect"/>6.20 MT Confidence</h3><p>The MT Confidence data category will be defined in an updated version of this document.</p></div><div class="div2"> +<h3><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="allowedchars" id="allowedchars" shape="rect"/>6.21 Allowed Characters</h3><div class="div3"> +<h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="allowedchars-definition" id="allowedchars-definition" shape="rect"/>6.21.1 Definition</h4><p>The <a href="#allowedchars" shape="rect">Allowed Characters</a> data category is used to specify what characters are allowed in a given + content.</p><p>This data category can be used for various purposes, including the following examples:</p><ul><li><p>Limit the characters which may be used in the UI of a game because of some special font restrictions.</p></li><li><p>Prevent illegal characters to be entered for text content that are file or directory names.</p></li><li><p>Control what characters can be used when translating examples of login name in a content.</p></li></ul><p>The set of characters that are allowed is specified using a regular expression. That is, each character in the selected content + <a href="#rfc-keywords" shape="rect">MUST</a> be included in the set specified by the regular expression.</p><p>The regular expression is a Character Class construct as defined in the Regular Expression syntax of XML Schema + (http://www.w3.org/TR/xmlschema-2/#nt-charClass).</p><p>Example of expressions (shown as XML source):</p><ul><li><p><code>[abc]</code> : allows the characters 'a', 'b' and 'c'.</p></li><li><p><code>[a-c]</code> : allows the characters 'a', 'b' and 'c'.</p></li><li><p><code>[a-zA-Z]</code> : allows the characters from 'a' to 'z' and from 'A' to 'Z'.</p></li><li><p><code>[^[abc]</code> : allows any characters except 'a', 'b', and 'c'.</p></li><li><p><code>[^&#x0061-c]</code> : allows any characters except 'a', 'b', and 'c'.</p></li><li><p><code>\w</code> : allows any character except the set of "punctuation", "separator" and "other" characters.</p></li><li><p><code>[&#x20;-&#x1ffff;-[&lt;>:&quot;\\/|\?*]]</code> : allows only the characters valid for Windows + file names.</p></li><li><p><code>.</code> : allows any character.</p></li><li><p><code>[a-&#x00ff;-[\s]]</code> : allows all characters between U+0061 and U+00FF except the characters SPACE (U+0020), + TABULATION (U+0009), CARRIAGE RETURN (U+000D) and LINE FEED (U+000F).</p></li></ul></div><div class="div3"> +<h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="allowedchars-implementation" id="allowedchars-implementation" shape="rect"/>6.21.2 Implementation</h4><p>The <a href="#allowedchars" shape="rect">Allowed Characters</a> data category can be expressed with global rules, or locally + on individual elements. For elements, the data category information <a href="#def-inheritance" shape="rect">inherits</a> to the + textual content of the element, <em>including</em> child elements, but <em>excluding</em> attributes.</p><p id="allowedchars-global">GLOBAL: The <a class="itsmarkup" href="#allowedCharactersRule" shape="rect">allowedCharactersRule</a> element contains the following:</p><ul><li><p>A required <a class="itsmarkup" href="#att.selector.attribute.selector" shape="rect">selector</a> attribute. It contains an <a href="#selectors" shape="rect">absolute selector</a> which + selects the nodes to which this rule applies.</p></li><li><p>Exactly one of the following:</p><ul><li><p>A <a class="itsmarkup" href="#att.allowedchars.attribute.allowedCharacters" shape="rect">allowedCharacters</a> attribute that contains the regular expression indicating the allowed + characters.</p></li><li><p>A <a class="itsmarkup" href="#allowedCharactersRule.attributes" shape="rect">allowedCharactersPointer</a> attribute that contains a <a href="#selectors" shape="rect">relative + selector</a> pointing to a node with the exact same semantics as <a class="itsmarkup" href="#att.allowedchars.attribute.allowedCharacters" shape="rect">allowedCharacters</a>.</p></li></ul></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="EX-allowedCharacters-global-1" id="EX-allowedCharacters-global-1" shape="rect"/>Example 82: The <a href="#allowedchars" shape="rect">Allowed Characters</a> data category expressed globally in XML</div><p>The <a class="itsmarkup" href="#allowedCharactersRule" shape="rect">allowedCharactersRule</a> element states that the translated content of elements <code>content</code> must not + contain the characters <code>*</code> and <code>+</code>.</p><div class="exampleInner"><pre xml:space="preserve"> +<myRes + xmlns:its="http://www.w3.org/2005/11/its" > + <head> + <its:rules version="2.0"> + <its:allowedCharactersRule allowedCharacters="[^*+]" selector="//content"/> + </its:rules> + </head> + <body> + <content>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, + sed diam nonumy eirmod tempor invidunt ut labore et dolore magna + aliquyam erat, sed diam voluptua.</content> + </body> +</myRes></pre></div><p>[Source file: <a href="examples/xml/EX-allowedCharacters-global-1.xml" shape="rect">examples/xml/EX-allowedCharacters-global-1.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="EX-allowedCharacters-global-2" id="EX-allowedCharacters-global-2" shape="rect"/>Example 83: Mapping the <a href="#allowedchars" shape="rect">Allowed Characters</a> data category in XML</div><p>The attribute <a class="itsmarkup" href="#allowedCharactersRule.attributes" shape="rect">allowedCharactersPointer</a> is used to map the data category to the non-ITS attribute <code>set</code> + in this document. The attribute has the same semantics as <a class="itsmarkup" href="#att.allowedchars.attribute.allowedCharacters" shape="rect">allowedCharacters</a>.</p><div class="exampleInner"><pre xml:space="preserve"> +<res + xmlns:its="http://www.w3.org/2005/11/its" > + <head> + <its:rules version="2.0"> + <its:allowedCharactersRule selector="//record" allowedCharactersPointer="@set"/> + </its:rules> + </head> + <record id="a1" set="[ !–~]">FULL WIDTH ONLY</record> +</res></pre></div><p>[Source file: <a href="examples/xml/EX-allowedCharacters-global-2.xml" shape="rect">examples/xml/EX-allowedCharacters-global-2.xml</a>]</p></div><p id="allowedchars-local">LOCAL: the following local markup is available for the <a href="#allowedchars" shape="rect">Allowed + Characters</a> data category:</p><ul><li><p>A <a class="itsmarkup" href="#att.allowedchars.attribute.allowedCharacters" shape="rect">allowedCharacters</a> attribute that contains the regular expression indicating the allowed + characters.</p></li></ul><div class="exampleOuter"><div class="exampleHeader"><a name="EX-allowedCharacters-local-1" id="EX-allowedCharacters-local-1" shape="rect"/>Example 84: The <a href="#allowedchars" shape="rect">Allowed Characters</a> data category expressed locally in XML</div><p>The local <a class="itsmarkup" href="#att.allowedchars.attribute.allowedCharacters" shape="rect">allowedCharacters</a> attribute specifies that the translated content of element <code>panelmsg</code> + must contain only Unicode characters between U+0020 and U+00FE.</p><div class="exampleInner"><pre xml:space="preserve"> +<messages + xmlns:its="http://www.w3.org/2005/11/its" + its:version="2.0"> + <msg num="123">Click the + <panelmsg + its:allowedCharacters="[ -þ]">CONTINUE</panelmsg> Button + on the printer panel</msg> +</messages></pre></div><p>[Source file: <a href="examples/xml/EX-allowedCharacters-local-1.xml" shape="rect">examples/xml/EX-allowedCharacters-local-1.xml</a>]</p></div><div class="exampleOuter"><div class="exampleHeader"><a name="EX-allowedCharacters-html5-local-1" id="EX-allowedCharacters-html5-local-1" shape="rect"/>Example 85: The <a href="#allowedchars" shape="rect">Allowed Characters</a> data category expressed locally in HTML</div><p>The local <a class="itsmarkup" href="#att.allowedchars.html5.attribute.its-allowed-characters" shape="rect">its-allowed-characters</a> attribute specifies that the translated content of element <code>code</code> must + not contain the characters other than 'a' to 'z' in any case and the characters underscore and minus.</p><div class="exampleInner"><pre xml:space="preserve"> +<html lang="en"> + <head> + <meta charset="utf-8"><meta> + <title>Example</title> + </head> + <body> + <p>Login names can only use letters from A to Z (upper or lowercase) + and the character underscore (_) and minus (-). + For example: <code its-allowed-characters="[a-zA-Z_\-]">Huck_Finn</code>.</p> + </body> +</html></pre></div><p>[Source file: <a href="examples/html5/EX-allowedCharacters-html5-local-1.html" shape="rect">examples/html5/EX-allowedCharacters-html5-local-1.html</a>]</p></div></div><div class="div3"> +<h4><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="allowedchars-markup" id="allowedchars-markup" shape="rect"/>6.21.3 Markup Declarations for Allowed Characters</h4><dl><dt class="label">allowedCharactersRule</dt><dd><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="allowedCharactersRule" id="allowedCharactersRule" shape="rect"/>[172] </td><td rowspan="1" colspan="1"><code>allowedCharactersRule</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> + element its:allowedCharactersRule + { + allowedCharactersRule.content, + <a href="#allowedCharactersRule.attributes" shape="rect">allowedCharactersRule.attributes</a> + }</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="allowedCharactersRule.content" id="allowedCharactersRule.content" shape="rect"/>[173] </td><td rowspan="1" colspan="1"><code>allowedCharactersRule.content</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> empty</code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="allowedCharactersRule.attributes" id="allowedCharactersRule.attributes" shape="rect"/>[174] </td><td rowspan="1" colspan="1"><code>allowedCharactersRule.attributes</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> + + <a href="#att.selector.attributes" shape="rect">att.selector.attributes</a>, + attribute allowedCharacters { string }?, + attribute allowedCharactersPointer { string }?</code></td></tr></tbody></table></dd><dt class="label"><a name="att.allowedchars" id="att.allowedchars" shape="rect"/>att.allowedchars</dt><dd><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="att.allowedchars.attributes" id="att.allowedchars.attributes" shape="rect"/>[175] </td><td rowspan="1" colspan="1"><code>att.allowedchars.attributes</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> + <a href="#att.allowedchars.attribute.allowedCharacters" shape="rect">att.allowedchars.attribute.allowedCharacters</a> + </code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="att.allowedchars.attribute.allowedCharacters" id="att.allowedchars.attribute.allowedCharacters" shape="rect"/>[176] </td><td rowspan="1" colspan="1"><code>att.allowedchars.attribute.allowedCharacters</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> + attribute its:allowedCharacters { string }?</code></td></tr></tbody></table></dd><dt class="label"><a name="att.allowedchars.html5" id="att.allowedchars.html5" shape="rect"/>att.allowedchars.html5</dt><dd><table class="scrap" summary="Scrap"><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="att.allowedchars.html5.attributes" id="att.allowedchars.html5.attributes" shape="rect"/>[177] </td><td rowspan="1" colspan="1"><code>att.allowedchars.html5.attributes</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> + + <a href="#att.allowedchars.html5.attribute.its-allowed-characters" shape="rect">att.allowedchars.html5.attribute.its-allowed-characters</a> + </code></td></tr></tbody><tbody><tr valign="baseline"><td rowspan="1" colspan="1"><a name="att.allowedchars.html5.attribute.its-allowed-characters" id="att.allowedchars.html5.attribute.its-allowed-characters" shape="rect"/>[178] </td><td rowspan="1" colspan="1"><code>att.allowedchars.html5.attribute.its-allowed-characters</code></td><td rowspan="1" colspan="1"> ::= </td><td rowspan="1" colspan="1"><code> + attribute its-allowed-characters { string }?</code></td></tr></tbody></table></dd></dl></div></div></div></div><div class="back"><div class="div1"> <h2><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="normative-references" id="normative-references" shape="rect"/>A References</h2><dl><dt class="label"><a name="bcp47" id="bcp47" shape="rect"/>BCP47</dt><dd>Addison Phillips, Mark Davis. <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt" shape="rect"><cite>Tags for Identifying Languages</cite></a>, September 2009. Available at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt" shape="rect"> http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a>.</dd><dt class="label"><a name="qa-framework" id="qa-framework" shape="rect"/>QAFRAMEWORK</dt><dd>Karl Dubost, Lynne Rosental, Dominique Hazaël-Massieux, Lofton Henderson. <a href="http://www.w3.org/TR/2005/REC-qaframe-spec-20050817/" shape="rect"><cite>QA Framework: @@ -3243,7 +3326,7 @@ <h2><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="its-schematron-constraints" id="its-schematron-constraints" shape="rect"/>F Checking ITS Markup Constraints With Schematron (Non-Normative)</h2><p> <em>This section is informative.</em> </p><p>Several constraints of ITS markup cannot be validated with ITS schemas. The following <a title="Rule-based validation -- Schematron" href="#schematron" shape="rect">[Schematron]</a> document allows for validating some of these - constraints.</p><div class="exampleOuter"><div class="exampleHeader"><a name="d3e9835" id="d3e9835" shape="rect"/>Example 82: Testing constraints in ITS markup</div><div class="exampleInner"><pre xml:space="preserve"> + constraints.</p><div class="exampleOuter"><div class="exampleHeader"><a name="d3e10168" id="d3e10168" shape="rect"/>Example 86: Testing constraints in ITS markup</div><div class="exampleInner"><pre xml:space="preserve"> <sch:schema xmlns:sch="http://www.ascc.net/xml/schematron" > <!-- Schematron document to test constraints for global and local ITS markup. @@ -3310,14 +3393,14 @@ <em>This section is informative.</em> </p><p>The following <a title="Namespace-based Validation Dispatching Language (NVDL)" href="#nvdl" shape="rect">[NVDL]</a> document allows validation of ITS markup which has been added to a host vocabulary. Only ITS elements and attributes are checked. Elements and - attributes of host language are ignored during validation against this NVDL document/schema.</p><div class="exampleOuter"><div class="exampleHeader"><a name="d3e9857" id="d3e9857" shape="rect"/>Example 83: NVDL schema for ITS</div><div class="exampleInner"><pre xml:space="preserve"><rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"> <namespace + attributes of host language are ignored during validation against this NVDL document/schema.</p><div class="exampleOuter"><div class="exampleHeader"><a name="d3e10190" id="d3e10190" shape="rect"/>Example 87: NVDL schema for ITS</div><div class="exampleInner"><pre xml:space="preserve"><rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0"> <namespace ns="http://www.w3.org/2005/11/its"> <validate schema="its-elements.rng"/> </namespace> <namespace ns="http://www.w3.org/2005/11/its" match="attributes"> <validate schema="its-attributes.rng"/> </namespace> <anyNamespace> <allow/> </anyNamespace> </rules></pre></div><p> [Source file: <a href="schemas/its.nvdl" shape="rect">its.nvdl</a>]</p></div><p>The NVDL schema depends on the following two schemas:</p><span class="editor-note">[Ed. note: These schemas need to be provided in an updated draft.]</span><ul><li><p>RELAX NG schema for ITS elements</p></li><li><p>RELAX NG schema for ITS attributes</p></li></ul></div><div class="div1"> <h2><a href="#contents" shape="rect"><img src="images/topOfPage.gif" align="right" height="26" width="26" title="Go to the table of contents." alt="Go to the table of contents."/></a><a name="revisionlog" id="revisionlog" shape="rect"/>H Revision Log (Non-Normative)</h2><p id="changelog-since-20120829">The following log records major changes that have been made to this document since the <a href="http://www.w3.org/TR/2012/WD-its20-20120829/" shape="rect">ITS 2.0 Working Draft - 29 August 2012</a>.</p><ol class="depth1"><li><p>Addition of a <a class="itsmarkup" href="#att.locqualityprecis.attribute.locQualityPrecisVote" shape="rect">locQualityPrecisVote</a> attribute and a <a class="itsmarkup" href="#locQualityPrecisRule.attributes" shape="rect">locQualityPrecisVotePointer</a> attribute to <a class="section-ref" href="#lqprecis" shape="rect">Section 6.19: Localization Quality Précis</a>.</p></li><li><p>A <a href="#its-information_versus_content" shape="rect">clarification</a> of ITS data category information and processing of content in <a class="section-ref" href="#datacategories-defaults-etc" shape="rect">Section 6.1: Position, Defaults, Inheritance and Overriding of Data Categories</a>.</p></li></ol><p id="changelog-since-20120731">The following log records major changes that have been made to this + 29 August 2012</a>.</p><ol class="depth1"><li><p>Addition of a <a class="itsmarkup" href="#att.locqualityprecis.attribute.locQualityPrecisVote" shape="rect">locQualityPrecisVote</a> attribute and a <a class="itsmarkup" href="#locQualityPrecisRule.attributes" shape="rect">locQualityPrecisVotePointer</a> attribute to <a class="section-ref" href="#lqprecis" shape="rect">Section 6.19: Localization Quality Précis</a>.</p></li><li><p>A <a href="#its-information_versus_content" shape="rect">clarification</a> of ITS data category information and processing of content in <a class="section-ref" href="#datacategories-defaults-etc" shape="rect">Section 6.1: Position, Defaults, Inheritance and Overriding of Data Categories</a>.</p></li><li><p>Added <a class="section-ref" href="#allowedchars" shape="rect">Section 6.21: Allowed Characters</a>.</p></li></ol><p id="changelog-since-20120731">The following log records major changes that have been made to this document since the <a href="http://www.w3.org/TR/2012/WD-its20-20120731/" shape="rect">ITS 2.0 Working Draft 31 July 2012</a>.</p><ol class="depth1"><li><p>Added <a class="section-ref" href="#Disambiguation" shape="rect">Section 6.10: Disambiguation</a>.</p></li><li><p>Added <a class="section-ref" href="#preservespace" shape="rect">Section 6.17: Preserve Space</a>.</p></li><li><p>Added <a class="section-ref" href="#idvalue" shape="rect">Section 6.16: Id Value</a>.</p></li><li><p>Added support for different query language and reworked whole XPath and CSS Selectors integration.</p></li><li><p>Added examples to <a class="section-ref" href="#externalresource" shape="rect">Section 6.14: External Resource</a>.</p></li><li><p>Simplified <a class="section-ref" href="#LocaleFilter" shape="rect">Section 6.11: Locale Filter</a>.</p></li><li><p>Added a note about HTML5 and the attributes <a class="itsmarkup" href="#att.local.no-ns.attribute.dir" shape="rect">dir</a> and <a class="itsmarkup" href="#att.local.no-ns.attribute.translate" shape="rect">translate</a> to <a class="section-ref" href="#selection-local" shape="rect">Section 5.2.3: Local Selection in an XML Document</a>.</p></li><li><p>Added definition of <a class="itsmarkup" href="#param" shape="rect">param</a> element to <a class="section-ref" href="#selection-global" shape="rect">Section 5.2.1: Global, Rule-based Selection</a>.</p></li><li><p>Added <a class="section-ref" href="#target-pointer" shape="rect">Section 6.15: Target Pointer</a>.</p></li><li><p>Original Ruby markup model changed to HTML5 Ruby model</p></li><li><p>Updated references.</p></li><li><p>Added <a class="section-ref" href="#preservespace" shape="rect">Section 6.17: Preserve Space</a>.</p></li><li><p>Added <a class="section-ref" href="#lqissue" shape="rect">Section 6.18: Localization Quality Issue</a> and the related <a class="section-ref" href="#lqissue-typevalues" shape="rect">Appendix B: Values for the Localization Quality Issue Type</a>.</p></li><li><p>Added <a class="section-ref" href="#lqprecis" shape="rect">Section 6.19: Localization Quality Précis</a>.</p></li><li><p>Added a placeholder <a class="section-ref" href="#mt-confidence" shape="rect">Section 6.20: MT Confidence</a>.</p></li></ol><p id="changelog-since-20120626">The following log records major changes that have been made to this
Received on Saturday, 1 September 2012 02:53:18 UTC