<?xml version="1.0" encoding="UTF-8"?>
<!-- Stylesheet used to generate HTML content and slides -->
<!-- I. Herman $Date: 2003/10/28 12:08:14 $ -->
<!--
     Copyright (c) 2003 W3C
     See http://www.w3.org/Consortium/Legal/copyright-software-19980720
     for W3C software licensing (open source compatible)
     Author: Ivan Herman <ivan@w3.org>     
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x="http://www.w3.org/1999/xhtml" xmlns:slide="http://www.w3.org/Consortium/Offices/Presentation/xsltSlidemaker" xmlns:xlink="http://www.w3.org/1999/xlink">
    <xsl:import href="common.xsl"/>
    <xsl:output method="text"/>
    <!-- ======================================================= -->
    <!--     Parameters governing the behaviour of the script    -->
    <!-- ======================================================= -->
    <xsl:param name="SVGMove" select="false"/>
    <xsl:param name="SVGURLs" select="'absolute'"/>
    <xsl:param name="SVGtoImage" select="'none'"/>
    <!-- this is meaningless here -->
    <xsl:variable name="ZippedReferences" select="'false'"/>
    <!-- The command name to be used for the image generation -->
    <xsl:variable name="command">svgRasterizer.bat -onload -bg 255.255.255.255</xsl:variable>
    <!-- ========================================================== -->
    <xsl:template match="x:html//x:object[@type='image/svg+xml']">
        <xsl:variable name="fileName" select="./@data"/>
        <xsl:variable name="name">
            <xsl:call-template name="basename">
                <xsl:with-param name="in" select="$fileName"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="sizes">
            <xsl:call-template name="getImgSizes">
                <xsl:with-param name="object" select="."/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="w" select="substring-before($sizes,';')"/>
        <xsl:variable name="h" select="substring-after($sizes,';')"/>
        <xsl:variable name="finalW" select="substring-after($w,':')"/>
        <xsl:variable name="finalH" select="substring-after($h,':')"/>
        <xsl:value-of select="concat('# File: ',$fileName)"/>
        <xsl:text>&#xA;</xsl:text>
        <xsl:value-of select="concat($command,' -w ',$finalW,' -h ',$finalH,' ',$name)"/>
        <xsl:text>&#xA;</xsl:text>
        <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="node()|@*">
        <xsl:apply-templates select="node()|@*"/>
    </xsl:template>
</xsl:stylesheet>
