cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <>
Subject HSSF-Serializer stylesheet (WAS: Re: XSP in a stylesheet help)
Date Wed, 19 Dec 2001 21:17:03 GMT
Thanks everyone who helped.  As it turned out I didn't need XSP (and the
O'Reilly book deceived me).  Here is the final solution to my problem. 
(I ran this against the simple-sql example).  I realize this is the
wrong list to ask, but we'd love to have some more examples if anyone is
game (I'll ask on the developers list as well).



--------------STYLESHEET -------------------

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"

  <xsl:param name="view-source"/>

  <xsl:template match="page">
   <gmr:Workbook xmlns:gmr="">
         <gmr:Sheet DisplayFormulas="false" HideZero="false"
HideGrid="false" HideColHeader="false" HideRowHeader="false"
DisplayOutlines="true" OutlineSymbolsBelow="true"
                 <gmr:Name><xsl:value-of select="title"/></gmr:Name>
                 <gmr:Cols DefaultSizePts="48">
                     <gmr:ColInfo No="0" Unit="48" MarginA="2"
MarginB="2" Count="7"/>
                 <gmr:Rows DefaultSizePts="12.8">
                        <gmr:RowInfo No="0" Unit="12.8" MarginA="0"
MarginB="0" Count="9"/>
                        <gmr:RowInfo No="10" Unit="12.8" MarginA="1"
MarginB="0" Count="24"/>

  <xsl:template match="sql:rowset">
      <xsl:apply-templates select="sql:row"/>

  <xsl:template match="sql:row">
     <gmr:Cell Col="0" ValueType="60">
      <xsl:variable name="rownumber"><xsl:number level="any"
from="content" count="sql:row"/></xsl:variable>
      <xsl:attribute name="Row">
         <xsl:value-of select="$rownumber + 4"/>
                <xsl:value-of select="sql:name"/>
     <xsl:apply-templates select="sql:rowset"/>

 <xsl:template match="para"></xsl:template>
 <xsl:template match="title"></xsl:template>


-- - port of Excel format to java 
			- fix java generics!

The avalanche has already started. It is too late for the pebbles to
-Ambassador Kosh

Please check that your question has not already been answered in the
FAQ before posting. <>

To unsubscribe, e-mail: <>
For additional commands, e-mail: <>

View raw message