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 thing to do would be to allow XSL and dsssl style sheets to contain PIs specifying 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 would 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 style 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 but each style sheet specify its own media type? <Issue> To define a set of style sheets specified up front in the XML document is useful for a document interpreter (ex: a browser) because it can from this list construct a rendering selection device (ex: a context menu) to allow the user to choose a particular operation and have this operation (i.e. selection) associated to a particular style sheet. For example, the default operation would be "display on the screen" but a menu allows the operation "print" which uses an other style sheet. When then have to include the list of PI in the XML document. If the media property is included in the XML PIs the browser has to parse the PIs anyway, so if the PI contains the media property, the association with rendering device and operation is completed. Otherwise further processing is required in the style sheet. However, having the media property may have the advantage to de-couple the rendering device from the original PI. <Conclusion> I guess the best thing would be to have both mechanism. a) the XML PI can include the media property b) or the XML PI only contain the style sheet 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 author of a XML document, a XML interpreter could not be able to use a new media. One solution (I think your solution b) is to use two Style Sheet. One is specified 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: <Header> <Title> My Title </Title> <Author> My Name </Author> </Header> Could become something like that after the PIs of my own Style sheet: <fo:block ...> <fo:block ...> My Title </fo:block> <fo:block ...> My Name </fo:block> </fo:block> 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} \maketitle 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: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: About the style processing inst, Didier PH Martin | Thread | Re: About the style processing inst, Chris Maden |
Re: XSL dependency to SGML apps, Chris Maden | Date | RE: Apologies, XML to HTML conversi, Didier PH Martin |
Month |