|
Subject: Re: A better way to be selective From: Geir Ove Gronmo <geirog@xxxxxxxx> Date: Thu, 24 Apr 1997 14:19:36 +0100 |
At 11:56 24.04.97 +0100, you wrote:
>I hadn't realised the extent to which named ports and labelled sosofos
>were supported. Here's a basic template for selective processing, works in
>jade-0.5 or 0.7:
[snip]
Thank you! This is definitely very interesting.
I've changed your spec a little bit. I've changed *winning-gis* to
*loosing-gis*, because this is really what I want. I know what elements
that should be "hidden".
What I would like to do is to label elements that should be hidden and
those that should be shown. Rest of the elements should inherit from
their ancestors.
I've tried this with my sample document. But PARA is discarded because Chapter
is a "*loosing-gi". I don't what that to happen. :-)
Any ideas?
-------------------------
<!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
(root (make simple-page-sequence
(make scroll
content-map: '((win #f))
(sosofo-discard-labeled (make sequence) 'lose))))
(define *losing-gis* '("NOTE" "CHAPTER"))
(default
(if (member (gi) *losing-gis*)
(make paragraph label: 'lose
(with-mode index (process-node-list (current-node))))
;; discard everything else in due course
(make sequence label: 'win)))
(mode index (default (make paragraph)))
(element PARA
(make paragraph label: 'win))
-------------------------
My sample document:
<!DOCTYPE Doc [
<!ELEMENT Doc - - (Title, Chapter+)>
<!ELEMENT Chapter - - (Title, (Para|Note)+, Section*)>
<!ELEMENT Section - - (Title, (Para|Note|Footnote)+)>
<!ELEMENT (Title|Note|Para|Footnote) - - (#PCDATA)>
]>
<Doc>
<Title>Document title</Title>
<Chapter>
<Title>Chapter title</Title>
<Para>Chapter Paragraph</Para>
<Para>Chapter Paragraph</Para>
<Note>Chapter Note</Note>
<Section>
<Title>Section title</Title>
<Para>Section Paragraph</Para>
<Footnote>Section Footnote</Footnote>
<Para>Section Paragraph</Para>
</Section>
</Chapter>
</Doc>
-------------------------
<?Gr0ve?>
------------------ Geir Ove Grønmo ------------------
Falch Infotek as, Stanseveien 21, 0902 Oslo, Norway
Phone: +47 22 90 27 36 Fax: +47 22 90 25 99
[grove@xxxxxxxx | http://www.falch.no/people/geirog]
-------------------------------------------------------
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| A better way to be selective, Henry S. Thompson | Thread | A better way to be selective, Henry S. Thompson |
| Re: jadetex new, Sebastian Rahtz | Date | Re: selectivity, Henry S. Thompson |
| Month |