Re: Converting a CSS to a dsl

Subject: Re: Converting a CSS to a dsl
From: James Clark <jjc@xxxxxxxxxx>
Date: Thu, 07 Jan 1999 08:49:28 +0700
-t html is only an experiment and not supported; that's why it's not
documented and, in the most recent release, byt default not even
compiled in. (The main problem is the lack of CSS implementations that
actually implement the CSS spec.  However, I'm hopeful that NGLayout
will do CSS properly, or at least well enough for the HTML backend to be
workable.)

For now you must use -t sgml and generate the HTML markup explicitly.

Didier PH Martin wrote:
> 
> Hi,
> 
> Here is the problem:
> 
> I am using a simple document used by Microsoft to show how CSS and XSL is
> working with XML. I converted the document to SGML and included in it a
> DOCTYPE so that Jade could parse it (Question: is it possible for jade to
> parse a document and process it with a dsssl script without having a doctype
> for this document? - if yes, how can I set Jade to do that?).
> 
> I am trying to convert the CSS into a DSSSL script that will render the
> document as a HTML document. So I use the "-t HTML" flag. The problem is: I
> am having difficulties to get exactly what I get with the CSS. Below are the
> the CSS script and the DSSSL script. Does someone knows t how to set
> background-color or text-color for a element? I am also having difficulties
> to convert from block to ??? in dsssl and from inline to ????? in dsssl.
> 
> So, the problems are:
> - How to set backgroud color and text color?
> - What is the equivalent of a block and a inline in dsssl?
> 
> Basically, what should I modify to get with dsssl what I get with css?
> 
> Thanx a lot for your help
> 
> Didier PH Martin
> mailto:martind@xxxxxxxxxxxxx
> http://www.netfolder.com
> 
> Here are the css and the dsssl scripts:
> 
> CSS:
> ---------------------
> breakfast-menu
> {
>   display:block;
>   font-family:Verdana;
>   font-size:10pt;
> }
> 
> food
> {
>   display:block;
>   margin-top:1em;
> 
> }
> 
> name
> {
>   display:block;
>   background-color:teal;
>   color:white;
>   font:bold 12pt Verdana;
>   padding:4px;
> }
> 
> price
> {
>   display:inline;
>   font-style:italic;
>   font-weight:bold;
>   color:red;
> }
> 
> description
> {
>   display:inline;
> }
> 
> calories
> {
>   display:none;
> }
> 
> DSSSL:
> --------------------------------------
> <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
> 
> (root
>     (make simple-page-sequence
>             (make scroll)
>             (process-children)))
> 
> (element (breakfast-menu)
>     (make paragraph
>         font-family-name:       "Verdana"
>         font-size:              10pt;
>         (process-children)))
> 
> (element (food)
>     (make paragraph
>         (process-children)))
> 
> (element (name)
>     (make paragraph
>         font-family-name:       "Verdana"
>         font-size:              12pt;
>           font-weight:            'bold
>         (process-children)))
> 
> (element (price)
>     (make paragraph
>           font-weight:            'bold
>           font-posture:           'italic
>         (process-children)))
> 
>  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist



 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread