|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Heretical view
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








