Linc

Just a comment - 448MB is *very* low for a Java-based
servlet such as Cocoon - I think at least 2GB is recommended...

Derek

>>> [EMAIL PROTECTED] 2004/09/11 04:15:08 AM >>>
I need to convert multiple wordml images (base64 encoded) to JPG.
I am currently using the following code but get an "Out of Memory"
error. If
I am lucky I get 2 images appear on screen.
I will try importing low quality JPEG into word to see if that helps
and
also thinking of upgrading RAM or PC current spec is Celeron 2.4GHz,
448MB
RAM, Running Windows XP (home edition).


Any clues/recommendations?

Linc

Sitemap.xmap
------------
<map:match pattern="*.jpg">
        <map:generate src="content/content.xml"/>
        <map:transform src="stylesheets/wordml2svg.xsl">
                <map:parameter name="image" value="{1}"/>
        </map:transform>
        <map:serialize type="svg2jpeg"/>
</map:match>


wordml2svg.xsl
--------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml";
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint";
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office">
        <xsl:param name="image"/>
        <xsl:template match="/">
                <xsl:apply-templates select="//w:pict"/>
        </xsl:template>
        <xsl:template match="//w:pict">
                <xsl:if test="v:shape/v:[EMAIL PROTECTED]:title=$image]">
                        <xsl:apply-templates select="w:binData"/>
                </xsl:if>       
        </xsl:template>
        <xsl:template match="w:binData">
                        <svg:svg xmlns:svg="http://www.w3.org/SVG";
width="40" height="30">
                                <svg:g>
                                        <svg:image
xmlns:xlink="http://www.w3.org/1999/xlink"; width="40" height="30">
                                                        <xsl:attribute
name="xlink:href"><xsl:text>data:image/png;base64,</xsl:text><xsl:value-of
select="."/></xsl:attribute>
                                        </svg:image>
                                </svg:g>
                        </svg:svg>
        </xsl:template>
</xsl:stylesheet>







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] 
For additional commands, e-mail: [EMAIL PROTECTED] 


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to