Subject: Re: Attribute_Formatting From: Chris Lilley <chris@xxxxxx> Date: Tue, 06 Apr 1999 18:05:58 +0200 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Attribute_Formatting, Johnny Lee | Thread | RE: Attribute_Formatting, Sall, Ken |
Re: Question: empty elements in XML, Duane Nickull | Date | Re: Creating Hyperlinks using XSL a, John E. Simpson |
Month |