Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: xsl attributes

From: Martin Honnen <mahotrash@-----.-->
To: NULL
Date: 4/5/2006 4:40:00 PM



Mike P wrote:

> If this piece of code sets the bgcolor to the value of @StatusColor,
> 
> <xsl:attribute name="bgcolor">
>                   <xsl:value-of select="@StatusColor" />
>                 </xsl:attribute>
> 
> why doesn't replacing 'bgcolor' with 'color' or 'forecolor' set the
> forecolor to the value of @StatusColor?

Well you do not even show us what kind of element you are setting that 
attribute on. If you are generating HTML and that is a td or th cell 
element for instance then HTML 4 defines bgcolor as an attribute but 
neither color nor forecolor 
(<http://www.w3.org/TR/html4/present/graphics.html#adef-bgcolor>). If 
that is a HTML body element then the text attribute is a deprecated way 
to suggest the text color 
(<http://www.w3.org/TR/html4/struct/global.html#edef-BODY>).
So you are asking in the wrong group if this is an HTML problem, XSLT 
simply generates some result tree and serializes that, whether bgcolor 
or color or forecolor has any meaning depends on the HTML or XML you 
generate. Nowadays if that is HTML then you should generate the proper 
structure with HTML and suggest the wanted presentation with CSS, see 
the CSS 2.1 specification <http://www.w3.org/TR/CSS21/> or try a CSS 
tutorial.

-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent