Diff for Design for implementing OASIS Item 12026
Thu, 2008-10-16 07:40 by zhou.youyi | Thu, 2008-10-16 08:43 by zhou.youyi | ||
---|---|---|---|
< previous diff | next diff > | ||
Changes to Body | |||
Line 1 | Line 1 | ||
- | <p>
| + | <!--[if gte mso 9]><xml>
|
- | <em><strong>What user need will be met by this feature?</strong></em><br />
| + | <w:WordDocument>
|
- | Users can define various glossary entries which serve as specific terms or acronyms. Such glossary entries will be expanded to appropriate form according to the context automatically.<br />
| + | <w:View>Normal</w:View>
|
- | <br />
| + | <w:Zoom>0</w:Zoom>
|
- | <em><strong>What is the technical design for the change?</strong></em><br />
| + | <w:PunctuationKerning/>
|
- | Key definitions and references are already prepared during key definition parsing process, so we mainly focus on how to resolve keyref accordingly in appropriate contexts. Here we have 2 problems yet to solve while resolving the keys:
| + | <w:DrawingGridVerticalSpacing>7.8 ?</w:DrawingGridVerticalSpacing>
|
+ | <w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
| ||
+ | <w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
| ||
+ | <w:ValidateAgainstSchemas/>
| ||
+ | <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
| ||
+ | <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
| ||
+ | <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
| ||
+ | <w:Compatibility>
| ||
+ | <w:SpaceForUL/>
| ||
+ | <w:BalanceSingleByteDoubleByteWidth/>
| ||
+ | <w:DoNotLeaveBackslashAlone/>
| ||
+ | <w:ULTrailSpace/>
| ||
+ | <w:DoNotExpandShiftReturn/>
| ||
+ | <w:AdjustLineHeightInTable/>
| ||
+ | <w:BreakWrappedTables/>
| ||
+ | <w:SnapToGridInCell/>
| ||
+ | <w:WrapTextWithPunct/>
| ||
+ | <w:UseAsianBreakRules/>
| ||
+ | <w:DontGrowAutofit/>
| ||
+ | <w:UseFELayout/>
| ||
+ | </w:Compatibility>
| ||
+ | <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
| ||
+ | </w:WordDocument>
| ||
+ | </xml><![endif]--><!--[if gte mso 9]><xml>
| ||
+ | <w:LatentStyles DefLockedState="false" LatentStyleCount="156">
| ||
+ | </w:LatentStyles>
| ||
+ | </xml><![endif]--><!--[if !mso]>
| ||
+ | <object
| ||
+ | classid="clsid:38481807-CA0E-42D2-BF39-B33AF135CC4D" id=ieooui>
| ||
+ | </object>
| ||
+ | <style>
| ||
+ | st1\:*{behavior:url(#ieooui) }
| ||
+ | </style>
| ||
+ | <![endif]-->
| ||
+ | <!--
| ||
+ | /* Font Definitions */
| ||
+ | @font-face
| ||
+ | {font-family:??;
| ||
+ | panose-1:2 1 6 0 3 1 1 1 1 1;
| ||
+ | mso-font-alt:SimSun;
| ||
+ | mso-font-charset:134;
| ||
+ | mso-generic-font-family:auto;
| ||
+ | mso-font-pitch:variable;
| ||
+ | mso-font-signature:3 135135232 16 0 262145 0;}
| ||
+ | @font-face
| ||
+ | {font-family:"\@??";
| ||
+ | panose-1:2 1 6 0 3 1 1 1 1 1;
| ||
+ | mso-font-charset:134;
| ||
+ | mso-generic-font-family:auto;
| ||
+ | mso-font-pitch:variable;
| ||
+ | mso-font-signature:3 135135232 16 0 262145 0;}
| ||
+ | /* Style Definitions */
| ||
+ | p.MsoNormal, li.MsoNormal, div.MsoNormal
| ||
+ | {mso-style-parent:"";
| ||
+ | margin:0cm;
| ||
+ | margin-bottom:.0001pt;
| ||
+ | text-align:justify;
| ||
+ | text-justify:inter-ideograph;
| ||
+ | mso-pagination:none;
| ||
+ | font-size:10.5pt;
| ||
+ | mso-bidi-font-size:12.0pt;
| ||
+ | font-family:"Times New Roman";
| ||
+ | mso-fareast-font-family:??;
| ||
+ | mso-font-kerning:1.0pt;}
| ||
+ | /* Page Definitions */
| ||
+ | @page
| ||
+ | {mso-page-border-surround-header:no;
| ||
+ | mso-page-border-surround-footer:no;}
| ||
+ | @page Section1
| ||
+ | {size:595.3pt 841.9pt;
| ||
+ | margin:72.0pt 90.0pt 72.0pt 90.0pt;
| ||
+ | mso-header-margin:42.55pt;
| ||
+ | mso-footer-margin:49.6pt;
| ||
+ | mso-paper-source:0;
| ||
+ | layout-grid:15.6pt;}
| ||
+ | div.Section1
| ||
+ | {page:Section1;}
| ||
+ | /* List Definitions */
| ||
+ | @list l0
| ||
+ | {mso-list-id:736591327;
| ||
+ | mso-list-type:hybrid;
| ||
+ | mso-list-template-ids:-859795842 -2122811750 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
| ||
+ | @list l0:level1
| ||
+ | {mso-level-tab-stop:18.0pt;
| ||
+ | mso-level-number-position:left;
| ||
+ | margin-left:18.0pt;
| ||
+ | text-indent:-18.0pt;}
| ||
+ | @list l0:level2
| ||
+ | {mso-level-number-format:alpha-lower;
| ||
+ | mso-level-text:"%2\)";
| ||
+ | mso-level-tab-stop:42.0pt;
| ||
+ | mso-level-number-position:left;
| ||
+ | margin-left:42.0pt;
| ||
+ | text-indent:-21.0pt;}
| ||
+ | ol
| ||
+ | {margin-bottom:0cm;}
| ||
+ | ul
| ||
+ | {margin-bottom:0cm;}
| ||
+ | -->
| ||
+ | <!--[if gte mso 10]>
| ||
+ | <style>
| ||
+ | /* Style Definitions */
| ||
+ | table.MsoNormalTable
| ||
+ | {mso-style-name:????;
| ||
+ | mso-tstyle-rowband-size:0;
| ||
+ | mso-tstyle-colband-size:0;
| ||
+ | mso-style-noshow:yes;
| ||
+ | mso-style-parent:"";
| ||
+ | mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
| ||
+ | mso-para-margin:0cm;
| ||
+ | mso-para-margin-bottom:.0001pt;
| ||
+ | mso-pagination:widow-orphan;
| ||
+ | font-size:10.0pt;
| ||
+ | font-family:"Times New Roman";
| ||
+ | mso-ansi-language:#0400;
| ||
+ | mso-fareast-language:#0400;
| ||
+ | mso-bidi-language:#0400;}
| ||
+ | </style>
| ||
+ | <![endif]-->
| ||
+ | <p class="MsoNormal">
| ||
+ | <strong><em><span>What user need will be met by this
| ||
+ | feature?</span></em><span></span></strong>
| ||
</p>
| </p>
| ||
- | <p>
| + | <p class="MsoNormal">
|
- | <br />
| + | <span>Users can define various glossary entries
|
- | 1. How to determine in what context a key is referenced? The description on how to distinguish introductory context from other contexts in “DITA Proposed Feature #12026 and #12038” is not clear enough to define all possible contexts that would be encountered. Thus we classify the contexts into three specific situations for the time being. More accurate definition and classification of different contexts should be considered thoroughly and added later.
| + | which serve as specific terms or acronyms. Such glossary entries will be
|
+ | expanded to appropriate form according to the context automatically.</span>
| ||
</p>
| </p>
| ||
- | <p>
| + | <p class="MsoNormal">
|
- | a) The very first appearance of a keyref pointing to a certain glossentry in a deliverable book context should be expanded to its surface form; otherwise an acronym form (or other forms appropriate) should be used. Intuitively, the very first topic entity that we encounter during preprocess (either directly in a topic dita file or indirectly referenced in a ditamap file) would be an introductory context for the whole book. Thus, all keyrefs appearing in this first topic should be expanded to surface form. Keyrefs in other contexts are replaces with other appropriate forms of the corresponding glossentry.
| + | <span> </span>
|
</p>
| </p>
| ||
- | <p>
| + | <p class="MsoNormal">
|
- | b) The terms appearing in online documents should have a hover tooltip of its surface form.
| + | <strong><em><span>What is the technical design for the
|
+ | change?</span></em></strong>
| ||
</p>
| </p>
| ||
- | <p>
| + | <p class="MsoNormal">
|
- | c) Terms appearing in copyright declaration should be expanded to its surface form.
| + | <span>Key definitions and references are already
|
+ | prepared during key definition parsing process, so we mainly focus on how to
| ||
+ | resolve keyref accordingly in appropriate contexts. Here we have 2 problems yet
| ||
+ | to solve while resolving the keys:</span>
| ||
</p>
| </p>
| ||
- | <blockquote>
| + | <p style="margin-left: 18pt; text-indent: -18pt" class="MsoNormal">
|
- | </blockquote>
| + | <!--[if !supportLists]--><span><span>1.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'"> </span></span></span><!--[endif]--><span>How to determine in what context a key is referenced? The
|
- | <p>
| + | description on how to distinguish introductory context from other contexts in “<strong>DITA
|
- | 2. How the contents of glossentries are saved and used. We prefer to use a lazy-loading mechanism as follows:
| + | Proposed Feature #12026 and #12038”
|
+ | </strong><span>is not clear enough to define all
| ||
+ | possible contexts that would be encountered. Thus we classify the contexts into
| ||
+ | three specific situations for the time being. More accurate definition and
| ||
+ | classification of different contexts should be considered thoroughly and added
| ||
+ | later.</span></span>
| ||
</p>
| </p>
| ||
- | <p>
| + | <p style="margin-left: 42pt; text-indent: -21pt" class="MsoNormal">
|
- | a) When the keyref is encountered for the first time, the target file associated with the key should be parsed and corresponding surface form together with other forms should be loaded into memory and saved with the key as a triplet. We use a Hashtbale to store such triplet, concatenating all the forms together separating by a stick.
| + | <!--[if !supportLists]--><span><span>a)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'">
|
+ | </span></span></span><!--[endif]--><span>The very first appearance of a keyref pointing to a certain glossentry in
| ||
+ | a deliverable book context should be expanded to its surface form; otherwise an
| ||
+ | acronym form (or other forms appropriate) should be used. Intuitively, the very
| ||
+ | first topic entity that we encounter during preprocess (either directly in a
| ||
+ | topic dita file or indirectly referenced in a ditamap file) would be an
| ||
+ | introductory context for the whole book. Thus, all keyrefs appearing in this
| ||
+ | first topic should be expanded to surface form. Keyrefs in other contexts are
| ||
+ | replaces with other appropriate forms of the corresponding glossentry. Here is
| ||
+ | a potential pitfall. The same target (glossentry) may appear for many times
| ||
+ | even in the same topic, and might be associated with and referenced by
| ||
+ | different keys. For example, key “A” and key “B” may be associated with the
| ||
+ | same target file “glossary.dita”. Within the same topic “A” and “B” are both
| ||
+ | referenced though, they should be treated differently. The one appearing first
| ||
+ | possibly deserves an expansion but the other doesn’t. This case requires that
| ||
+ | we should consider all keyrefs resolved to the same target in one place.</span>
| ||
</p>
| </p>
| ||
- | <blockquote>
| + | <p style="margin-left: 42pt; text-indent: -21pt" class="MsoNormal">
|
- | </blockquote>
| + | <!--[if !supportLists]--><span><span>b)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'">
|
- | b) If it is not the first time the keyref is resolved ( there is an existing entry in the Hashtable mentioned above), appropriate form is retrieved and used.<br />
| + | </span></span></span><!--[endif]--><span>The terms appearing in online documents should have a hover tooltip of
|
- | <p>
| + | its surface form. Unlike the processing of situation (a), terms in online
|
- | <br />
| + | documents doesn’t need to be expanded and it’s also hard to determine which
|
- | <strong><em>What sections of the toolkit will be impacted by the change?</em></strong><br />
| + | context is introductory or not because user may access the pages in any
|
- | KeyRef resolution<br />
| + | possible sequence. Thus we think using a preferred form defined in glossentry
|
- | <br />
| + | as the term’s appearance and its surface form as a hover tooltip would be
|
+ | enough.</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: -21pt" class="MsoNormal">
| ||
+ | <!--[if !supportLists]--><span><span>c)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'">
| ||
+ | </span></span></span><!--[endif]--><span>Terms appearing in copyright declaration should be expanded to its
| ||
+ | surface form.</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 21pt" class="MsoNormal">
| ||
+ | <span> </span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 21pt" class="MsoNormal">
| ||
+ | <span>Note: Other contexts should be considered, as
| ||
+ | a warranty related context may need surface forms of certain terms.</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 21pt" class="MsoNormal">
| ||
+ | <span> </span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 18pt; text-indent: -18pt" class="MsoNormal">
| ||
+ | <!--[if !supportLists]--><span><span>2.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'"> </span></span></span><!--[endif]--><span>How the contents of glossentries
| ||
+ | are saved and used. We prefer to use a lazy-loading mechanism as follows:</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: -21pt" class="MsoNormal">
| ||
+ | <!--[if !supportLists]--><span><span>a)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'">
| ||
+ | </span></span></span><!--[endif]--><span>First we need a Hashtable to store the target that is defined with a key
| ||
+ | as the hash-key and an appropriate form of the term as the hash-value. For example:</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt" class="MsoNormal">
| ||
+ | <span><glossentry keys=”aKey” href=”glossgroup.dita#aTerm”/>
| ||
+ | defines a key with target “glossgroup.dita#aTerm”. In glossgroup.dita a
| ||
+ | glossentry is defined as:</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt" class="MsoNormal">
| ||
+ | <span><glossentry id=”aTerm”></span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt" class="MsoNormal">
| ||
+ | <span><span>
| ||
+ | </span><glossterm>A term</glossterm></span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt" class="MsoNormal">
| ||
+ | <span><span>
| ||
+ | </span><glossBody></span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: 21.75pt" class="MsoNormal">
| ||
+ | <span><glossSurfaceForm>A term
| ||
+ | that should be resolved (aTerm)</glossSurfaceForm></span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: 21.75pt" class="MsoNormal">
| ||
+ | <span><glossAlt></span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: 21.75pt" class="MsoNormal">
| ||
+ | <span><span>
| ||
+ | </span><glossAcronym>AT</glossAcronym></span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: 21.75pt" class="MsoNormal">
| ||
+ | <span></glossAlt></span>
| ||
+ | </p>
| ||
+ | <p class="MsoNormal">
| ||
+ | <span><span> </span></glossBody></span>
| ||
+ | </p>
| ||
+ | <p class="MsoNormal">
| ||
+ | <span><span> </span></glossentry></span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt" class="MsoNormal">
| ||
+ | <span>Then the entry in Hashtable would be stored
| ||
+ | as (glossgroup.dita#aTerm, corresponding form). The corresponding form refers
| ||
+ | to a string combining the surface form and other preferred forms together
| ||
+ | separated by a stick. The reason why “aKey” is not used as hash-key is mention
| ||
+ | above. Since multiple keys could refer to the same target, it would be a waste
| ||
+ | of memories to store different keys with the same value and it may also cause
| ||
+ | problems in detecting whether it’s the first appearance of a certain term.</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: -21pt" class="MsoNormal">
| ||
+ | <!--[if !supportLists]--><span><span>b)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'">
| ||
+ | </span></span></span><!--[endif]--><span>When a keyref is being resolved, first we check that if there is an
| ||
+ | existing entry in the Hashtable by the target (e.g. glossgroup.dita#aTerm) that
| ||
+ | is associated with the reference key (e.g. aKey). If no such entry exists, the
| ||
+ | target should be parsed and corresponding surface form together with other
| ||
+ | preferred forms should be loaded and saved with the key into the Hashtable. According
| ||
+ | to the context this keyref is being parsed, appropriate form is applied.</span>
| ||
+ | </p>
| ||
+ | <p style="margin-left: 42pt; text-indent: -21pt" class="MsoNormal">
| ||
+ | <!--[if !supportLists]--><span><span>c)<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: 'Times New Roman'">
| ||
+ | </span></span></span><!--[endif]--><span>If there is an existing entry in the Hashtable, appropriate form is
| ||
+ | retrieved and used.</span>
| ||
+ | </p>
| ||
+ | <p class="MsoNormal">
| ||
+ | <span> </span>
| ||
+ | </p>
| ||
+ | <p class="MsoNormal">
| ||
+ | <strong><em><span>What sections of the toolkit will be
| ||
+ | impacted by the change?</span></em><span></span></strong>
| ||
+ | </p>
| ||
+ | <p class="MsoNormal">
| ||
+ | <span>KeyRef
| ||
+ | resolution</span>
| ||
+ | </p>
| ||
+ | <p class="MsoNormal">
| ||
+ | <span> </span>
| ||
</p>
| </p>
| ||
Design for implementing OASIS Item 12026
What user need will be met by this feature?
Users can define various glossary entries which serve as specific terms or acronyms. Such glossary entries will be expanded to appropriate form according to the context automatically.
What is the technical design for the change?
Key definitions and references are already prepared during key definition parsing process, so we mainly focus on how to resolve keyref accordingly in appropriate contexts. Here we have 2 problems yet to solve while resolving the keys:
1. How to determine in what context a key is referenced? The description on how to distinguish introductory context from other contexts in “DITA Proposed Feature #12026 and #12038” is not clear enough to define all possible contexts that would be encountered. Thus we classify the contexts into three specific situations for the time being. More accurate definition and classification of different contexts should be considered thoroughly and added later.
a) The very first appearance of a keyref pointing to a certain glossentry in a deliverable book context should be expanded to its surface form; otherwise an acronym form (or other forms appropriate) should be used. Intuitively, the very first topic entity that we encounter during preprocess (either directly in a topic dita file or indirectly referenced in a ditamap file) would be an introductory context for the whole book. Thus, all keyrefs appearing in this first topic should be expanded to surface form. Keyrefs in other contexts are replaces with other appropriate forms of the corresponding glossentry. Here is a potential pitfall. The same target (glossentry) may appear for many times even in the same topic, and might be associated with and referenced by different keys. For example, key “A” and key “B” may be associated with the same target file “glossary.dita”. Within the same topic “A” and “B” are both referenced though, they should be treated differently. The one appearing first possibly deserves an expansion but the other doesn’t. This case requires that we should consider all keyrefs resolved to the same target in one place.
b) The terms appearing in online documents should have a hover tooltip of its surface form. Unlike the processing of situation (a), terms in online documents doesn’t need to be expanded and it’s also hard to determine which context is introductory or not because user may access the pages in any possible sequence. Thus we think using a preferred form defined in glossentry as the term’s appearance and its surface form as a hover tooltip would be enough.
c) Terms appearing in copyright declaration should be expanded to its surface form.
Note: Other contexts should be considered, as a warranty related context may need surface forms of certain terms.
2. How the contents of glossentries are saved and used. We prefer to use a lazy-loading mechanism as follows:
a) First we need a Hashtable to store the target that is defined with a key as the hash-key and an appropriate form of the term as the hash-value. For example:
<glossentry keys=”aKey” href=”glossgroup.dita#aTerm”/> defines a key with target “glossgroup.dita#aTerm”. In glossgroup.dita a glossentry is defined as:
<glossentry id=”aTerm”>
<glossterm>A term</glossterm>
<glossBody>
<glossSurfaceForm>A term that should be resolved (aTerm)</glossSurfaceForm>
<glossAlt>
<glossAcronym>AT</glossAcronym>
</glossAlt>
</glossBody>
</glossentry>
Then the entry in Hashtable would be stored as (glossgroup.dita#aTerm, corresponding form). The corresponding form refers to a string combining the surface form and other preferred forms together separated by a stick. The reason why “aKey” is not used as hash-key is mention above. Since multiple keys could refer to the same target, it would be a waste of memories to store different keys with the same value and it may also cause problems in detecting whether it’s the first appearance of a certain term.
b) When a keyref is being resolved, first we check that if there is an existing entry in the Hashtable by the target (e.g. glossgroup.dita#aTerm) that is associated with the reference key (e.g. aKey). If no such entry exists, the target should be parsed and corresponding surface form together with other preferred forms should be loaded and saved with the key into the Hashtable. According to the context this keyref is being parsed, appropriate form is applied.
c) If there is an existing entry in the Hashtable, appropriate form is retrieved and used.
What sections of the toolkit will be impacted by the change?
KeyRef resolution