RE: mode/with-mode

Subject: RE: mode/with-mode
From: Avi Kivity <Avi@xxxxxxxxxxxxx>
Date: Tue, 24 Aug 1999 14:25:21 +0300
On Tuesday, August 24, 1999 13:56, Jon Haugsand [SMTP:Jon.Haugsand@xxxxx]
wrote:
> 
> Bad example, I admit. What I _really_ try to do is, given an sgml file
> like the following:
> 
> <section>
> <option>
>  <title>Example</title>
>  <option-value>Yes</option-value>
>  <option-value>No</option-value>
> </option>
> <option>
>   <title>Level</title>
>   <option-value>Easy</option-value>
>   <option-value>Medium</option-value>
>   <option-value>Advanced</option-value>
> </option>
> 
> <paragraph option="level easy">
>    text text
> </paragraph>
> <paragraph>
>    text text
> </paragraph>
> <paragraph option="example yes">
>   text text
> </paragraph>
> ...
> </section>
> 
> What I would like to do with this is to generate six files, one for
> each combination of options such that whenever the attribute option in
> a paragraph-tag is present, this node is only included where it
> belongs. At the header of each file there is a menu so that you can
> enter any of the other documents.
> 
An sgml transformation.

Have a master file point to the document and contain the option selections.
Feed this file to an sgml transformation which creates:

<wrapper>
  <option-set option-selection="..">
     <!-- entire source tree here -->
  </>
  <option-set option-selection="..">
     <!-- entire source tree here -->
  </>
</wrapper>

Then feed this to your formatting stylesheet, which can compare the value of
(attribute "option") to (inherited-attribute-string "option-selection")

I once had to solve the same problem in a different context.
---
"The only words which have meaning are the last ones spoken"



 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread