This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Lifting xml values to use as html attributes / rendering data to html


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 02 July 2002 01:05, Jarkko.Moilanen@uta.fi wrote:
> <xsl:element name="table">
> <xsl:attribute name = "bgcolor" >
> <xsl:value-of select = "row/cell/navcolour" />
> </xsl:attribute>
> <p>text</p>
> </xsl:element>

No need to use <xsl:element>; you can do it with just:

<table>
  <xsl:attribute name="bgcolor">
    <xsl:value-of select="row/cel/navcolour"/>
  </xsl:attribute>
  ...
</table>

Or, even simpler, you can use an Attribute Value Template (curly-braces) and 
skip the <xsl:attribute tag as well:

<table bgcolor="{row/cell/navcolour}">
  ...
</table>

- -- 
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9IWM5NSZCJx7tYycRAgKAAKC7lPKlbfDRZr6jcmRXbkdlTJwgQwCdHUwm
V3uytzSKZmV/jC1fEvRpmz8=
=mdZH
-----END PGP SIGNATURE-----


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]