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

Re: [FrameSGML] Re: [FM+SGML] Forcing an attribute to have a value



Mark,
  As Dan more or less implied, the concept of a default value for
an attribute is one that FrameMaker+SGML takes directly from SGML.
It would therefore be inappropriate for FM+SGML to supply a value
in exported SGML when it is not in the FM+SGML original.
  If the DTD corresponds closely to the EDD, letting the attribute
default in SGML is not a problem.
  However, it sounds like yours is a case in which you are changing
from one document type to another when you export. In general, such
transformations require more processing than can be done in r/w rules.
This is not a flaw in FM+SGML or the r/w rule capability; the r/w
rules were never intended to be a general purpose transformation
language. For the general case, you can either use the FDK to automate
the desired translations, or export to an SGML DTD that does match
your EDD and use something like Omnimark to convert documents using
one DTD to another.
  Nevertheless, if this is the only detail that you want to change, 
if you are processing a small number of documents, it might be feasible
to produce the desired SGML with some manual operations. In particular,
save the FM+SGML documents in the form with the attribute values 
unspecified. Then find one instance of "blah", set the class attribute
to square, and copy the attribute to the clipboard (with Edit > Copy
Special > Attribute Values or !eya). Then do a Find/Change to all in
document by Finding all elements named "blah" and changing by pasting.
Export this version of the document to SGML. Be careful when you copy
the attributes that no other attributes are set for that element--otherwise
you will be pasting all the attribute values into the other element.
	--Lynne


At 07:28 AM 4/6/00 -0700, Dan Emory wrote:
>At 10:08 AM 4/6/00 +0100, Mark Barratt wrote:
>>Problem: If I assign a default value to an FM attribute (eg for element
>>"List", attribute "class", default value "square") Frame does not export
>>the default value to SGML.
>>
>>Aim: to translate all elements "blah" to <LI class="square"> (guess the
>>intended use!)
>>
>>Don't care whether I do this in Read/write rules alone or EDD +
>>Read/write rules.
>===================================================
>If the DTD also declares the default value, then it is not necessary
>for the default value to be expressed in each instance of it.
>

Lynne A. Price
Text Structure Consulting, Inc.
lprice@txstruct.com
http://www.txstruct.com

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