Subject: Re: [xsl] global language parameter From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 16 Feb 2010 12:40:09 -0500 |
<xsl:template name="add-style">
<xsl:attribute name="style">
<!--what is the margin component-->
<xsl:choose>
<xsl:when test="@rend='indent'">
<xsl:text>text-indent:12mm; margin-top: 0;margin-bottom: 0; </xsl:text>
<xsl:text>line-height:9mm;</xsl:text>
</xsl:when>
<xsl:when test="@rend='plain'">
<xsl:text>text-indent:0;margin-left:0; margin-top:0;</xsl:text>
<xsl:text>margin-bottom: 0; line-height:9mm;</xsl:text>
</xsl:when>
<xsl:when test="@rend='blockquote'">
<xsl:text>text-indent:0;margin-left:12mm; margin-top:1em;</xsl:text>
<xsl:text>margin-bottom: 1em; margin-right: 2em;</xsl:text>
<xsl:text>line-height:9mm;</xsl:text>
</xsl:when>
<xsl:template match="*[@rend='indent']" mode="add-style"> <xsl:text>text-indent:12mm; margin-top: 0;margin-bottom: 0; </xsl:text> <xsl:text>line-height:9mm;</xsl:text> </xsl:template>
<xsl:template match="*[@rend='plain']" mode="add-style"> <xsl:text>text-indent:0;margin-left:0; margin-top:0;</xsl:text> <xsl:text>margin-bottom: 0; line-height:9mm;</xsl:text> </xsl:template>
<xsl:template match="*[@rend='blockquote']" mode="add-style"> <xsl:text>text-indent:0;margin-left:12mm; margin-top:1em;</xsl:text> <xsl:text>margin-bottom: 1em; margin-right: 2em;</xsl:text> <xsl:text>line-height:9mm;</xsl:text> </xsl:template>
<xsl:attribute name="style"> <xsl:apply-templates select="." mode="add-style"/> </xsl:attribute>
Cheers, Wendell
====================================================================== 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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] global language parameter, Charles Muller | Thread | Re: [xsl] global language parameter, Syd Bauman |
Re: [xsl] global language parameter, Charles Muller | Date | [xsl] Creating a hierarchical table, Martin Jackson |
Month |