Hello, how can I insert a single image on the top of a XSL document?
I tried this code below:
<xsl:stylesheet version="1.0"
xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:user="urn:my-scripts"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" >
<xsl:template match="/">
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
<!-- Styles added.... -->
<Styles>
<Style ss:ID="Default" ss:Name="Normal">
<Alignment ss:Horizontal="Left" ss:Vertical="Bottom"/>
<Borders/>
<Font ss:FontName="Times New Roman" x:Family="Roman" ss:Size="8"/>
<Interior/>
<NumberFormat/>
<Protection/>
</Style>
<Style ss:ID="sWrapText">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom" ss:WrapText="1"/>
<Font ss:FontName="Times New Roman" x:Family="Roman" ss:Size="8"/>
</Style>
<Style ss:ID="s21">
<Font ss:FontName="Times New Roman" x:Family="Roman" ss:Size="8"/>
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
</Style>
<Style ss:ID="s22">
<Borders>
<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
<Border ss:Position="Left" ss:LineStyle="None" ss:Weight="0"/>
<Border ss:Position="Right" ss:LineStyle="None" ss:Weight="0"/>
<Border ss:Position="Top" ss:LineStyle="None" ss:Weight="0"/>
</Borders>
<Font ss:FontName="Times New Roman" x:Family="Roman" ss:Size="10" ss:Color="#000000" ss:Bold="1"/>
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
<Interior ss:Color="#3fbecc" ss:Pattern="Solid"/>
</Style>
<Style ss:ID="s23">
<Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/>
<Font ss:FontName="Times New Roman" x:Family="Roman" ss:Size="8"/>
</Style>
</Styles>
<xsl:apply-templates/>
</Workbook>
</xsl:template>
<xsl:template match="/*">
<Worksheet>
<xsl:attribute name="ss:Name">
<xsl:value-of select="local-name(/*/*)"/>
</xsl:attribute>
<Table x:ExpandedColumnCount="10" x:ExpandedRowCount="10" x:FullColumns="1" x:FullRows="1">
<picture>
<xsl:attribute name="source">
<xsl:value-of select="frog.JPG" />
</xsl:attribute>
</picture>
<xsl:for-each select="*[position() = 1]/*">
<Column ss:StyleID="s21" ss:Width="150"/>
</xsl:for-each>
<Row ss:AutoFitHeight="0" ss:Height="50.0625">
<!-- Set the Header Hieght's-->
<xsl:if test="position() = 1">
<xsl:attribute name="ss:Height">50</xsl:attribute>
</xsl:if>
<!-- Set styles for the headers -->
<xsl:for-each select="*[position() = 1]/*">
<Cell ss:StyleID="s22" >
<!-- CHANGE HERE, added style attribute. -->
<Data ss:Type="String">
<xsl:value-of select="local-name()"/>
</Data>
</Cell>
</xsl:for-each>
</Row>
<xsl:apply-templates/>
</Table>
</Worksheet>
</xsl:template>
<xsl:template match="/*/*/*">
<Cell>
<xsl:if test="string-length(.) > 254">
<xsl:attribute name="ss:StyleID">sWrapText</xsl:attribute>
</xsl:if>
<Data ss:Type="String">
<xsl:value-of select="."/>
</Data>
</Cell>
</xsl:template>
<xsl:template match="/*/*">
<Row>
<xsl:if test="string-length(*) > 254">
<xsl:attribute name="ss:Height">
<xsl:for-each select="*[string-length(.) > 254]">
<xsl:sort select="string-length(.)" order="descending"/>
<xsl:if test="position()=1">
<xsl:value-of select="11.25 * (string-length(.) div 50 + 1)"/>
</xsl:if>
</xsl:for-each>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</Row>
</xsl:template>
</xsl:stylesheet>