crossley 01/10/29 19:07:47 Modified: documentation/stylesheets document2html.xsl Log: Utilise height and width attributes for figure element to enable faster page rendering Revision Changes Path 1.4 +11 -2 xml-cocoon2/documentation/stylesheets/document2html.xsl Index: document2html.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/documentation/stylesheets/document2html.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- document2html.xsl 2001/10/02 10:17:11 1.3 +++ document2html.xsl 2001/10/30 03:07:47 1.4 @@ -334,7 +334,16 @@ <!-- ====================================================================== --> <xsl:template match="figure"> - <p align="center"><img src="{@src}" alt="{@alt}" border="0" vspace="4" hspace="4"/></p> + <p align="center"> + <xsl:choose> + <xsl:when test="string(@width) and string(@height)"> + <img src="{@src}" alt="{@alt}" width="{@width}" height="{@height}" border="0" vspace="4" hspace="4"/> + </xsl:when> + <xsl:otherwise> + <img src="{@src}" alt="{@alt}" border="0" vspace="4" hspace="4"/> + </xsl:otherwise> + </xsl:choose> + </p> </xsl:template> <xsl:template match="img"> @@ -377,4 +386,4 @@ <br/> </xsl:template> -</xsl:stylesheet> \ No newline at end of file +</xsl:stylesheet>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]