Re: yet another tag and conditional text
Dave_Raggett <dsr@hplb.hpl.hp.com>
From: Dave_Raggett <dsr@hplb.hpl.hp.com>
Message-id: <9308031017.AA00589@manuel.hpl.hp.com>
Subject: Re: yet another tag and conditional text
To: WWW-TALK@nxoc01.cern.ch
Date: Tue, 3 Aug 93 11:17:36 BST
Mailer: Elm [revision: 66.36.1.1]
Status: RO
frans van hoesel says:
> more and more documents begin to contain lements that are only
> there for interactive usage (eg left and right arrows for navigation)
> when printing these documents to paper it would be nice if they could
> be suppressed.
> so I propose yet another tag or parameter to a tag to indicate that
> the next part is not to be used when printing the document to paper.
Before explaining how this might be done, I want to argue that this is
problem is an artifact and will disappear with HTML+
Most hypertext links in documents act as cross references, and are pertinent
to the part of the document in which they appear. General navigation links
such as up, next and prev apply to the document node as a whole. These links
should be defined with the LINK element, and the HTML+ spec suggests that
they appear on a toolbar or navigation menu. They are then available even
when the user has scrolled down several windowfuls. Using the LINK element in
this way makes the whole problem go away!
The HTML+ spec also describes a way of defining such links implicitly, whereby
they are inferred from the context. This is useful for large documents which
span a large number of HTML+ nodes.
The simplest way to indicate which parts are for online/printing use only
would be to define new tags, e.g.
<online> online use only </online> <print> used only when printing </print>
This seems quite elegant to me. However, the SGML standard suggests you
use marked sections for ignoring given sections during certain processing runs.
To use SGML marked sections, the *browser* (not the document) needs to include
two entity definitions which depend on whether the HTML+ document is being
printed or viewed online.
For online use:
<!ENTITY % online "INCLUDE">
<!ENTITY % print "IGNORE">
For printing:
<!ENTITY % online "IGNORE">
<!ENTITY % print "INCLUDE">
The document then includes marked sections:
<![%online; [ -- put markup for online use here -- ]]>
<![%print; [ -- put markup for printing only here -- ]]>
The SGML parser then ignores marked sections starting with "<![IGNORE ["
but includes marked sections starting with "<![INCLUDE [".
Please let me know if my description of links in the HTML+ spec is unclear.
My somewhat concise writing style is probably confusing folks.
Best wishes,
Dave Raggett