[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)
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|