[Home] [By Thread] [By Date] [Recent Entries]
Doug,
Paul's solution is nice because if your input doesn't have a border attribute to copy, it avoids getting border="" in your output (which you might get with plain border="{@border}" in your stylesheet). It can be further refined as follows: <xsl:template match="table">
<table cellspacing="0" cellpadding="0">
<xsl:copy-of select="@border"/>
<!-- do the table thing -->
</table>
</xsl:template>which can be further generalized to catch all three attributes: <xsl:template match="table">
<table>
<xsl:copy-of select="@*"/>
<!-- do the table thing -->
</table>
</xsl:template>-- if you want to copy them all from the input, not set them yourself. Cheers, Wendell At 12:17 PM 9/28/01, Paul wrote: If you *always* want to emit a border attribute, and you *always* want it to be a numeric value (not null), here's an easy way: ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



