Sub-document entities
If the document you are importing contains file entities that point to other documents (subdocuments), note the following:
- If the (imported document’s) file entity is protected, the subdocument is not imported.
- If the (imported document’s) file entity is expanded, the subdocument is imported—note however, the entities in the subdocument are not protected; the subdocument’s entities are automatically expanded when DI imports the subdocument.
To protect entities (from being expanded) in subdocuments during import, do the following:
- Copy the document’s entity declaration file to the ..di/entities directory (use the same name). The copy will be modified for use with Dynamic Import.
- In the new entity declaration file (the one in the ..di/entities directory) identify the entity definitions contained in the subdocuments that you do not want expanded.
- Modify the entity declaration(s) in the following manner:
Original Entity Declaration Modified Entity Declaration <!ENTITY Xy “Xyvision Enterprise Solutions, Inc.”><!ENTITY Xy “&Xy;”><!ENTITY file1 SYSTEM “http://www.SDL.com/file1.asp”><!ENTITY file1 “&file1;”><!ENTITY file2 SYSTEM “http://www.SDL.com/file2.asp”><!ENTITY file2 “&file2;”><!ENTITY copyright “Copyright by SDL”><!ENTITY copyright “©right;”> - Change the path in the ..\encaps\di\entities\ominlib file to reflect the new location of the entity declaration file.
Example:
The original ominlib file contains the following.
"-//SDL//DTD PLAY//EN" "c:\play\play.dtd"
"ISO 8879:1986//ENTITIES Publishing//EN" "e:\custom\STI\omni\playpub.ent"
Edited ominlib file—modification references the modified entity declaration file.
"-//SDL//DTD PLAY//EN" "c:\play\play.dtd"
"ISO 8879:1986//ENTITIES Import//EN" "e:\Contenta\encaps\di\entities\playpub.ent"
You can now import the main document. After importing your documents, remember to change the ominlib path for the entity declaration file to the original location.