Re: (dsssl) Comparing style sheet languages

Subject: Re: (dsssl) Comparing style sheet languages
From: "Christopher R. Maden" <crism@xxxxxxxxx>
Date: Wed, 26 Jun 2002 12:42:01 -0700
At 06:15 26/6/02, Håkon Wium Lie wrote:
I'm putting together a page to compare various style sheet languages.

http://people.opera.com/howcome/2002/style/chart.html

The purpose of this message is to ask for help filling in the empty
cells in teh DSSSL column. Also, and other comments, corrections or
contributions you may have is welcome.

=== I believe that the code for doubling H1's size is correct.

===
To increase it by 4 pt, try (+ 4pt (inherited-font-size)).

===
For doubling the base size, I would use a variable rather than defining the em unit:


(define base-size 12pt)

(element H1
  (make paragraph
        font-size: (* 2 base-size)))

===
To find <li> with <ol> ancestor, you need conditionals like P:

(element LI
  (if (not (node-list-empty? (ancestor "OL")))
    ...
    ...))

===
Similarly for P as the first child:

(element P
  (if (absolute-first-sibling? (current-node))
    ...
    ...))

===
... and as the first child of its type:

(element P
  (if (first-sibling? (current-node))
    ...
    ...))

===
For testing attribute existence:

(element NOTE
  (if (not (node-list-empty? (attribute "WARNING")))
    ...
    ...))

===
Selecting odd-numbered elements

(element TR
  (if (= (modulo (child-number) 2)
         0)
    ...   ;even-row
    ...)) ;odd-row

===
The base unit for DSSSL is the meter, m.  Pre-defined derived units are:

(define-unit cm 0.01m)
(define-unit mm 0.001m)
(define-unit in 0.0254m)
(define-unit pt 0.0003527778m)
(define-unit pica 0.004233333m)

DSSSL also supports angular measurement, specified in radians. DSSSL does not support relative lengths *as units* - the inherited values can be used in most cases for that behavior.

===

More later, or maybe someone else will get to it first. I'm hungry now. (-:

~Chris
--
Christopher R. Maden, Principal Consultant, crism consulting
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA


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


Current Thread