Re: Heretical view

Subject: Re: Heretical view
From: Scott Ferguson <ferg@xxxxxxxxxx>
Date: Sat, 13 Feb 1999 18:22:39 +0000
Oren Ben-Kiki wrote:

> CSS is based on the notion of attaching styling information to an XML tree
> without transformation. This allows me to dynamically change the style,
> again without transformations. Since the same style can be associated with
> several separate XML elements, one can easily cause wide-ranging dynamic
> styling effects by modifying a small number of style sheets.

I completely agree with your post.

How about this translation of css?


<css:rule match=[XSL_match_pattern]

<css:media type='print'>


Where [XSL_match_pattern] is an XSL match pattern and [css_attributes] are exactly the
attributes in the css spec.

XSL match pattern has the following extensions:

OtherMatchExpr ::= PredicateExpr

PredicateExpr ::= link()
                | visited()
                | active()
                | hover()
                | focus()
                | lang(c)
                | is-id(constant)

Examples taken from the CSS2 spec:

<css:rule match='SPAN[hello="Cleveland" and goodbye="Columbus"]'

<css:rule match='A/link()' color='red'/>

<css:media type='print'>
  <css:rule match='BODY' font-size='10pt'/>

// supporting @page
<css:rule match='page()/left()' margin-left='4cm'/>

<css:rule match='H1/before()'
  content='"Chapter " counter(chapter) ". "'

<css:rule match='H1|H2|H3' font-style='italic'/>

<css:rule match='D'

Scott Ferguson
Caucho Technology

 XSL-List info and archive:

Current Thread