#115 scale does hscale but not vscale

packaging problem
closed-out-of-date
nobody
XSL (1066)
5
2002-05-12
2001-09-15
No

The following XML code is meant to render an image
at 10% of full scale in both directions:

<imagedata fileref="thumbsup.png" format="png"
scale="10"/></imageobject>

However, it scales the image by 10% only in the
horizontal direction. This seems to be because
the value of the scale parameter is not implemented
in the stylesheet module:
docbook/xsl/html/graphics.xsl

The following patch, applied to the most recent
version of graphics.xsl in the CVS repository (i.e.,
version 1.5), appears to fix the problem.

--- graphics.xsl Fri Sep 14 16:35:46 2001
+++ graphics.xsl.fix Fri Sep 14 17:05:36 2001
@@ -101,7 +101,7 @@

<xsl:variable name="height">
<xsl:choose>
- <xsl:when test="@scale"></xsl:when>
+ <xsl:when test="@scale"><xsl:value-of
select="@scale"/>%</xsl:when>
<xsl:when test="@depth"><xsl:value-of
select="@depth"/></xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
).

Discussion

  • Norman Walsh

    Norman Walsh - 2001-09-22

    Logged In: YES
    user_id=81663

    I thought scaling the width but not the height would
    effectively scale both directions (whereas scaling both
    would potentially produce anamorphic scaling).

    What browser scales only the width?

     
  • Norman Walsh

    Norman Walsh - 2002-05-12

    Logged In: YES
    user_id=81663

    The code for handling graphic attributes has been completely
    reworked (and now supports the additional attributes of
    DocBook V4.2). I think this problem is fixed.

     
  • Norman Walsh

    Norman Walsh - 2002-05-12
    • status: open --> closed-out-of-date
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks