[Date Prev][Date Next]
[Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[New search]
To: Mark Barratt <markb@xxxxxxxxxxxxxxx>, "Framers@xxxxxxxxxxx com" <Framers@xxxxxxxxxxxxxx>, "Framers@xxxxxx Com" <framers@xxxxxxxxx>
Subject: Re: FM+SGML: Conditions and attributes?
From: Dan Emory <danemory@xxxxxxxxxxxx>
Date: Thu, 22 Nov 2001 11:33:29 -0800
In-Reply-To: <3BFCDDE2.89626C0D@textmatters.com>
Sender: owner-framers@xxxxxxxxx
At 11:13 AM 11/22/01 +0000, Mark Barratt wrote:
>I'd like to associate a Frame conditional text type with an attribute,
>so I can round-trip out to another editing system and bring back the
>result without having to find and re-markup up all the conditional text.
>
>The documentation suggests that it's not possible to preserve
>conditional text settings in markup when round-tripping text.
>
>Is this true?
Yes it is true. I amplify on this below.
>If it is true, anyone have hints on the least-painful routine for
>achieving what I want to achieve?
===========================================
Mark:
As I understand it, you want to export an FM+SGML document containing
conditional text to SGML, edit the SGML document instance in another
editing system, and then import the edited SGML document instance back into
SGML, preserving, in some manner, the identification of text segments that
are conditional.
If you export an FM+SGML document to SGML in which some of the conditional
text is hidden, that text is lost forever. The reason is that the only
remaining vestige of hidden conditional text is a conditional text marker,
which FrameMaker uses as a pointer to the temporary storage location for
each discrete segment of hidden conditional text. It should also be noted
that each time you re-show conditional text, FrameMaker destroys all of the
conditional text markers, and their associated temporary storage locations.
You can verify this by hiding some conditional text, examining and writing
down the pointer value in the associated conditional text marker, then
re-showing and and re-hiding the same conditional text again. Upon
re-examning the pointer value in the new conditional text marker, you will
find that the pointer value in the marker has changed.
Consequently, even if it were possible to preserve the conditional text
markers for hidden conditional text during round-tripping to/from SGML, it
would do no good, because the newly-created SGML document produced on
import to FM+SGML would not contain the stored conditional text segments
pointed to by those markers. There is, therefore, no possible way to
preserve hidden conditional text during round-tripping between FM+SGML and
SGML.
If you are resigned to the fact that, on export to SGML all hidden
conditional text will be lost forever, or if you intend to export to SGML
with all conditional text shown, I'd suggest the following "solution:"
1. Add (to the EDD and DTD) two empty elements named Condstrt and Condend,
both having a required choice-type attribute (Condtag) whose allowed values
correspond to the names of your conditional text tags. If you sometimes
apply combinations of two or more conditional text tags to the same text,
then the allowed values must include those combinations as well (e.g.,
AandB). In the structure rules/content models for the highest-level
elements, add these two elements as inclusions.
2. In each instance of text that is to be marked as conditional:
a. First insert a Condstrt element before the first character to be
marked as conditional, and insert a Condstrt element after the last
character to be marked as conditional. Select the applicable value for the
Condtype attribute.
b. Apply the corresponding conditional text tag to the text, and
include the Condstrt and Condend markers within the conditional text.
3. After you re-import the edited SGML instance back into FM+SGML, you'll
have to perform an element search for each instance of Condstrt. Each found
Condstrt element will be highlighted in the structure view, and its Condtag
attribute value will also be displayed in the structure view. You can then
select everything from the Condstrt element to the corresponding Condend
element (having the same Condtag attribute value), and re-apply the
indicated conditional text tag. Obviously, this could be quite laborious,
but I imagine it would be possible to develop a Framescript or an API to
automate this process.
====================
| 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
177 Riverside Ave., STE F, #1151, Newport Beach, CA 92663
---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. **