Subject: How to specify the output type from within a SGML document? From: "Didier PH Martin" <martind@xxxxxxxxxxxxx> Date: Fri, 22 Jan 1999 11:10:49 -0500 |
Hi, <Destination> Everybody concerned with the progress of SGML. <Problem> How to specify output type from within a SGML document? <Hypothesis> a) In a processing instruction b) something else? (open to suggestions) <Discussion> DSSSL FOs provide a certain media independence. For example, a RTF reader can display a "virtual" paper page on a screen. A WMF (windows Metafile) can display a "virtual" page on screen too. Thus, a DSSSL script could be identical for both output types. It is common usage to identify output types by their file extensions like rtf for ".rtf" and wmf for ".wmf". In Jade, the output type is specified by a command line parameter. This output type specification cannot work with on-line tools like browsers or simple end users electronic books. Jade already use processing instructions to associate a DSSSL style sheet to a SGML/XML document. Such a style sheet PI includes the style sheet MIME type (type="text/dsssl") and the style sheet location (href="../common/test.dsl or href="http://mydomain.com/test.dsl"). The location can be specified either by a relative or absolute path. However, no provisions are set for output types. In fact, as said earlier, the output type is specified in the command line. W3 already has a specification for style sheets but this is only in the context of XML (http://www.w3.org/TR/1999/PR-xml-stylesheet-19990114). In this context, a style sheet may specify the rendering media as already specified for CSS (http://www.w3.org/TR/REC-html40/present/styles.html#h-14.6) and more specifically media types are specified with media descriptors. the default attribute being "screen" (http://www.w3.org/TR/REC-html40/types.html#h-6.13). The problem with W3 specification is that only one property is reserved for "screen" display. As already stated, a "screen" can display different output types that we will call for this thread of discussion "rendering languages". For instance, rtf or wmf are rendering languages and so is also other languages like Postscript, bml (ibm's bean markup language), etc... Thus, to say that the output is directed to a screen is insufficient, we also need to specify what is the "rendering language". This is, what is done with Jade's command line. When the parameter -t is set to rtf, jade creates an output containing the rendering language "rtf". If we add a new WMF backend, the output could then contain the WMF rendering language. etc.. We need a style sheet property specifying explicitly the rendering language. This property would be added to the properties already present in the style sheet PI. My suggestion is that this property is to be called "output" and set to the output MIME type. <EXAMPLES> case 1: <?stylesheet href="../common/test.dsl" type="text/dsssl" output="text/rtf"> (note: the MIME type could also be "application/rtf". We'll choose the official one). In this case, the output content is created with the rtf rendering language. like for CSS or XML style sheets, we consider by default that the default media is "screen". Thus, the content is send to the "screen" object for interpretation and rendering. the result should then be seen within a rtf viewer like word, word viewer or any other kind of viewer. If interpreted in the context of a browser, this PI gives instruction to the browser to transform the sgml document into a rtf entity using a dsssl interpreter. case 2: <?xml-stylesheet href="../common/test.dsl" type"text/dsssl" output="image/x-wmf"?>. This case show a XML context. The PI should then ends with "?>". The new specification changed the "xml:stylesheet" name space based notation for "xml-stylesheet". Like the other example, the default output type is set to "screen". the output content is a binary stream. WMF is not a rendering language but instead a stream of display instructions like dwg (AutoCAD). This kind of binary stream is also called a display list. If the SGML file containing this kind of PI is interpreted by a browser, it is given to a dsssl interpreter to transform the input SGML stream into a WMF output stream. The output stream is then directed to the "screen" media object. <Conclusion> as actually processed by jade, a SGML document containing a PI starting with "<?stylesheet...>", "<?xml:stylesheet...?>", "<?xml-stylesheet...?> specify to the processor (ex: a document viewer, a browser, etc.) that the rendering instructions are contained in this PI. - href: provide the stylesheet script location. the location is a file system path or a URL. The best way would be that this href would always be a URL, a URN or a Formal System Identifier. Suggestions? - type: provide the style sheet MIME type. For dsssl the MIME type is "text/dsssl". for cascading style sheets the MIME type is "text/css". - output: provide the output stream MIME type. For instance, rtf output stream is "text/rtf", wmf is "image/x-wmf", Tex is "text/tex". - media: provide the output content renderer. If this property is not present, it is assumed that the default value is "screen" in the context of a browser and file in the context of a command line processor. In all cases, the dsssl processor produces an output stream and this output stream is directed to the right rendering processor depending on the usage context. <Request for Comments> The "output" property is added to the style sheet PI for SGML/XML documents but more particularly for sgml documents (I don't have to recall that xml is a sgml subset). The output property is set with an output stream MIME type. For browsers or on-line document viewers, the "media" property is set by default to "screen", for command line processor it is set to "file". If the media property is not included in the PI, the default value is set by the document processor (ex: a browser, a command line processor). This proposal is open to comments and comments are even encouraged. Regards Didier PH Martin mailto:martind@xxxxxxxxxxxxx http://www.netfolder.com DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: dsssl, mode and with-mode, David Carlisle | Thread | Is it possible to process architect, Norman Gray |
Re: dsssl, mode and with-mode, David Carlisle | Date | Is it possible to process architect, Norman Gray |
Month |