C
confused
Bear with me on this its a bit long.
I have some xml with a section like
<product>
<name>a great product</name>
</product>
I use javascript to parse this with an xsl template and place the
output in a <DIV> in the containing html page.
All fine so far.
Now I want to highlight some special offers so I change the XML to be
<product>
<name><p style="background-color:yellow;color:red;">a great product</
p></name>
</product>
which works as long as I use the <xsl:copy-of select="name"> in the
xsl.
but I don't really want to plaster this around the xml so I simplified
it to
<product>
<name><p class="specialOffer">a great product</p></name>
</product>
a created a css entry in an external style sheet of
..specialOffer
{
color: red;
background-color: yellow;
}
Again works, but I'm still not happy with this what I want is to
change it to
<product>
<name><specialOffer>a great product</specialOffer></name>
</product>
and use the css entry
specialOffer
{
color: red;
background-color: yellow;
}
but this doesn't seem to work, Why not? any ideas
Many Thanks in advance espcially if you managed to read this far
P.
I have some xml with a section like
<product>
<name>a great product</name>
</product>
I use javascript to parse this with an xsl template and place the
output in a <DIV> in the containing html page.
All fine so far.
Now I want to highlight some special offers so I change the XML to be
<product>
<name><p style="background-color:yellow;color:red;">a great product</
p></name>
</product>
which works as long as I use the <xsl:copy-of select="name"> in the
xsl.
but I don't really want to plaster this around the xml so I simplified
it to
<product>
<name><p class="specialOffer">a great product</p></name>
</product>
a created a css entry in an external style sheet of
..specialOffer
{
color: red;
background-color: yellow;
}
Again works, but I'm still not happy with this what I want is to
change it to
<product>
<name><specialOffer>a great product</specialOffer></name>
</product>
and use the css entry
specialOffer
{
color: red;
background-color: yellow;
}
but this doesn't seem to work, Why not? any ideas
Many Thanks in advance espcially if you managed to read this far
P.