Re: About the style processing instruction

Subject: Re: About the style processing instruction
From: Matthieu DELAHAYE <delahaym@xxxxxxxx>
Date: Mon, 01 Feb 1999 23:05:21 +0100
Hi, Didier

<You said>

Actual CSS2 specs (which I should say is of excellent quality) provide a
mechanism to specify the media type inside a stylesheet. So maybe the
to do would be to allow XSL and dsssl style sheets to contain PIs
the media type like in the following example:
<?xsl:media="screen,application/tex"?> (I used Oren suggestion here). I
guess that in this case we can use the xsl name space. For dsssl that
be <?media="screen,application/tex">.

So tell me if I am right or wrong.
The XML document tell to the document interpreter where is located the
sheet used to render it.
<Your Question>
In your approach, does the XML document specify only one style sheet or
specify a set of style sheets, one for each media?

<Your Question>
Do you mean that the XML document specify one or several style sheets
each style sheet specify its own media type?

 To define a set of style sheets specified up front in the XML document
 useful for a document interpreter (ex: a browser) because it can from
 list construct a rendering selection device (ex: a context menu) to
 the user to choose a particular operation and have this operation (i.e.
 selection) associated to a particular style sheet. For example, the
 operation would be "display on the screen" but a menu allows the
 "print" which uses an other style sheet.
 When then have to include the list of PI in the XML document. If the
 property is included in the XML PIs the browser has to parse the PIs
 so if the PI contains the media property, the association with
 device and operation is completed. Otherwise further processing is
 in the style sheet. However, having the media property may have the
 advantage to de-couple the rendering device from the original PI.
 I guess the best thing would be to have both mechanism. a) the XML PI
 include the media property b) or the XML PI only contain the style
 location and type and a style sheet PI provide the media.
 What do you think?

Here is a general answer:

An XML document could specify several style sheets with their own media,
BUT it could append that an another user wanted to use it on a new media
that the author didn't developped. So I think this is not the best way.
One way is to use the FOs to be more general as possible. BUT as the
of a XML document, a XML interpreter could not be able to use a new

One solution (I think your solution b) is to use two Style Sheet. One is
by the XML document, the other by the interpreter like yours examples
"Display on
screen", and "Print". Be careful, when I spoke about XML document, it's
only about
document which style sheet define a document result with FO namespace.
My proposition
 was in fact a reaction because of the fact that XSL users use PIs only
and no FOs
since they do not have XML interpretor which are able to display FOs. So
my proposition
is to create style sheet to define media only for XML document which
only use FOs (After
transformation by a process).

Thus, authors could use FOs without and so no defining media, since
definition of media 
for FOs would be already existing. 

So to answer to yours questions, I think a document could specify
several style sheet, 
which would allow different presentation, but these style sheets output
is only using FOs.
In this case, the user would decide which is the current media (paper,
screen, ...) and the 
interpretor use the specific XSL attached to this media.

One example:
   <Title> My Title </Title>
   <Author> My Name </Author>

Could become something like that after the PIs of my own Style sheet:

<fo:block ...>
   <fo:block ...>
         My Title 
   <fo:block ...>
         My Name

Where ... correspond to my attribute.
If I want to export it to LaTeX, for example, we could get, after the
utilisation of 
style sheets I propose, this text output:

\title{My title}
\author{My Name}

and among other.  

But it's right an author could have his/her preference, so, both of
yours solutions
are fine, but I prefer the second one which could correspond with mine.

"The only corporate defense against rationality is bureaucracy."
-- anon

 XSL-List info and archive:

Current Thread