[Date Prev][Date Next] [Thread Prev][Thread Next]
[Date Index] [Thread Index] [New search]

FM+SGML Enhancement Request No. 1



EXPORTING TEXT INSETS AS EXTERNAL SDATA ENTITIES.
OVERVIEW: Text fragments are created in individual text flows of FrameMaker
fragment files. Such fragments, which can be imported by reference as text
insets,  serve many useful functions. A library of such fragment files can
be used as the source of standardized text fragments that cannot be modified
within the documents that import them. Each time a document containing text
insets is opened, the text insets  are updated  from the source to reflect
the most recent version of the fragment.

DESCRIPTION OF THE PROBLEM: Suppose you are originating structured docs in
FM+SGML, and those docs include text insets that are imported by reference
from a library of  FM+SGML fragment files. You can set up the read/write
rules so that, on export to SGML, these text insets are replaced by entity
references in the resulting SGML document instance. On import to FM+SGML,
those entity references are replaced by the corresponding read/write
rule-specified  text insets. 

However, it is not possible to export from a fragment file the individual
fragments themselves  as external SDATA entities. This effectively renders
useless the capability to convert (on export to SGML) text insets to entity
references , because there is no way for FM+SGML to create the external
entities needed on the SGML side.

PROPOSED SOLUTION:
1. One or more  elements, valid at the highest level,  could be defined in
the SGMLAPPS Application Definition file as representing fragments that
correspond to external SDATA entities. All such top-level elements must have
a required attribute named "entity", which establishes the permanent (and
unique) name of the entity.  The general rule for such elements could be
"ALL", or it could be more restrictive (e.g., TEXT).

2. Each text fragment in an FM+SGML fragment file is in a uniquely-named
text flow that must begin with one of the top-level elements identified in 1
above. 

3. When a selected fragment within an FM+SGML fragment file is individually
exported to SGML, the SGMLAPPS file provides the way for FM+SGML to
recognize that the  fragment is to be written out as an external SDATA
entity to a file named XYZ.ENT, where XYZ  is the value of the entity
attribute in the top-level  element of the fragment. ALL SUCH SDATA ENTITIES
MUST BE DECLARED IN THE DTD (e.g., in one or more external parameter entity
files, declared and invoked in the DTD, that declare all such SDATA entities).

If, however, the fragment being exported contains anything (e.g., a
variable) that itself must be converted to an entity reference, and that
entity is not declared in the DTD, an error log would be produced listing
those invalid entity references.

4. When an SGML document instance containing references to SDATA entities is
imported into FM+SGML, the read/write rules determine whether those SGML
entities themselves are imported, or whether they are replaced by the
corresponding text insets imported by reference from the specified FM+SGML
fragment files.. In either case, the top-level elements in the fragments
retain the entity identities, allowing them to be exported as entity
references. Regardless of which method is chosen, care must be taken to
assure that the content of the text insets is always identical to that of
the corresponding SGML entities (i.e., whenever a fragment in an FM+SGML
fragment file is changed, it must be re-exported to SGML to overwrite the
file containing the previous version of the same entity). 
     ====================
     | Nullius in Verba |
     ====================
Dan Emory, Dan Emory & Associates
FrameMaker/FrameMaker+SGML Document Design & Database Publishing
Voice/Fax: 949-722-8971 E-Mail: danemory@primenet.com
10044 Adams Ave. #208, Huntington Beach, CA 92646
---Subscribe to the "Free Framers" list by sending a message to
   majordomo@omsys.com with "subscribe framers" (no quotes) in the body.


** To unsubscribe, send a message to majordomo@omsys.com **
** with "unsubscribe framers" (no quotes) in the body.   **