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

Re: FrameMaker+SGML Questions (longish)



Rick,

I haven't seen an answer to your questions, beside using the
read/write rules to force specific casing translations.

First, was the structure definition originally created in FM+SGML
(as the EDD) or externally (as a DTD)?

The reason for this question is the case convention of the element
names in a DTD is usually immaterial, as the extremely common usage
is to specify in the SGML declaration file:

 NAMECASE
        GENERAL  YES
        ENTITY    NO

which means that for entities (like the general ISO character set
references, e.g., ISOlat1 or ISOgrk3 characters) the case pattern of
the entity name is significant, but for other items like element or
attribute names it is not, so an element "Body" is the same as
"body" is the same as "BODY" to the SGML parser.

If the structure originated in FM, then you can force the case
pattern of the output SGML by setting the GENERAL parameter to NO,
and the output elements/attributes will be in the same case as they
appear in the EDD and Element Catalog.  If the structure originated
from a DTD, then the behavior may not be changeable, but check to
see what the namecase specification is to decide.

FM defaults to converting elements and attributes to an initial
capital letter (when creating an EDD from a DTD) and not changing
the case on output to SGML if NAMECASE GENERAL YES is set, or not
changing the case pattern at all if it is set to NO.

If the names are as you wish them to be when working in FM+SGML, and
the general setting is YES, you can then change it to NO in the
declaration file and happily write SGML without needing read/write
rules to switch to all lower- (or upper-) case.  But if the setting
is NO, you won't be able to switch, because there is usually a very
good reason to maintain the exact upper/lower-case pattern.

One warning: if you have to import sgml files that were created by
other software, changing the namecase option may trigger errors,
because names now are case sensitive, and "Body" is not the same as
"body" is not the same as "BODY" any more!

Second, the spaces around the equal sign between attribute and value
pairs are not significant, and generally makes the document instance
easier to read.  Is there a reason to suppress the spaces (beside it
adds a couple of extra bytes for every attribute that must be
written)?

If so, this could be done with some sort of script language (e.g.,
PERL, AWK, SED ...) to post-process the SGML text file, or by
writing an FDK client to handle the export.  I don't know of this is
possible with FrameScript, as that seems more focused on actions
within the Frame environment, instead of the import/export
translation where this would have to be handled.

Rick Quatro wrote:
 
> When I export to SGML, my element and attribute names are changed to initial
> caps. Is there any way to prevent the case from changing?
> 
> When FrameMaker writes attribute names and values to SGML, it puts a space
> on either side of the = sign. Is there any way to prevent this?
> 
> Thank you in advance.
> 
> Rick Quatro
> Carmen Publishing
> 585 659-8267 (new area code)
> rick@frameexpert.com
> http://www.frameexpert.com

-- Lester
--------------------------------+-----------------------------
 Lester C. Smalley              | email: lsmalley@infocon.com
 Information Consultants, Inc.  | phone: (302) 239-2942
 Hockessin, DE  USA  19707-0310 | fax:   (302) 239-1712
--------------------------------+-----------------------------
 * Adobe Certified Expert -- FrameMaker and FrameMaker+SGML *
--------------------------------------------------------------
                   http://www.infocon.com/

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