Help > Authoring > Using Markup > Using Entities > Parameter Entities — Referencing Entity Declaration Files
  
Parameter Entities — Referencing Entity Declaration Files
A parameter entity is a file containing entity declarations, notation declarations, and references to other files of entity and notation declarations. A parameter file entity declared within a document instance gives you a way to reference common text entities listed in an external file without involving the DTD author. Formerly, such references were allowed only in the DTD.
You will need to declare parameter file entities using SGML either in an ASCII editor or by editing your document using the edit –current –untagged method. This displays your document in SGML; at the top of the document you will see the internal subset which contains all the entity declarations.
To declare a parameter file entity:
1. Save your document.
2. Click the command line, and type: edit -current -untagged. Press ENTER.
If the command line is not displayed, go to the Tools > Preferences dialog box. Choose the Window category and turn on the Command Line preference.
Your document is redisplayed in SGML format. Notice the entity declarations in the internal subset at the top of the document (between the opening bracket and closing bracket). A sample of the internal subset with two general entity declarations is shown below:
<!DOCTYPE BOOK PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
<!--Arbortext, Inc., 1988-1999, v.xxx-->
<!ENTITY prodname "Arbortext&nbsp;Editor">
<!ENTITY release "9.0">
]>
<book>
You could place the two general entity declarations (prodname and release) in a file that could be referenced by multiple documents. Their entity declarations in the example above would be replaced with a parameter entity declaration and a reference. The parameter entity points to the file with the general entity declarations. This is shown below:
<!DOCTYPE BOOK PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
<!--Arbortext, Inc., 1988-1997, v.xxx-->
<!ENTITY % parament PUBLIC “-//Arbortext//ENTITIES common entdecls//EN">
%parament;
]>
<book>
You would use an entry in a catalog file to map the public identifier to the actual file with the entity declarations.
3. You can add a parameter entity declaration anywhere in the internal subset between the opening and closing brackets.
4. Save the document then Exit .
5. The next time you Open the document, the entities that you added will be available.