Diff for Design for fixing chunking bugs
Wed, 2008-07-09 09:46 by xiaojun.feng | Thu, 2008-07-10 01:40 by xiaojun.feng | ||
---|---|---|---|
next diff > | |||
Changes to Body | |||
Line 3 | Line 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 <topicref> has seven different values, according to the specification only the vaule of to-content need to be considered. "to-content" chunk several dita files or topics in to one certain file, if there are duplicated topicIDs, 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 <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 <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.
|
+ | </p>
| ||
+ | <p>
| ||
+ | <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 <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 <topicref> 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 <topicref> with @chunk attribute, construct a new hashset, and preserve the hashset of the parent's <topicref>, restore it after processing current <topicref>.
| ||
</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
| ||
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.