[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Standardizing HTML look-and-feel in XSL (named templates)

Subject: Standardizing HTML look-and-feel in XSL (named templates)
From: "Bernie H." <bernie@xxxxxxxxxxxxxx>
Date: Tue, 7 Dec 1999 21:08:44 -0500
html look and feel
I'm having trouble figuring out the best way to define a standardized HTML look-and-feel across my entire XSL page.  For example, I want to define a named template ("TABLE_CELL") that wraps a <TD></TD> set around whatever calls it.  I want to use this for all my XML elements so that I can change the BGCOLOR attribute in it and have the change apply throughout.

<xsl:template name="TABLE_CELL">
   <TD BGCOLOR="#000000">
      <xsl:value-of select="."/>
   </TD>
</xsl:template>

However, the <xsl:call-template> call seems to be very restrictive.  For example, if I want to also periodically use this hypothetical "BOLD" named template to wrap <B></B> tags...

<xsl:template name="BOLD">
   <B>
      <xsl:value-of select="."/>
   </B>
</xsl:template>

... I can't.  My lame attempt so far looks like this:

<xsl:template match="NAME">
   <xsl:call-template name="TABLE_CELL">
      <xsl:call-template name="BOLD"/>
   </xsl:call-template>
</xsl:template>

... but it only executes the "TABLE_CELL" named template.

Has anyone else tried to do this type of thing before?  Am I thinking about this problem the wrong way?

For the sake of this argument, I'm sticking with pure XSL Transformations (i.e. no "fo:" formatting namespace>.

Thanks,
Bernie
bernie@xxxxxxxxxxxxxx

_________________________________
Breakbeat Era/ES Sports Contest Givaway
http://www.platform.net/ads/100699breakbeatera/

Win a platstation:
SignUP at http://www.platform.net


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.