cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Mace" <mcai8...@ist4.co.umist.ac.uk>
Subject RE: Transforming XML ito open in Excel
Date Fri, 02 Mar 2001 14:39:21 GMT
I have got a basic version working now, but I am still having the 
following problems

1.I can only seem to fill the first column.  When I do 
<xsl:text>Header 1</xsl:text><xsl:text>Header 2 </xsl:text>
<xsl:text></xsl:text>.
 	It puts both headers in the first cell only.

2. When I call the file again after I have changed the data.  I can 
only see the original.  No matter how many times I refresh the xsl, I 
can only view the the new file by calling it something different.  Its 
like it is caching and not refreshing it.  I can see the new file if I 
close the browser and start a new one.  I need it refresh everytime I 
click on it.

Rgrds

C

Send reply to:  	cocoon-users@xml.apache.org
From:           	Marcelo Ochoa <mochoa@ieee.org>
Date sent:      	Thu, 01 Mar 2001 21:50:28 GMT
Subject:        	RE: Transforming XML ito open in Excel
To:             	cocoon-users@xml.apache.org

> Hi:
> 
> >>>>>>>>>>>>>>>>>> Mensaje original
<<<<<<<<<<<<<<<<<<
> 
> El 1/3/01, 18.19.39, William Bagby <williamb@adone.com> escribió sobre el 
> tema RE: Transforming XML ito open in Excel:
> 
> 
> > That is awesome.
> 
> > Is there a way to make it so that the fields in the first row become the
> > column names? I am of course making a big assumption that this can be 
> done,
> > because when you import tab-delimited files in Excel you have that 
> option.
> Simply replace the first line of the above stylesheet:
> <html>
> ...
> by:
>    <html>
>            <xsl:text>ID </xsl:text>
>            <xsl:text>City       </xsl:text>
>            <xsl:text>Point      </xsl:text>
>            <xsl:text>Stock      </xsl:text>
>            <xsl:text>
> </xsl:text>     
> .....
> 
>    Regards, Marcelo.
> 
> > Is there some type of API for this?
> 
> > William Bagby
> 
> > > -----Original Message-----
> > > From: Marcelo Ochoa [mailto:mochoa@ieee.org]
> > > Sent: Thursday, March 01, 2001 1:31 PM
> > > To: cocoon-users@xml.apache.org
> > > Subject: Re: Transforming XML ito open in Excel
> > >
> > >
> > > Hi Carl:
> > >   You are right.
> > >   Here an example the lines added to the cocoon.properties
> > > configurations
> > > file:
> > >
> > > formatter.type.application/vnd.ms-excel =
> > > org.apache.cocoon.formatter.TextFormatter
> > > formatter.application/vnd.ms-excel.MIME-type =
> > > application/vnd.ms-excel
> > >
> > >   And here an stylesheet which produce the correct output:
> > >
> > > <?xml version="1.0"?>
> > >
> > > <!-- Written by Marcelo F. Ochoa "mochoa@ieee.org" -->
> > >
> > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > >
> > >   <xsl:template match="/">
> > >    <xsl:processing-instruction
> > > name="cocoon-format">type="application/vnd.ms-excel"</xsl:proc
> > > essing-ins
> > > truction>
> > >    <html>
> > >            <xsl:for-each select="sales/name">
> > >                 <xsl:sort select="point"
> > >                           data-type="number"
> > >                           order="ascending"/>
> > >                 <xsl:value-of select="@id"/><xsl:text>  </xsl:text>
> > >                 <xsl:value-of select="city"/><xsl:text> </xsl:text>
> > >                 <xsl:value-of select="point"/><xsl:text>
> > >   </xsl:text>
> > >                 <xsl:value-of select="stock"/><xsl:text>
> > >   </xsl:text>
> > >                 <xsl:text>
> > > </xsl:text>
> > >            </xsl:for-each>
> > >    </html>
> > >   </xsl:template>
> > >
> > > </xsl:stylesheet>
> > >
> > >    This stylesheet makes a tab separated field, one row per
> > > line, which
> > > is automatically converted by Excel in an spreadsheet.
> > >    Best regards, Marcelo.
> > >
> > > PD: Here the demo on line:
> > > http://cocodrilo.exa.unicen.edu.ar:7777/servlets/xml/demo.xmle
> > xcel?produ
> > cer=db
> 
> > --
> > Do you know DB Prism look @ http://www.plenix.com/dbprism/
> > More info?
> > - Chapter 21 "Profesional XML Databases" at Wrox Press
> > (http://www.wrox.com/)
> > - Chapter 8 "Oracle & Open Source" by O'Reilly (http://www.oreilly.com/)
> > Marcelo F. Ochoa
> > Fac. de Cs. Exactas - UNICEN
> > Paraje Arroyo Seco - Campus Univ.
> > (7000) Tandil - AR
> > Tel.: +54-2293-444430
> > Fax: +54-2293-444431
> 
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> > To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 



Mime
View raw message