Mulberry home page

DSSSList Archive

Mulberry Home Page
DSSSL
DSSSList
Archive
Previous by Date
Next by Date
Previous by Thread
Next by Thread
Index by Thread
Index by Date
Index by Subject
Index by Author
Search

Re: Design for (interactively) customizable DSSSL stylesheets

From: James Clark <[email protected]>
Date: Fri, 28 Mar 1997 18:03:55 +0700
At 10:08 28/03/97 -0800, Norbert H. Mikula wrote:

>What I have in mind looks like :
>
>(define-extended "Basic font-size for the document " doc-general-fn-size
>12pt) 
>
>This would define the variable to the DSSSL engine and keep
>the information that would be given the user agent.

I like the idea of providing a way for supporting simple customizations by
user, but I don't think that's going to be enough.  A user agent really
needs to know what are the allowed values for the variable, so that it can
help the user pick an appropriate value; it also needs to provide
user-friendly descriptions of these values.  The other problem is that this
is new syntax, which requires changing the standard, which would take a long
time.

An alternative approach is to take advantage of the fact that DSSSL
stylesheets are SGML documents, and that they are required only to conform
to the DSSSL architecture, so they can contain arbitrary other information
encoded in SGML in addition to the DSSSL specifications themselves.  Thus I
would suggest adding to the stylesheet "customization" elements in SGML:

<customize>
<variable
  name="%visual-acuity%"
  description="Visual Acuity">
<value description="Normal">normal</value>
<value description="Presbyopic">presbyopic</value>
<value description="Large type">large-type</value>
</variable>
</customize>

This is much more flexible.  For example, you might want to have multiple
descriptions in different languages.  Implementations that do not know about
this will just ignore it.  For maximum flexibility, we can define this as
another architecture to which a DSSSL stylesheet can conform in addition to
the DSSSL-defined architecture.

Also this allows us to support more interesting kinds of customization.  For
example, if somebody adds a new element type to their DTD, we can allow them
to select from a list of behaviours (each corresponding to procedure that's
called by the construction rule for the element).  One could imagine this
making it possible to have one very sophisticated stylesheet which could be
easily customized by the user for a wide range of DTDs.

James