Diff for Design for fixing chunking bugs

Thu, 2008-07-10 01:40 by xiaojun.fengThu, 2008-07-10 02:56 by xiaojun.feng
Changes to Body
Line 6Line 6
 
</p>
 
</p>
 
<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>
+
&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  the same idea of nested &lt;topicref&gt; can be used to process the problem of duplicated topicIDs, that is recursion. </span>
 
</p>
 
</p>
 
<p>
 
<p>
Line 16Line 16
 
</p>
 
</p>
 
<h3>See also</h3>
 
<h3>See also</h3>
  +
<p>
 
none
 
none
  +
</p>
  +
<h2><em>Design for bug #
  +
1897497</em></h2>
  +
<h3>What user need will be met by this feature?</h3>
  +
<p>
  +
 Chunking to content won't reprocess maps and duplicates content.
  +
</p>
  +
<h3>What is the technical design for the change?</h3>
  +
<p>
  +
Chunking module is processed after mapref, so before chunking there is already one complete map containg all the map files refrenced by the input ditamap,  there is no need to read all the map files. If doing this, it will duplicate content. There is an exception to this change, if the transtype is eclipsehelp and the dtd of ditmap if eclipsemap, mapref won't pull referenced map content into the input ditamap file; so it is necessary to read all the map files. 
  +
</p>
  +
The condition for the exception is like this
  +
<pre>
  +
element.getAttribute(Constants.ATTRIBUTE_NAME_CLASS).contains(&quot; eclipsemap/plugin &quot;) &amp;&amp; transtype.equals(Constants.INDEX_TYPE_ECLIPSEHELP) 
  +
</pre>
  +
<h3>What sections of the toolkit will be impacted by the change?</h3>
  +
<p>
  +
ChunkModule.java and Constants.java will be impacetd by this change. 
  +
</p>
  +
<h3>See also</h3>none
 
 
Revision of Thu, 2008-07-10 02:56:

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  the same idea of nested <topicref> can be used 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

Design for bug # 1897497

What user need will be met by this feature?

 Chunking to content won't reprocess maps and duplicates content.

What is the technical design for the change?

Chunking module is processed after mapref, so before chunking there is already one complete map containg all the map files refrenced by the input ditamap,  there is no need to read all the map files. If doing this, it will duplicate content. There is an exception to this change, if the transtype is eclipsehelp and the dtd of ditmap if eclipsemap, mapref won't pull referenced map content into the input ditamap file; so it is necessary to read all the map files. 

The condition for the exception is like this element.getAttribute(Constants.ATTRIBUTE_NAME_CLASS).contains(" eclipsemap/plugin ") && transtype.equals(Constants.INDEX_TYPE_ECLIPSEHELP) 

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

ChunkModule.java and Constants.java will be impacetd 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