cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

e-i-c in context question

petra.schaedle
1-Newbie

e-i-c in context question

Hi Adepters,

I am experiencing a strange e-i-c problem with different formatting
depending on the level of where my document starts.

My basic document structure is the following:
manual
intro
OR
body
chapter
title
some text

We're editing complete manuals and also single chapters which are then
inserted in the manuals. Now we want to use the same FOSI for a manual as
well as for a chapter, therefore I added different e-i-c for the titles
depending on the context:

<e-i-c gi="title" context="chapter" *=" intro&quot;=">
<usetext source="levelct.txt,@+2em"></usetext>
</e-i-c>
<e-i-c gi="title" context="chapter" *=" body&quot;=">
<usetext source="levelct-roman.txt,@+2em"></usetext>
</e-i-c>
<e-i-c gi="title" context="chapter">
</e-i-c>

If I am working on a single chapter, I do not want any usetext output, but
the e-i-c in context "chapter * intro" is used. I moved the e-i-c around to
see whether the order makes any difference, also I tried to use the
occurence possibility, but no change. In the help it says "With Epic's
context-sensitive formatting, you can have multiple e-i-cs with the same
element name. But only one e-i-c applies to any given element in the
document. The e-i-c that is used is the best match ."

It does not seem to be the best match to me as the container element is not
there.

BTW, we're using Epic 4.2 on Windows.

Any idea why this happens and what I can do to get around this behaviour?

Thanks,
Petra
5 REPLIES 5


Amy,

The wildcard you are using in the e-i-c's is most likely your problem. Try
explicitly stating the context and see if that helps any, something like
this:

context="chapter intro" (make sure that any other major elements between
the intro and the chapter are included)

The wildcard picks up any other elements that may appear in the tree.

Just out of curiosity from the way you showed the breakdown, which of these
comes closest to your DTD?

doc ((intro | body), chapter+)

doc (intro?, body)
body (chapter+)

doc (intro | body)
intro (chapter+)
body (chapter+)

If the latter is the case, your context rules should work, as they are not,
then I tend to believe it is one of the other possible structures.

If you go to the 28001 tutorial in Epic and do a search (not a text search,
but the find tag/attribute search) for this attribute string "
context.att.syn". This will take you to a paragraph showing how context is
computed. The tutorial is in the Epic folder under tutorials, 28001c. The
doctype is distributed, so it should open right up.

Lynn


Petra.Schaedle
@vftis.spx.com To: adepters@arbortext.com
Sent by: cc:
owner-adepters Subject: e-i-c in context question


02/12/2003 04:28
AM
Please respond
to adepters



Hi Adepters,

I am experiencing a strange e-i-c problem with different formatting
depending on the level of where my document starts.

My basic document structure is the following:
manual
intro
OR
body
chapter
title
some text

We're editing complete manuals and also single chapters which are then
inserted in the manuals. Now we want to use the same FOSI for a manual as
well as for a chapter, therefore I added different e-i-c for the titles
depending on the context:

<e-i-c gi="title" context="chapter" *=" intro&quot;=">
<usetext source="levelct.txt,@+2em"></usetext>
</e-i-c>
<e-i-c gi="title" context="chapter" *=" body&quot;=">
<usetext source="levelct-roman.txt,@+2em"></usetext>
</e-i-c>
<e-i-c gi="title" context="chapter">
</e-i-c>

If I am working on a single chapter, I do not want any usetext output, but
the e-i-c in context "chapter * intro" is used. I moved the e-i-c around to
see whether the order makes any difference, also I tried to use the
occurence possibility, but no change. In the help it says "With Epic's
context-sensitive formatting, you can have multiple e-i-cs with the same
element name. But only one e-i-c applies to any given element in the
document. The e-i-c that is used is the best match ."

It does not seem to be the best match to me as the container element is not
there.

BTW, we're using Epic 4.2 on Windows.

Any idea why this happens and what I can do to get around this behaviour?

Thanks,
Petra

You did not say if you are using "declaration when you edit your single chapter, and <chapter> is your
top-level tag, or whether you are using " is
your top-level tag. If it is the latter, try using "as your doctype declaration, and <chapter> as your top-level tag. The only
other thing I can think of to try right now is to take the "*" out of your
context attributes.


Hello Lynn and Ed,

Thanks for your answers.

FYI, the structure I am using is the following:
manual (intro?, body)
intro chapter+
body chapter+

The doctypes are PUBLIC ID and System ID) depending on the info level I'm working on.

I tested without using wildcards, but the problem remains:-(

Petra

How about trying this?
<e-i-c gi="title" context="*" intro&quot;=">
<usetext source="levelct.txt,@+2em"></usetext>
</e-i-c>
<e-i-c gi="title" context="*" body&quot;=">
<usetext source="levelct-roman.txt,@+2em"></usetext>
</e-i-c>
<e-i-c gi="title" context="chapter">
</e-i-c>


Petra,

If the suggestions Ed just passed on don't work, I am going to toss out
some off the wall possibilities. A very unlikely situation is you have a
second FOSI that is being used and not the one you are editing. Try adding
a new <usetext> into the <e-i-c>'s, have each one say something different.
Then see which of those new usetexts is output. If none of them appear,
then I'd go looking for the FOSI that is being processed. We know the
<intro> <usetext> is being passed through, this will ensure it is the
<e-i-c> in the file you are editing.

Try running the 'show vars' from the command line and see (I have one that
I didn't set, but have been working on something that may have set it) if
you have a variable named 'ifosfile'. This shows me the path and name of
the FOSI file I am working with.

Take out the two <e-i-c>'s with the <usetext> and then see what happens to
your output. Then add the <e-i-c> with the context of body back in and see
if you get any changes. Simply start with a small single block and work up
until you either find your problem or everything magically starts working.

Try a document with only a and a <chapter> to see what you get. The
'best match' if there is an <intro> would be include the body through the
wildcard (if I remember my best match rules).

Lynn


Petra.Schaedle
@vftis.spx.com To: adepters@arbortext.com
Sent by: cc:
owner-adepters Subject: Re: e-i-c in context question


02/12/2003 10:39
AM
Please respond
to adepters



Hello Lynn and Ed,

Thanks for your answers.

FYI, the structure I am using is the following:
manual (intro?, body)
intro chapter+
body chapter+

The doctypes are PUBLIC ID and System ID) depending on the info level I'm working on.

I tested without using wildcards, but the problem remains:-(

Petra
Announcements