|
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:stylesheet>
<css:rule match=[XSL_match_pattern]
[css_attributes]
/>
<css:media type='print'>
[css_rules]
</css:media>
</css:stylesheet>
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"]'
color='blue'/>
<css:rule match='A/link()' color='red'/>
<css:media type='print'>
<css:rule match='BODY' font-size='10pt'/>
</css:media>
// supporting @page
<css:rule match='page()/left()' margin-left='4cm'/>
<css:rule match='H1/before()'
content='"Chapter " counter(chapter) ". "'
counter-increment='chapter'
counter-reset='section'/>
<css:rule match='H1|H2|H3' font-style='italic'/>
<css:rule match='D'
display='inline'
font-weight='bolder'/>
Scott Ferguson
Caucho Technology
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Fw: Heretical view, Oren Ben-Kiki | Thread | Fw: Heretical view, Oren Ben-Kiki |
| Re: CSS and XSL, Chris Lilley | Date | Re: Venting, uche . ogbuji |
| Month |