RE: About the style processing instruction

Subject: RE: About the style processing instruction
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Tue, 2 Feb 1999 09:00:34 -0500
Hi Paul,

<Extracts>
> [Paul Fidler]
> > A browser will look for a Link/pi with media="print" when the user
> > hits the print button... [snip]

[Chris]
> But what if I have some print and some on-line rules in the same
> stylesheet?  Surely not unthinkable, since most properties will be the
> same for both media.  This is why CSS provides the @media rules *in*
> the stylesheet, and why XSL has an open issue about how best to
> provide this functionality.  Don't re-invent the wheel.
</Extracts>

<YourComment>
Sorry. I thought I was simply describing the current situation and my
interpretation of what the media attribute was for. I certainly wasn't
trying to re-invent anything.

I would have thought that if you have two radically different stylesheets
for screen and print, then using two stylesheet links with appropriate
media attributes decribing them would be sensible.

If on the other hand  your style style language supports different media
directly (via @media of something like <xsl:template match="a" media="b">)
and you only want minor differences in your output for different media,
then you only need the one stylesheet PI and you needn't bother with a
media attribute since your one stylesheet does it all.
</YourComment>

<Reply>
You are right, you described the current situation and the actual proposal
on the table. In fact, there is one official W3 proposal and the current
discussion in this thread. My hope, is that people involved in thinking
about this within W3 boundaries would take the input from people either
involved in the implementation or the usage. Even more, would start
establish a dialog such that the overall quality of that work would be
increased. I know that some W3 people are open to that but some prefer the
ivory tower and prefer that we shut up and simply implement their will. This
said, let return to the work.

It seems that we will have, like Guy_Murphy said, several situation: a)
people using a style sheet per media, b) people using a single style sheet
for all media. This, according to Guy_Murphy could be a question of
expertise or more simply a question of taste.

To satisfy both needs, both methods should be provided:
a) a XML document contain a list of style sheet processing instructions, one
for each media
b) a XML document contains only one style sheet processing instruction and
the style sheet contains different media section?, macro? elements? This is
specified in the case of CSS by the usage of the @media element but still
fuzzy in the case of XSL and not part of ISO standard for DSSSL.
Your suggestion about the template usage is as valid as any other suggestion
and has the merit that we discuss it as objectively as we can. I'll give it
my own thoughts.

Actually XSL can transform XML into XML but as already mentioned Oren, if
you use the ns="HTML" property (or something having the same construct as a
XML document and a DTD) you can use the template element to create a
template for the media of your choice like, if you want a PDF set of
instructions or a Braille set of instructions. Especially if the DTD
specified that the target element (the resultant element) contains CDATA.

The problem is: we have a XSL engine having several "media" backbends
(aural, print, screen, etc...) and ask it to create a certain output for a
particular media type so, how do we tell the XSL engine this kind of thing?
your idea is that <xsl:template match="a" media="print"> could be a
solution. The other problem is that the XSL engine may not have the adequate
backend to produce, let's say RTF, CGM or Tex output. How can se do that? It
seems (and tell me if I am wrong) that actually I can only output a tag
containing the RTF, CGM or Tex content. The problem is that the tag may
interfere with the engine interpreting the RTF, CGM or Tex rendering
instructions. I mean here that a CGM interpreter wont interpret the tag
enclosing the Tex instructions.

I just reflected what we know (as a group) and the state of our discussion.
If I made a mistake, please correct it.
</Reply>

PS: I hope, this time that nobody will ask me my mail message DTD :-)

Regards
Didier PH Martin
mailto:martind@xxxxxxxxxxxxx
http://www.netfolder.com


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread