XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: CSS and XML attributes

renata, 
I belive this is only supported in CSS2:

element[attribute] {declaration block}
	example blockquote[title] {color:red;} 
	will make all blockquotes with an attribute title the color red

element[attribute="value"] {declaration block}
	example: h2[align="left"] {color:blue;} 
	will make all h2 using an aligh attribute set to left and make them
blue


Ray,
You need to XSLT and write a template to match the element and display it's
attribute (or you can write a template to match both the element and
attribute):

<xsl:template match="element">
	<h1><xsl:value-of select="@attribute"/></h1>
</xsl:template>

Please correct me if I'm wrong anyone.

LN
-----Original Message-----
From: RaySHughes@Eaton.com [mailto:RaySHughes@Eaton.com]
Sent: Monday, August 21, 2006 12:27 PM
To: rkabiljo@yahoo.com; xml-dev@lists.xml.org
Subject: RE: CSS and XML attributes


Actually, for those who respond to this, I am looking to display the node
attributes. So, please include that with any correspondence if you don't
mind.

Scott




From: renata kabiljo [mailto:rkabiljo@yahoo.com] 
Sent: Monday, August 21, 2006 1:19 AM
To: xml-dev@lists.xml.org
Subject: CSS and XML attributes


Hello,

I am very new to CSS, so I apologize if my question is too trivial - I have
looked at the number of tutorials and samples, but could not find anything
relevant.

In my stylesheet, I would like to specify not how nodes would be displayed,
but how only nodes having an attribute of a certain value will be displayed.
I do not need to display the attribute value, but to use it to display the
nodes according to it (e.g. - different attribute values - different text
color).

Any feedback would be appreciated,

Thanks,

Renata




Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail Beta. 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS