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

Re: Attribute_Formatting

Subject: Re: Attribute_Formatting
From: Chris Lilley <chris@xxxxxx>
Date: Tue, 06 Apr 1999 18:05:58 +0200
format css listitem

Johnny Lee wrote:

>         Short-time lurker, first-time caller.  I'm wondering about something that
> might very well be rather elementary.  To be a bit more specific, I'm
> wondering how I can format an XML document at the attribute level (using
> XSL).  That is, I need something akin to CSS that can reach "into" an
> element and format according to sub-element (i.e., attribute). 

Do you mean child element, or do you mean attribute? It seems the
latter.

> (I can't be
> limited by CSS in that I cannot make too much use of the attribute "class.")

Not sure what you mean by this. There is an attribute shorthand for the
HTML class attribute, but it does not apply to XML. The longhand form in
CSS can be used for any attribute. Suggest you recheck the CSS2 spec
there regarding attribute selectors.

http://www.w3.org/TR/CSS2/selector.html#attribute-selectors

>  What I
> really need are syntactic examples of how I can take items from the same
> element and format them differently -- according to their respective
> attributes.

Both CSS and XSL can do this.

>         For instance, suppose I have a listing of four <listitems> and want to
> format each in a different way.  How can I do this with XSL?  Can I do this
> with XSL? 

Yes, you can (and I expect others have already replied on this one)

>  Alternatively, how can I accomplish this with DSSSL or CSS? 

listitem[foo=bar] {font: 12pt/14pt "Gill Sans" }

with appropriate substitutions for foo and bar.

DSSL can do that too, of course.

>  (I
> would rather aim for an XSL solution, even though I know of no XSL-capable
> browsers to date.) 

See http://www.indelv.com and try out the thirsd beta of this
interesting XSL browser.

For CSS, try IE4, IE5, Mozilla-derivatives (DocZilla, etc). Opera 3.6
does CSS ok, but doesn't handle XML yet.

For DSSSL, its mostly batch although I think Fujitsu released something
at one point??

--
Chris



 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.