Diff for Design for fixing chunking bugs

Wed, 2008-07-09 09:46 by xiaojun.fengThu, 2008-07-10 01:40 by xiaojun.feng
Changes to Body
Line 3Line 3
 
<h3>What is the technical design for the change?</h3>
 
<h3>What is the technical design for the change?</h3>
 
<p>
 
<p>
-
@chunk attribute in &lt;topicref&gt; has seven different values, according to the specification only the vaule of to-content need to be considered. &quot;to-content&quot; chunk several dita files or topics in to one certain file, if there are duplicated topicIDs, they should be changed. &lt;topicref&gt; can be nested, and each nested &lt;topicref&gt; can have its own @chunk, in this situation the nested &lt;topicref&gt; are chunked into its own file, not conflict with the <span style="font-size: x-small; font-family: Trebuchet MS">ancestors, </span><span style="font-size: x-small; font-family: Trebuchet MS"> fortunately we can use the same idea to process the problem of duplicated topicIDs.</span>
+
@chunk attribute in &lt;topicref&gt; has seven different values, but only the vaule of to-content need to be considered according to the specification. &quot;to-content&quot; chunk several dita files or topics into one certain dita file, if there are duplicated topicIDs in them, they should be changed.
  +
</p>
  +
<p>
  +
&lt;topicref&gt; can be nested, and each nested &lt;topicref&gt; can have its own @chunk, in this situation the nested &lt;topicref&gt; are chunked into its own file, not conflict with the <span style="font-size: x-small; font-family: Trebuchet MS">ancestors, </span><span style="font-size: x-small; font-family: Trebuchet MS"> this brings some difficulties in implementing this feature, fortunately we can use the same idea of nested &lt;topicref&gt; to process the problem of duplicated topicIDs, that is recursion. </span>
  +
</p>
  +
<p>
  +
Use a hashset to store topicids which are chunked into a certain ditafile, if there are duplicated topicids, subsitutes it with random generated id. In the case of nested &lt;topicref&gt; with @chunk attribute, construct a new hashset, and preserve the hashset of the parent's &lt;topicref&gt;, restore it after processing current &lt;topicref&gt;.
 
</p>
 
</p>
 
<h3><strong>What sections of the toolkit will be impacted by the change?</strong> </h3>
 
<h3><strong>What sections of the toolkit will be impacted by the change?</strong> </h3>
 
<p>
 
<p>
-
ChunkModule.java and Constants.java are impacted by this change.
+
ChunkTopicParser.java is impacted by this change.
 
</p>
 
</p>
 
<h3>See also</h3>
 
<h3>See also</h3>
 
none
 
none
 
 
Revision of Thu, 2008-07-10 01:40:

Design for fixing chunking bugs

Design for Bug # 1897542

What user need will be met by this feature?

Users needn't worry about their topic ids conflicting with other's. Duplicated topicIDs betwwen different dita files are handled automated by Chunk module.

What is the technical design for the change?

@chunk attribute in <topicref> has seven different values, but only the vaule of to-content need to be considered according to the specification. "to-content" chunk several dita files or topics into one certain dita file, if there are duplicated topicIDs in them, they should be changed.

<topicref> can be nested, and each nested <topicref> can have its own @chunk, in this situation the nested <topicref> are chunked into its own file, not conflict with the ancestors, this brings some difficulties in implementing this feature, fortunately we can use the same idea of nested <topicref> to process the problem of duplicated topicIDs, that is recursion. 

Use a hashset to store topicids which are chunked into a certain ditafile, if there are duplicated topicids, subsitutes it with random generated id. In the case of nested <topicref> with @chunk attribute, construct a new hashset, and preserve the hashset of the parent's <topicref>, restore it after processing current <topicref>.

What sections of the toolkit will be impacted by the change?

ChunkTopicParser.java is impacted by this change.

See also

none
XML.org Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | XML.org | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I