Merging to publish

It was suggested earlier that the inability of this scheme to work across documents is not an issue when the documents are destined to be merged into a single large document prior to delivering or publishing the contents. When this is the case, linking can still be supported, though there is one complication involving the DTD.

There is a need for two versions of the DTD. The first is used for the separate documents. The second is used only with the final merged document.

The first DTD needs to assign the attribute type CDATA to the attributes in the source linking elements. This prevents a parser from trying to find the target elements (which will often be in a different document). The second DTD assigns the IDREF type instead, ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.