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

Doing a cascade...

Subject: Doing a cascade...
From: adam_vandenhoven@xxxxxxxxxx
Date: Tue, 22 Jan 2002 11:52:04 -0800
xsl cascade
Hey guys,

I've hit a bit of a wall. I'm sure I've done this before but I haven't had
an opportunity to do any XSLT for 3 months and I'm missing something

Some background:
When I build a framework for a website, I tend to use a hierarchy to
organize my styles, this allows me to reuse class names that make sense. I
might have

.HomePage .headline{color:#efefef;}
.DetailPage .headline{color:#1212ff;}

because my organization get rather complex (and CSS doesn't really allow
you to do things in a hierarchy). I built an XML schema to manage my CSS.
Becuase there are many times when I like to reuse the same chunk of CSS in
different locations, I created an idea of themes that encapsulate them and
are refered to in my rules. The XML looks something like:

 <theme id="sometheme">
  <property name="CSSPropertyName">value</property>
  <property name="CSSPropertyName">value</property>
  <selector><!-- selectors here --></selector>
  <property themeid="sometheme" />
  <property name="CSSPropertyName">value</property>
  <property name="CSSPropertyName">value</property>
    <selector><!-- selectors here --></selector>
    <property name="CSSPropertyName">value</property>
    <property name="CSSPropertyName">value</property>

So far I've been able to generate the selector without a problem. I've run
into problems with generating the properties. What I want to do is create a
cascade (of sorts) of the properties, taking the last instance of a CSS
property from a nodeset that is made up of all the properties of the rule
plus all the properties of the themes that are refered to. The theme
properties would come first and the rule properties would come last.
Ideally I'd like to see the themes retrieved in the order in which they are
listed in the rule but I'm willing to live with source order if I must.

Anyone have any idea?


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.