Revision of Design for fixing chunking bugs from Thu, 2008-07-10 02:56

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