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

Re: Finally SGML.



At 08:19 AM 4/14/00 -0500, Margaret Gainsley wrote:
>------------------------------Snip---------------------
>But FrameMaker was still hanging up. My code seemed valid and my dtd was
>saved without any errors so why was FrameMaker still freezing up (no
>internal error here)?
>
>I narrowed it down to this scenario.
>
><TEXT> & (table* | (frame*, figure*))*
>
>FrameMaker doesn't like <TEXT> and the ampere sign after it. Once I changed
>it to...
>
><TEXT>, (table* | (frame*, figure*))*
>
>This is probably the "right" way to do the code but it would have been nice
>if FrameMaker would NOT have allowed it with the "&" sign.
====================================================================
Before doing anything else, let's look at the original general rule, which
is for a container element named "Parent".

<TEXT> & (table* | (frame*, figure*))*

I assume that child element "table" is a table element, that child element
"frame" is an anchored frame element, and that child element "figure" is a
figure caption. Based on those assumptions, what this general rule (as
written) states is that container element "Parent" can contain any of the
following:

1. Nothing (the <TEXT> symbol always means text is optional, and the whole
phrase (table* | (frame*, figure*))* has nothing as one of its possibilities).

2. Any number of tables

3. Any number of anchored frames, with each anchored frame optionallly
followed by any number of figure captions.

4. Any number of tables and anchored frames, with each anchored frame
optionallly followed by any number of figure captions.

4. Text followed by any number of tables

5. Text followed by any number of anchored frames, with each anchored frame
optionallly followed by any number of figure captions.

6. Text followed by any number of tables and anchored frames, with each
anchored frame optionallly followed by any number of figure captions.

7. Any number of tables follwed by text.

8. Any number of anchored frames, with each anchored frame optionally
followed by any number of figure captions, and text at the very end.

7. Any number of tables and anchored frames, with each anchored frame
optionally followed by any number of figure captions, followed by text at
the very end.

It is quite unlikely that this general rule, as written, reflects the
designers real intent.  It should be rewritten as follows:

CORRECTED GENERAL RULE:

 <TEXT> & (table | (frame, figure?))

Now, the general rule states that container element "Parent" can contain the
following children:

1. 1 table.

2. 1 anchored frame, optionally followed by 1 figure caption.

3. Text followed by 1 table.

4. Text followed by 1 anchored frame, optionally followed by 1 figure caption.

5. 1 Table, followed by text.

6. 1 anchored frame, optionally followed by 1 figure caption, followed by text.
 
Insertion of the "Parent" continer element will produce an empty paragraph,
into which the child elements can be inserted.

Let's see, then, what happens when child elements are put into the empty
paragraph, where the "X" indicates the anchor point for the table or
anchored frame, and "t" indicates text characters:

Case 1. If text comes before the table or anchored frame:

        tttttX

Case 2. If text comes after the table or anchored frame:

        Xttttt

Now, in both cases 1 and 2, the table or anchored frame will always appear
below the text characters, because, in FrameMaker, everything in the
anchoring paragraph is above the anchored object (i.e., the table or
anchored frame). Consequently, if the intent of the general rule was to
permit text to physically appear before or after the table or anchored
frame, that is not realizable in FrameMaker with this general rule (either
the original one or my corrected version).

CONCLUSION:

It is not at all surprising that FM+SGML gagged on the initial version of
your general rule, and your modified version of the same rule:
        <TEXT>, (table* | (frame*, figure*))*
isn't much better.

     ====================
     | 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.   **