xsl-list
[Top] [All Lists]

[xsl] Obtaining Graphic File Widths

2006-07-10 13:14:53
Hello All,

I am trying to set up my stylesheet/FO so that it would be able to look at
any graphic files used an XML file and obtain the actual width of the image.
Is it possible to get the width value of a graphic file (we are using SVGs)
using a Java extension or by some other method? I have tired using the
document() function to call on the SVG (since it is an XML file after all)
and grab the width attribute, but apparently the document function only
works on files with a .xml extension. I have also tried using the
ximg:getWidth function but didn?t have much luck with that either?not sure,
but this might be because I am not using the Docbook stylesheet. I was able
to plug everything into my styleheet but only got 0 as a return value for
the graphic width.

        <xsl:when test="function-available('ximg:getWidth')">
               <xsl:value-of select="ximg:getWidth(ximg:new($filename),
                                                $nominal.image.width)"/>
        </xsl:when>

I am currently using Xalan 2.7.0 with Antenna House?s XSLFormatter V3 for my
PDF output.

Any help would be greatly appreciated.

Thanks,

Ryan Lubben
Content Management Developer/
Technical Writer
Ken Cook Company
ryanl(_at_)kencook(_dot_)com



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>