Developer Knowledgebase
Knowledgebase Home
FrameMaker KB
Overview
Software Development Kits
Developer Knowledgebase
Support
Legal Notices
Feedback
Adobe Solution Partner Program
Join
Find a Solution Partner
Product
FrameMaker
Version
All
Last Edited
09-Jan-2002
Document
51177
How To: How FM+SGML handles various entities.
Issue
How does FrameMaker+SGML handle the following entity types?
(a) <!ENTITY moretext "&sometext; This is some more text.">
(b) <!ENTITY % chapElems "Chapter | Intro | About">
(c) <!ENTITY % rootElems "%chapElems; | Module">
(d) <!ENTITY sect1 SYSTEM "sect1.sgm">
Solution
(a) FM+SGML cannot preserve the fact that an entity was used and at the same time interpret markup within the entity's replacement text. By default, it maps entities that contain strings used as delimiters to straight text and thus does not preserve the fact that the entity reference occurred. General entity references may be used in SGML contexts in which some delimiters are not recognized. The entity rule can be used to map entities whose replacement text contains delimiter strings to variables, but this rule interacts with SGML parsing and inhibits recognition of markup within the replacement text. For example, an entity with a declaration like:
<!ENTITY tag "<test>">
or even
<!ENTITY tag STARTTAG "test">
may only be used within an element with declared content of CDATA or a marked section declaration with effective status keyword "CDATA". If a user is sure the apparent markup is never needed, the user can include a rule like:
entity "tag" is fm variable;
and references to the entity will be mapped to a variable.
This technique does not work for the
<!ENTITY moretext "&sometext; This is some more text.">
example, because a rule based on the above, would result in a variable called moretext defined to be "&sometext; This is some more text." since entity references within the replacement text are not recognized. In every context in which references to moretext are recognized, references to sometext should be also.
(b) & (c)FM+SGML does not preserve references to parameter entities.
(d) References to external general SGML text entities can be mapped to components in a book, provided the nesting structure is compatible with FM book structure. PIs can be used to control the creation of new entities. In addition, the generate book rule can be used to specify that elements with specified generic identifiers should start new book components when they occur at appropriate levels in the element structure.
Additional Information
Note that, in general, FrameMaker+SGML preserves the element structure of an imported SGML document but not the exact markup used to describe that element
structure in SGML. The use of SGML text entities is one aspect of that markup.
Was this Knowledgebase document helpful?
Yes
No
The articles in this knowledgebase are intended for use by software programmers currently using an Adobe SDK to extend or customize an Adobe product. These articles may be highly technical in nature.
If you have questions about an Adobe Product that are not related to development or an SDK product please visit:
http://adobe.com/support/main.html
Copyright © Adobe Systems Incorporated. All rights reserved.
Terms of Use
Online Privacy Policy