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

Re: Expressions of interest wanted: implementing smart conditions ($$$$$$$)



Scriptoleurs:

My previous post, after a verbose preamble, was actually seeking
expressions of interest from people who would like to develop a FrameScript
application for my acquaintance.

**** YES ****
##### Fame ##### Fortune ##### Lifestyle ##### can be yours!  Now read on
...
                 ^
                 |
                 (i.e. money)

Regards,
Hedley

----- Forwarded by Hedley Finger/AU/MYOB on 07/03/2001 12:05 PM -----

Scripters:

An acquaintance has handed me a nice little problem involving conditions.
A legacy user guide contains 161 conditions to cover various contingencies.
This is a single-source document from which many different kinds of
deliverables are produced.  The condition formats can be divided into
atomic conditions and compound conditions.

ATOMIC CONDITIONS

Some examples of atomic conditions are:

    CONDITION TYPE                ATOMIC CONDITION FORMATS
    Market                        au, uk, us, ca
    Platform                      mac, win
    Deliverable                   help, print, pdf
    Product                       AcmeBland, AcmeSuper, AcmeHyper
    Product Features              audittrail, filesynch

COMPOUND CONDITIONS

The compound conditions are various combinations of the atomic conditions,
for example,

    au&pdf, help&mac

and so on.

COMPOUNDS SOLVE CONDITIONAL 'OR' PROBLEM

The compound conditions exist to get around FrameMaker's inability to AND
overlapping conditions.  For example, where <a> starts a condition and </a>
ends a condition,

    xxx x xxxx <a>aaaaaa aaaaa aaa <b>ababab ab abab</a> bbbb bbb</b> xxxx

the string 'ababab ab abab' has both <a> and <b> conditions applied.

If condition <a> is hidden but <b> is revealed, the string 'ababab ab abab'
is always revealed.  That is, if condition <a> is revealed OR condition <b>
is revealed, then the string is revealed.

A compound condition <a&b> is created to solve this problem:

    xxxx <a>aaaaaa aaaaa</a><a&b>ababab ab</a&b><b> bbbb bbb</b> xxxx

The user hides both conditions <a> and <a&b> in order to hide the string
'ababab ab'.  But this way madness lies: five conditions can lead to 2^5 =
32 potential compound conditions (remember Permutations and Combinations
from high school maths?).

[Ahem!  Michael Mueller-Hillebrand correctly points out that the number of
combinations is a factorial:

    conditions! = 14! = 7.6 x 10^24 (whew!)

In practice, there are 161 different atomic and compound conditions in use;
still a lot!]

A POSSIBLE FRAMESCRIPT SOLUTION

The desired behaviour is for conditions to be ANDed: if condition <a> is
revealed AND condition <b> is revealed, then the string is revealed.  If
one condition is hidden, the AND expression is FALSE, causing the string to
be hidden.

The user would initially apply only atomic conditions to the text,
overlapping them as necessary.

A FrameScript would ask the user which conditions are to be hidden.  It
would then scan the text and, wherever it found an overlap of revealed and
hidden conditions, it would create a temporary compound condition.  It
would then hide the compound conditions and the specified atomic
conditions.

After the deliverable had been generated, another FrameScript would revert
all the compound conditions to overlapping atomic conditions.

DIFFICULTY OF IMPLEMENTATION

This person is considering commissioning such a FrameScript and therefore
seeks expressions of interest from this list.  But first ...

@   Is the algorithm outlined above possible?
@   How slow would it be?  I have a horrible suspicion that the script
would
    have to loop over each character in a para, testing for conditions, in
    order to locate the start and end points of overlapping conditions.
    Looping over an entire book's worth of paras could take weeks.
@   How many hours of effort would be required?  I don't have the time for
this
    interesting intellectual challenge but need to go to this person with
some
    idea of time and effort.
@   Can anybody think of a more elegant and faster algorithm?

[Windows 2000, FrameMaker 5.5.6p145, FrameScript 1.27C01, Enhance 2.03,
Acrobat 4.05.2, mif2go 31r25, IXgen 5.5.h]

Regards,
Hedley

--
Hedley Finger, Technical communicator and FrameMaker mentor
Adobe Certified Expert, FrameMaker 5.5.x
MYOB Australia
<http://www.myob.com>   <http://www.myob.com.au>
P.O. box 371   Blackburn VIC 3130   Australia
370 Whitehorse Road   Nunawading VIC 3010   Australia
Tel. +61 3 9894 0945   Mob. +61 412 461 558
<mailto:hedley_finger@myob.com.au>



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