Renaming Or Changing The Type Of Entities When Translating To Variables - Adobe 65030365 - FrameMaker - PC Developer's Manual

Structure application developer's guide
Hide thumbs Also See for 65030365 - FrameMaker - PC:
Table of Contents

Advertisement

21
M o d i f i c a t i o n s t o t h e d e f a u l t t r a n s l a t i o n

Renaming or changing the type of entities when translating to variables

By default, FrameMaker converts non-element system variables and user variables to entity
references. You can change the name of the entity to use for a variable with the entity
rule. The format of this rule is:
entity "ename" is fm variable "fmvar";
where ename is a markup entity and fmvar is a FrameMaker variable. With this rule,
FrameMaker creates a reference to an entity of the appropriate type, on the basis of
character formats associated with the variable text. It also creates an entity declaration if
one doesn't already appear in the internal DTD subset. For information on how character
formats affect the translation of variables on export, see "On export to markup" on page 330.
You can change the type of entity to which a variable translates by changing the character
format associated with the variable text in the variable definition.
For example, assume you have the FrameMaker variable Start Tag Ex with the variable
text <tag> and that you want to translate it to the SGML CDATA entity startex. To do so,
use this rule:
entity "startex" is fm variable "Start Tag Ex";
Be sure that Start Tag Ex uses the CDATA character format in its definition. That is,
the definition of the variable must be:
<CDATA>\<tag\><Default ¶ Font>
If startex is not declared in the DTD, FrameMaker inserts the following entity declaration
into the DTD subset when it encounters the first instance of the variable Start Tag Ex
in the document being processed:
<!ENTITY startex CDATA "<tag>">
SGML: If you want the variable to become an SDATA entity instead, change the variable
definition to:
<SDATA>\<tag\><Default ¶ Font>
In this case, if startex is not declared in the DTD, FrameMaker inserts this entity
declaration:
<!ENTITY startex SDATA "<tag>">
If the DTD already has an appropriate entity declaration, FrameMaker retains that
declaration.
In a similar circumstance, assume you map a text entity named product to a FrameMaker
variable, Product Name. If you have the following text entity declaration:
<!ENTITY product "Not yet named">
then with the rule:
entity "product" is fm variable "Product Name";
Translating Variables and System Variable Elements
332

Advertisement

Table of Contents
loading

This manual is also suitable for:

Framemaker 7.1

Table of Contents