[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Heretical view

Subject: Re: Heretical view
From: Scott Ferguson <ferg@xxxxxxxxxx>
Date: Sat, 13 Feb 1999 18:22:39 +0000
ferguson sat
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.