You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by fast-flux <00...@gmail.com> on 2007/07/19 08:39:18 UTC

XML to Excel template examples Required.

Hi All,
 
 I am just beginner in cocoon. I have the following requirements:
 
 1.    I have input XML file
 <Cars>
 <Car>
          <name>
                Ferrari
           </name>
           <type>
                Water
           </type>
 </Car>
 <Car>
           <name>
                Mercedes
           </name>
           <type>
                Air
           </ type>
 </Car>
 </Cars>
 
 
 2.    I have a Excel template Which already has headers (Car Name &  Car
 Type)
 
 
 Task for me is to use the XML as a source generater & serilize the
 output using the predefined template.
 
 I would appreciate if you could share any working example of such type.
 
 I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and they have
 no examples where we can take the input feed from XML and generate on a
 Template. All example includes SQL and due to some freak problem, I am
 still struggling to get the SQL part running.
 
 Thanks in advance,
 -Siddhu
-- 
View this message in context: http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by johnson <jo...@erp.tw>.
Hi!

Here's one, you can serach gnumeric to find relative art.

johnson

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:sql="http://apache.org/cocoon/SQL/2.0"
xmlns:gmr="http://www.gnome.org/gnumeric/v7"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1">

<xsl:template match="page">
<gmr:Workbook xmlns:gmr="http://www.gnome.org/gnumeric/v7">
<gmr:Sheets>
<gmr:Sheet DisplayFormulas="false" HideZero="false" HideGrid="false" 
HideColHeader="false"
HideRowHeader="false" DisplayOutlines="true" OutlineSymbolsBelow="true" 
OutlineSymbolsRight="true">
<gmr:Name>title</gmr:Name>
<gmr:MaxCol><xsl:value-of 
select="count(/page/table/tr[1]/th)"/></gmr:MaxCol>
<gmr:Styles>
<gmr:StyleRegion startRow="0" endRow="0" startCol="0" 
endCol="{count(/page/table/tr[1]/th) -1}">
<gmr:Style HAlign="8" VAlign="4" WrapText="0" Orient="1" Shade="0" 
Indent="0" Locked="1" Hidden="0"
Fore="0:0:0" Back="FFFF:FFFF:FFFF" PatternColor="0:0:0" Format="General">
<gmr:Font Unit="10" Bold="1" Italic="0" Underline="0" StrikeThrough="0"> 
Helvetica</gmr:Font>
</gmr:Style>
</gmr:StyleRegion>

</gmr:Styles>
<gmr:Cols DefaultSizePts="80">

</gmr:Cols>
<gmr:Rows DefaultSizePts="12.8">
<gmr:RowInfo No="0" Unit="18" MarginA="0" MarginB="0"/>
</gmr:Rows>
<gmr:Cells>
<xsl:apply-templates/>
</gmr:Cells>
</gmr:Sheet>
</gmr:Sheets>
</gmr:Workbook>
</xsl:template>

<xsl:template match="table">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="tr">
<xsl:variable name="rownumber"><xsl:number level="any" from="table" 
count="tr"/></xsl:variable>
<xsl:for-each select="./th">
<gmr:Cell Col="{position() - 1}" ValueType="60">
<xsl:attribute name="Row">
<xsl:value-of select="$rownumber -1"/>
</xsl:attribute>
<gmr:Content>
<i18n:text><xsl:value-of select="."/></i18n:text>
</gmr:Content>
</gmr:Cell>
</xsl:for-each>
<xsl:for-each select="./td">
<xsl:if test="string-length(normalize-space(shi)) = 0">
<gmr:Cell Col="{position() - 1}" ValueType="20">
<xsl:attribute name="Row">
<xsl:value-of select="$rownumber -1"/>
</xsl:attribute>
</gmr:Cell>
</xsl:if>
<xsl:if test="string-length(normalize-space(shi)) != 0">
<gmr:Cell Col="{position() - 1}" ValueType="60">
<xsl:attribute name="Row">
<xsl:value-of select="$rownumber -1"/>
</xsl:attribute>
<gmr:Content>
<i18n:text><xsl:value-of select="shi"/></i18n:text>
<xsl:if test="(ban = '2' or ban = '3') and normalize-space(shan)">?</xsl:if>
</gmr:Content>
</gmr:Cell>
</xsl:if>
</xsl:for-each>

</xsl:template>


</xsl:stylesheet>



fast-flux
> Hi All,
>  
>  I am just beginner in cocoon. I have the following requirements:
>  
>  1.    I have input XML file
>  <Cars>
>  <Car>
>           <name>
>                 Ferrari
>            </name>
>            <type>
>                 Water
>            </type>
>  </Car>
>  <Car>
>            <name>
>                 Mercedes
>            </name>
>            <type>
>                 Air
>            </ type>
>  </Car>
>  </Cars>
>  
>  
>  2.    I have a Excel template Which already has headers (Car Name &  Car
>  Type)
>  
>  
>  Task for me is to use the XML as a source generater & serilize the
>  output using the predefined template.
>  
>  I would appreciate if you could share any working example of such type.
>  
>  I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and they have
>  no examples where we can take the input feed from XML and generate on a
>  Template. All example includes SQL and due to some freak problem, I am
>  still struggling to get the SQL part running.
>  
>  Thanks in advance,
>  -Siddhu
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by fast-flux <00...@gmail.com>.
Hi All,

I am attaching following 3 files:

1. congress.xml (input XML file) 
http://www.nabble.com/file/p11683878/congress.xml congress.xml 
2. congress2excel.xsl (This converts XML to Excel) 
http://www.nabble.com/file/p11683878/congress2excel.xsl congress2excel.xsl 
3. sitemap.xmap  http://www.nabble.com/file/p11683878/sitemap.xmap
sitemap.xmap 
4. congress.XLT  http://www.nabble.com/file/p11683878/congress.xlt
congress.xlt 

Above example create the Excel Workbook on the fly & write the congress.xml
data to the Excel.

My Question:
How do I write a XML data (congress.xml) to a predefined Excel template say
congress.xlt?

fast-flux wrote:
> 
> Hi,
> 
> I have tried the examples that you guys ask me to try. The problem here
> is, all these explain creating a new XLS sheet and not use existing XLS
> sheet as a template and generate a response.
> 
> I am trying to use a existing template and use some kind of mapping from
> the XML field names to the columns in the template and generate the entire
> xls out.
> 
> Is there any way to do this?
> 
> Thanks,
> Siddhu
> 
> 
> Derek Hohls wrote:
>> 
>> Siddhu
>>  
>> Its not clear what you do know or don't know how to do.
>>  
>> As a beginner in Cocoon I always found it helpful to look at the
>> samples shipped with Cocoon and adapt them to aid learning.
>>  
>> For example, look at the "XLS" example in the "Hello World" group:
>> http://localhost:8080/cocoon/samples/hello-world/ 
>> or under
>> [path-to-cocoon]\build\webapp\samples\blocks\poi
>> AND
>> [path-to-cocoon]\build\webapp\samples\hello-world
>>  
>> No SQL, just plain XSLT and the POI serializer.
>> 
>>>>> fast-flux <00...@gmail.com> 2007/07/19 08:39:18 AM >>>
>> 
>> 
>> Hi All,
>> 
>> I am just beginner in cocoon. I have the following requirements:
>> 
>> 1.    I have input XML file
>> <Cars>
>> <Car>
>>           <name>
>>                 Ferrari
>>            </name>
>>            <type>
>>                 Water
>>            </type>
>> </Car>
>> <Car>
>>            <name>
>>                 Mercedes
>>            </name>
>>            <type>
>>                 Air
>>            </ type>
>> </Car>
>> </Cars>
>> 
>> 
>> 2.    I have a Excel template Which already has headers (Car Name & 
>> Car
>> Type)
>> 
>> 
>> Task for me is to use the XML as a source generater & serilize the
>> output using the predefined template.
>> 
>> I would appreciate if you could share any working example of such
>> type.
>> 
>> I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and they
>> have
>> no examples where we can take the input feed from XML and generate on
>> a
>> Template. All example includes SQL and due to some freak problem, I am
>> still struggling to get the SQL part running.
>> 
>> Thanks in advance,
>> -Siddhu
>> -- 
>> View this message in context:
>> http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207
>> 
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org 
>> 
>> 
>> 
>> -- 
>> This message is subject to the CSIR's copyright, terms and conditions and
>> e-mail legal notice. Views expressed herein do not necessarily represent
>> the
>> views of the CSIR.
>>  
>> CSIR E-mail Legal Notice
>> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>>  
>> CSIR Copyright, Terms and Conditions
>> http://mail.csir.co.za/CSIR_Copyright.html 
>>  
>> For electronic copies of the CSIR Copyright, Terms and Conditions and the
>> CSIR
>> Legal Notice send a blank message with REQUEST LEGAL in the subject line
>> to
>> CallCentre@csir.co.za.
>> 
>> 
>> This message has been scanned for viruses and dangerous content by
>> MailScanner, 
>> and is believed to be clean.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683878
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by fast-flux <00...@gmail.com>.
Thanks a lot !! Derek...!!! I will work on this and see if I can get a small
program running.

Derek Hohls wrote:
> 
> Siddhu
>  
> OK - I downloaded and installed the app on my machine.
>  
> The area you need to look at is around line 240 in the sitemap.
>  
> If you change to:
>  
>      <!-- Serialize into format suitable for Excel 
>     <map:serialize type="excel-serializer"/>-->
>  
>      <!-- DEBUG: Convert into character stream-->
>       <map:serialize type="xml"/> 
>  
> Then you will what the XML looks like before the serializer
> gets hold of it and creates the XLS (this will be Java code located
> in the directory ....WEB-INF\classes\com\clsw\cocoon).
>  
> Basically, it consists of a header element:
> <rpt:template-path>[path]/template.xls</rpt:template-path> 
> to tell it where to find the template as well as lots of:
>  
> <rpt:add type="java.lang.Double" col="2" row="5">14.59</rpt:add> 
> cell entry values.
>  
> All of this info is generated from the database in these steps here:
>  
>  <map:match pattern="report/*.xls">
>     <map:generate type="request"/>
>     <map:transform type="xslt" src="render-logic.xsl">
>      <map:parameter name="label" value="{1}"/>
>     </map:transform>
>     <map:transform type="xinclude"/>
>     <map:transform type="xslt" src="render-logic.xsl"/>
>     <map:transform type="sql">
>      <map:parameter name="dburl" value="jdbc:mysql://localhost/test"
> />
>     </map:transform>
>     <map:transform type="xslt" src="render-logic2.xsl">
>      <map:parameter name="label" value="{1}"/>
>      <map:parameter name="absolute-path"
> value="D:/tomcat/webapps/cocoon-reports"/> 
>     </map:transform>
>  
> and you can omit *all* these stages if you have an existing XML file.
>  
> Use something more like:
>  
> <map:match pattern="report/*.xls">
>   <map:generate src="myDirectory/myData.xml"/>
>   <map:transform type="xslt" src="myXML2reportXML.xsl">
>  
> You will need to write the XSL to transform from the XML layout you
> have
> into the format needed (as I discussed above). 
>  
> If you do not know how to write XSL, you will really need to spend time
> 
> doing that before you can work with Cocoon - there is an XSLT mailing
> list
> that can help if you get stuck with syntax.
>  
> Derek
> 
>>>> fast-flux <00...@gmail.com> 2007/07/19 11:00 AM >>>
> 
> 
> Hi Derek,
> 
> Thanks for the reply...  I went through an article over web
> (http://www.xml.com/lpt/a/1096). Here I see that folks have used
> cocoon-report.war where we provide a schema.xml and Excel template.
> There
> are couple of XSL files (render-logic.xsl, render-logic1.xsl) which
> does
> pull the data from a MySQL database and populate the predefined excel
> template.
> 
> I am looking for the same but instead have database as the source I
> needed
> an XML. I am trying to simulate the same functionality which is
> mentioned in
> the article, but I am not able to figure out how the predefined Excel
> template is getting populated. 
> 
> Any pointers towards this?
> 
> 
> Thanks,
> Siddhu.
> 
> 
> Derek Hohls wrote:
>> 
>> Siddhu
>>  
>> Your use of the word "template" is confusing; XSL files are not
>> templates and, AFAIK, you cannot open and write to an existing
>> Excel file (if that is actually what you are trying to do) using
>> Cocoon
>> as it stands.  Perhaps someone else on the list knows how to do
> this?
>> 
>>>>> fast-flux <00...@gmail.com> 2007/07/19 09:07 AM >>>
>> 
>> 
>> Hi,
>> 
>> I have tried the examples that you guys ask me to try. The problem
> here
>> is,
>> all these explain creating a new XLS sheet and not use existing XLS
>> sheet as
>> a template and generate a response.
>> 
>> I am trying to use a existing template and use some kind of mapping
>> from the
>> XML field names to the columns in the template and generate the
> entire
>> xls
>> out.
>> 
>> Is there any way to do this?
>> 
>> Thanks,
>> Siddhu
>> 
>> 
>> Derek Hohls wrote:
>>> 
>>> Siddhu
>>>  
>>> Its not clear what you do know or don't know how to do.
>>>  
>>> As a beginner in Cocoon I always found it helpful to look at the
>>> samples shipped with Cocoon and adapt them to aid learning.
>>>  
>>> For example, look at the "XLS" example in the "Hello World" group:
>>> http://localhost:8080/cocoon/samples/hello-world/ 
>>> or under
>>> [path-to-cocoon]\build\webapp\samples\blocks\poi
>>> AND
>>> [path-to-cocoon]\build\webapp\samples\hello-world
>>>  
>>> No SQL, just plain XSLT and the POI serializer.
>>> 
>>>>>> fast-flux <00...@gmail.com> 2007/07/19 08:39:18 AM >>>
>>> 
>>> 
>>> Hi All,
>>> 
>>> I am just beginner in cocoon. I have the following requirements:
>>> 
>>> 1.    I have input XML file
>>> <Cars>
>>> <Car>
>>>           <name>
>>>                 Ferrari
>>>            </name>
>>>            <type>
>>>                 Water
>>>            </type>
>>> </Car>
>>> <Car>
>>>            <name>
>>>                 Mercedes
>>>            </name>
>>>            <type>
>>>                 Air
>>>            </ type>
>>> </Car>
>>> </Cars>
>>> 
>>> 
>>> 2.    I have a Excel template Which already has headers (Car Name &
> 
>>> Car
>>> Type)
>>> 
>>> 
>>> Task for me is to use the XML as a source generater & serilize the
>>> output using the predefined template.
>>> 
>>> I would appreciate if you could share any working example of such
>>> type.
>>> 
>>> I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and
> they
>>> have
>>> no examples where we can take the input feed from XML and generate
>> on
>>> a
>>> Template. All example includes SQL and due to some freak problem, I
>> am
>>> still struggling to get the SQL part running.
>>> 
>>> Thanks in advance,
>>> -Siddhu
>>> -- 
>>> View this message in context:
>>>
>>
> http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207
> 
>> 
>>> 
>>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>>> 
>>> 
>>>
>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>>> For additional commands, e-mail: users-help@cocoon.apache.org 
>>> 
>>> 
>>> 
>>> -- 
>>> This message is subject to the CSIR's copyright, terms and
> conditions
>> and
>>> e-mail legal notice. Views expressed herein do not necessarily
>> represent
>>> the
>>> views of the CSIR.
>>>  
>>> CSIR E-mail Legal Notice
>>> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>>>  
>>> CSIR Copyright, Terms and Conditions
>>> http://mail.csir.co.za/CSIR_Copyright.html 
>>>  
>>> For electronic copies of the CSIR Copyright, Terms and Conditions
> and
>> the
>>> CSIR
>>> Legal Notice send a blank message with REQUEST LEGAL in the subject
>> line
>>> to
>>> CallCentre@csir.co.za.
>>> 
>>> 
>>> This message has been scanned for viruses and dangerous content by
>>> MailScanner, 
>>> and is believed to be clean.
>>> 
>>> 
>>>
>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>>> For additional commands, e-mail: users-help@cocoon.apache.org 
>>> 
>>> 
>>> 
>> 
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683455
> 
>> 
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org 
>> 
>> 
>> 
>> -- 
>> This message is subject to the CSIR's copyright, terms and conditions
> and
>> e-mail legal notice. Views expressed herein do not necessarily
> represent
>> the
>> views of the CSIR.
>>  
>> CSIR E-mail Legal Notice
>> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>>  
>> CSIR Copyright, Terms and Conditions
>> http://mail.csir.co.za/CSIR_Copyright.html 
>>  
>> For electronic copies of the CSIR Copyright, Terms and Conditions and
> the
>> CSIR
>> Legal Notice send a blank message with REQUEST LEGAL in the subject
> line
>> to
>> CallCentre@csir.co.za.
>> 
>> 
>> This message has been scanned for viruses and dangerous content by
>> MailScanner, 
>> and is believed to be clean.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org 
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11684855
> 
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 
> -- 
> This message is subject to the CSIR's copyright, terms and conditions and
> e-mail legal notice. Views expressed herein do not necessarily represent
> the
> views of the CSIR.
>  
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>  
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html 
>  
> For electronic copies of the CSIR Copyright, Terms and Conditions and the
> CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject line
> to
> CallCentre@csir.co.za.
> 
> 
> This message has been scanned for viruses and dangerous content by
> MailScanner, 
> and is believed to be clean.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11686835
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by Derek Hohls <DH...@csir.co.za>.
Siddhu
 
OK - I downloaded and installed the app on my machine.
 
The area you need to look at is around line 240 in the sitemap.
 
If you change to:
 
     <!-- Serialize into format suitable for Excel 
    <map:serialize type="excel-serializer"/>-->
 
     <!-- DEBUG: Convert into character stream-->
      <map:serialize type="xml"/> 
 
Then you will what the XML looks like before the serializer
gets hold of it and creates the XLS (this will be Java code located
in the directory ....WEB-INF\classes\com\clsw\cocoon).
 
Basically, it consists of a header element:
<rpt:template-path>[path]/template.xls</rpt:template-path> 
to tell it where to find the template as well as lots of:
 
<rpt:add type="java.lang.Double" col="2" row="5">14.59</rpt:add> 
cell entry values.
 
All of this info is generated from the database in these steps here:
 
 <map:match pattern="report/*.xls">
    <map:generate type="request"/>
    <map:transform type="xslt" src="render-logic.xsl">
     <map:parameter name="label" value="{1}"/>
    </map:transform>
    <map:transform type="xinclude"/>
    <map:transform type="xslt" src="render-logic.xsl"/>
    <map:transform type="sql">
     <map:parameter name="dburl" value="jdbc:mysql://localhost/test"
/>
    </map:transform>
    <map:transform type="xslt" src="render-logic2.xsl">
     <map:parameter name="label" value="{1}"/>
     <map:parameter name="absolute-path"
value="D:/tomcat/webapps/cocoon-reports"/> 
    </map:transform>
 
and you can omit *all* these stages if you have an existing XML file.
 
Use something more like:
 
<map:match pattern="report/*.xls">
  <map:generate src="myDirectory/myData.xml"/>
  <map:transform type="xslt" src="myXML2reportXML.xsl">
 
You will need to write the XSL to transform from the XML layout you
have
into the format needed (as I discussed above). 
 
If you do not know how to write XSL, you will really need to spend time

doing that before you can work with Cocoon - there is an XSLT mailing
list
that can help if you get stuck with syntax.
 
Derek

>>> fast-flux <00...@gmail.com> 2007/07/19 11:00 AM >>>


Hi Derek,

Thanks for the reply...  I went through an article over web
(http://www.xml.com/lpt/a/1096). Here I see that folks have used
cocoon-report.war where we provide a schema.xml and Excel template.
There
are couple of XSL files (render-logic.xsl, render-logic1.xsl) which
does
pull the data from a MySQL database and populate the predefined excel
template.

I am looking for the same but instead have database as the source I
needed
an XML. I am trying to simulate the same functionality which is
mentioned in
the article, but I am not able to figure out how the predefined Excel
template is getting populated. 

Any pointers towards this?


Thanks,
Siddhu.


Derek Hohls wrote:
> 
> Siddhu
>  
> Your use of the word "template" is confusing; XSL files are not
> templates and, AFAIK, you cannot open and write to an existing
> Excel file (if that is actually what you are trying to do) using
> Cocoon
> as it stands.  Perhaps someone else on the list knows how to do
this?
> 
>>>> fast-flux <00...@gmail.com> 2007/07/19 09:07 AM >>>
> 
> 
> Hi,
> 
> I have tried the examples that you guys ask me to try. The problem
here
> is,
> all these explain creating a new XLS sheet and not use existing XLS
> sheet as
> a template and generate a response.
> 
> I am trying to use a existing template and use some kind of mapping
> from the
> XML field names to the columns in the template and generate the
entire
> xls
> out.
> 
> Is there any way to do this?
> 
> Thanks,
> Siddhu
> 
> 
> Derek Hohls wrote:
>> 
>> Siddhu
>>  
>> Its not clear what you do know or don't know how to do.
>>  
>> As a beginner in Cocoon I always found it helpful to look at the
>> samples shipped with Cocoon and adapt them to aid learning.
>>  
>> For example, look at the "XLS" example in the "Hello World" group:
>> http://localhost:8080/cocoon/samples/hello-world/ 
>> or under
>> [path-to-cocoon]\build\webapp\samples\blocks\poi
>> AND
>> [path-to-cocoon]\build\webapp\samples\hello-world
>>  
>> No SQL, just plain XSLT and the POI serializer.
>> 
>>>>> fast-flux <00...@gmail.com> 2007/07/19 08:39:18 AM >>>
>> 
>> 
>> Hi All,
>> 
>> I am just beginner in cocoon. I have the following requirements:
>> 
>> 1.    I have input XML file
>> <Cars>
>> <Car>
>>           <name>
>>                 Ferrari
>>            </name>
>>            <type>
>>                 Water
>>            </type>
>> </Car>
>> <Car>
>>            <name>
>>                 Mercedes
>>            </name>
>>            <type>
>>                 Air
>>            </ type>
>> </Car>
>> </Cars>
>> 
>> 
>> 2.    I have a Excel template Which already has headers (Car Name &

>> Car
>> Type)
>> 
>> 
>> Task for me is to use the XML as a source generater & serilize the
>> output using the predefined template.
>> 
>> I would appreciate if you could share any working example of such
>> type.
>> 
>> I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and
they
>> have
>> no examples where we can take the input feed from XML and generate
> on
>> a
>> Template. All example includes SQL and due to some freak problem, I
> am
>> still struggling to get the SQL part running.
>> 
>> Thanks in advance,
>> -Siddhu
>> -- 
>> View this message in context:
>>
>
http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207

> 
>> 
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>> 
>> 
>>
>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org 
>> 
>> 
>> 
>> -- 
>> This message is subject to the CSIR's copyright, terms and
conditions
> and
>> e-mail legal notice. Views expressed herein do not necessarily
> represent
>> the
>> views of the CSIR.
>>  
>> CSIR E-mail Legal Notice
>> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>>  
>> CSIR Copyright, Terms and Conditions
>> http://mail.csir.co.za/CSIR_Copyright.html 
>>  
>> For electronic copies of the CSIR Copyright, Terms and Conditions
and
> the
>> CSIR
>> Legal Notice send a blank message with REQUEST LEGAL in the subject
> line
>> to
>> CallCentre@csir.co.za.
>> 
>> 
>> This message has been scanned for viruses and dangerous content by
>> MailScanner, 
>> and is believed to be clean.
>> 
>> 
>>
>
---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org 
>> 
>> 
>> 
> 
> -- 
> View this message in context:
>
http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683455

> 
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 
> -- 
> This message is subject to the CSIR's copyright, terms and conditions
and
> e-mail legal notice. Views expressed herein do not necessarily
represent
> the
> views of the CSIR.
>  
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>  
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html 
>  
> For electronic copies of the CSIR Copyright, Terms and Conditions and
the
> CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject
line
> to
> CallCentre@csir.co.za.
> 
> 
> This message has been scanned for viruses and dangerous content by
> MailScanner, 
> and is believed to be clean.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11684855

Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by fast-flux <00...@gmail.com>.
Hi Derek,

Thanks for the reply...  I went through an article over web
(http://www.xml.com/lpt/a/1096). Here I see that folks have used
cocoon-report.war where we provide a schema.xml and Excel template. There
are couple of XSL files (render-logic.xsl, render-logic1.xsl) which does
pull the data from a MySQL database and populate the predefined excel
template.

I am looking for the same but instead have database as the source I needed
an XML. I am trying to simulate the same functionality which is mentioned in
the article, but I am not able to figure out how the predefined Excel
template is getting populated. 

Any pointers towards this?


Thanks,
Siddhu.


Derek Hohls wrote:
> 
> Siddhu
>  
> Your use of the word "template" is confusing; XSL files are not
> templates and, AFAIK, you cannot open and write to an existing
> Excel file (if that is actually what you are trying to do) using
> Cocoon
> as it stands.  Perhaps someone else on the list knows how to do this?
> 
>>>> fast-flux <00...@gmail.com> 2007/07/19 09:07 AM >>>
> 
> 
> Hi,
> 
> I have tried the examples that you guys ask me to try. The problem here
> is,
> all these explain creating a new XLS sheet and not use existing XLS
> sheet as
> a template and generate a response.
> 
> I am trying to use a existing template and use some kind of mapping
> from the
> XML field names to the columns in the template and generate the entire
> xls
> out.
> 
> Is there any way to do this?
> 
> Thanks,
> Siddhu
> 
> 
> Derek Hohls wrote:
>> 
>> Siddhu
>>  
>> Its not clear what you do know or don't know how to do.
>>  
>> As a beginner in Cocoon I always found it helpful to look at the
>> samples shipped with Cocoon and adapt them to aid learning.
>>  
>> For example, look at the "XLS" example in the "Hello World" group:
>> http://localhost:8080/cocoon/samples/hello-world/ 
>> or under
>> [path-to-cocoon]\build\webapp\samples\blocks\poi
>> AND
>> [path-to-cocoon]\build\webapp\samples\hello-world
>>  
>> No SQL, just plain XSLT and the POI serializer.
>> 
>>>>> fast-flux <00...@gmail.com> 2007/07/19 08:39:18 AM >>>
>> 
>> 
>> Hi All,
>> 
>> I am just beginner in cocoon. I have the following requirements:
>> 
>> 1.    I have input XML file
>> <Cars>
>> <Car>
>>           <name>
>>                 Ferrari
>>            </name>
>>            <type>
>>                 Water
>>            </type>
>> </Car>
>> <Car>
>>            <name>
>>                 Mercedes
>>            </name>
>>            <type>
>>                 Air
>>            </ type>
>> </Car>
>> </Cars>
>> 
>> 
>> 2.    I have a Excel template Which already has headers (Car Name & 
>> Car
>> Type)
>> 
>> 
>> Task for me is to use the XML as a source generater & serilize the
>> output using the predefined template.
>> 
>> I would appreciate if you could share any working example of such
>> type.
>> 
>> I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and they
>> have
>> no examples where we can take the input feed from XML and generate
> on
>> a
>> Template. All example includes SQL and due to some freak problem, I
> am
>> still struggling to get the SQL part running.
>> 
>> Thanks in advance,
>> -Siddhu
>> -- 
>> View this message in context:
>>
> http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207
> 
>> 
>> Sent from the Cocoon - Users mailing list archive at Nabble.com.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org 
>> 
>> 
>> 
>> -- 
>> This message is subject to the CSIR's copyright, terms and conditions
> and
>> e-mail legal notice. Views expressed herein do not necessarily
> represent
>> the
>> views of the CSIR.
>>  
>> CSIR E-mail Legal Notice
>> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>>  
>> CSIR Copyright, Terms and Conditions
>> http://mail.csir.co.za/CSIR_Copyright.html 
>>  
>> For electronic copies of the CSIR Copyright, Terms and Conditions and
> the
>> CSIR
>> Legal Notice send a blank message with REQUEST LEGAL in the subject
> line
>> to
>> CallCentre@csir.co.za.
>> 
>> 
>> This message has been scanned for viruses and dangerous content by
>> MailScanner, 
>> and is believed to be clean.
>> 
>> 
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
>> For additional commands, e-mail: users-help@cocoon.apache.org 
>> 
>> 
>> 
> 
> -- 
> View this message in context:
> http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683455
> 
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 
> -- 
> This message is subject to the CSIR's copyright, terms and conditions and
> e-mail legal notice. Views expressed herein do not necessarily represent
> the
> views of the CSIR.
>  
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>  
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html 
>  
> For electronic copies of the CSIR Copyright, Terms and Conditions and the
> CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject line
> to
> CallCentre@csir.co.za.
> 
> 
> This message has been scanned for viruses and dangerous content by
> MailScanner, 
> and is believed to be clean.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11684855
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by Derek Hohls <DH...@csir.co.za>.
Siddhu
 
Your use of the word "template" is confusing; XSL files are not
templates and, AFAIK, you cannot open and write to an existing
Excel file (if that is actually what you are trying to do) using
Cocoon
as it stands.  Perhaps someone else on the list knows how to do this?

>>> fast-flux <00...@gmail.com> 2007/07/19 09:07 AM >>>


Hi,

I have tried the examples that you guys ask me to try. The problem here
is,
all these explain creating a new XLS sheet and not use existing XLS
sheet as
a template and generate a response.

I am trying to use a existing template and use some kind of mapping
from the
XML field names to the columns in the template and generate the entire
xls
out.

Is there any way to do this?

Thanks,
Siddhu


Derek Hohls wrote:
> 
> Siddhu
>  
> Its not clear what you do know or don't know how to do.
>  
> As a beginner in Cocoon I always found it helpful to look at the
> samples shipped with Cocoon and adapt them to aid learning.
>  
> For example, look at the "XLS" example in the "Hello World" group:
> http://localhost:8080/cocoon/samples/hello-world/ 
> or under
> [path-to-cocoon]\build\webapp\samples\blocks\poi
> AND
> [path-to-cocoon]\build\webapp\samples\hello-world
>  
> No SQL, just plain XSLT and the POI serializer.
> 
>>>> fast-flux <00...@gmail.com> 2007/07/19 08:39:18 AM >>>
> 
> 
> Hi All,
> 
> I am just beginner in cocoon. I have the following requirements:
> 
> 1.    I have input XML file
> <Cars>
> <Car>
>           <name>
>                 Ferrari
>            </name>
>            <type>
>                 Water
>            </type>
> </Car>
> <Car>
>            <name>
>                 Mercedes
>            </name>
>            <type>
>                 Air
>            </ type>
> </Car>
> </Cars>
> 
> 
> 2.    I have a Excel template Which already has headers (Car Name & 
> Car
> Type)
> 
> 
> Task for me is to use the XML as a source generater & serilize the
> output using the predefined template.
> 
> I would appreciate if you could share any working example of such
> type.
> 
> I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and they
> have
> no examples where we can take the input feed from XML and generate
on
> a
> Template. All example includes SQL and due to some freak problem, I
am
> still struggling to get the SQL part running.
> 
> Thanks in advance,
> -Siddhu
> -- 
> View this message in context:
>
http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207

> 
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 
> -- 
> This message is subject to the CSIR's copyright, terms and conditions
and
> e-mail legal notice. Views expressed herein do not necessarily
represent
> the
> views of the CSIR.
>  
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>  
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html 
>  
> For electronic copies of the CSIR Copyright, Terms and Conditions and
the
> CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject
line
> to
> CallCentre@csir.co.za.
> 
> 
> This message has been scanned for viruses and dangerous content by
> MailScanner, 
> and is believed to be clean.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683455

Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by fast-flux <00...@gmail.com>.
Hi,

I have tried the examples that you guys ask me to try. The problem here is,
all these explain creating a new XLS sheet and not use existing XLS sheet as
a template and generate a response.

I am trying to use a existing template and use some kind of mapping from the
XML field names to the columns in the template and generate the entire xls
out.

Is there any way to do this?

Thanks,
Siddhu


Derek Hohls wrote:
> 
> Siddhu
>  
> Its not clear what you do know or don't know how to do.
>  
> As a beginner in Cocoon I always found it helpful to look at the
> samples shipped with Cocoon and adapt them to aid learning.
>  
> For example, look at the "XLS" example in the "Hello World" group:
> http://localhost:8080/cocoon/samples/hello-world/ 
> or under
> [path-to-cocoon]\build\webapp\samples\blocks\poi
> AND
> [path-to-cocoon]\build\webapp\samples\hello-world
>  
> No SQL, just plain XSLT and the POI serializer.
> 
>>>> fast-flux <00...@gmail.com> 2007/07/19 08:39:18 AM >>>
> 
> 
> Hi All,
> 
> I am just beginner in cocoon. I have the following requirements:
> 
> 1.    I have input XML file
> <Cars>
> <Car>
>           <name>
>                 Ferrari
>            </name>
>            <type>
>                 Water
>            </type>
> </Car>
> <Car>
>            <name>
>                 Mercedes
>            </name>
>            <type>
>                 Air
>            </ type>
> </Car>
> </Cars>
> 
> 
> 2.    I have a Excel template Which already has headers (Car Name & 
> Car
> Type)
> 
> 
> Task for me is to use the XML as a source generater & serilize the
> output using the predefined template.
> 
> I would appreciate if you could share any working example of such
> type.
> 
> I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and they
> have
> no examples where we can take the input feed from XML and generate on
> a
> Template. All example includes SQL and due to some freak problem, I am
> still struggling to get the SQL part running.
> 
> Thanks in advance,
> -Siddhu
> -- 
> View this message in context:
> http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207
> 
> Sent from the Cocoon - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
> 
> 
> -- 
> This message is subject to the CSIR's copyright, terms and conditions and
> e-mail legal notice. Views expressed herein do not necessarily represent
> the
> views of the CSIR.
>  
> CSIR E-mail Legal Notice
> http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
>  
> CSIR Copyright, Terms and Conditions
> http://mail.csir.co.za/CSIR_Copyright.html 
>  
> For electronic copies of the CSIR Copyright, Terms and Conditions and the
> CSIR
> Legal Notice send a blank message with REQUEST LEGAL in the subject line
> to
> CallCentre@csir.co.za.
> 
> 
> This message has been scanned for viruses and dangerous content by
> MailScanner, 
> and is believed to be clean.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683455
Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: XML to Excel template examples Required.

Posted by Derek Hohls <DH...@csir.co.za>.
Siddhu
 
Its not clear what you do know or don't know how to do.
 
As a beginner in Cocoon I always found it helpful to look at the
samples shipped with Cocoon and adapt them to aid learning.
 
For example, look at the "XLS" example in the "Hello World" group:
http://localhost:8080/cocoon/samples/hello-world/ 
or under
[path-to-cocoon]\build\webapp\samples\blocks\poi
AND
[path-to-cocoon]\build\webapp\samples\hello-world
 
No SQL, just plain XSLT and the POI serializer.

>>> fast-flux <00...@gmail.com> 2007/07/19 08:39:18 AM >>>


Hi All,

I am just beginner in cocoon. I have the following requirements:

1.    I have input XML file
<Cars>
<Car>
          <name>
                Ferrari
           </name>
           <type>
                Water
           </type>
</Car>
<Car>
           <name>
                Mercedes
           </name>
           <type>
                Air
           </ type>
</Car>
</Cars>


2.    I have a Excel template Which already has headers (Car Name & 
Car
Type)


Task for me is to use the XML as a source generater & serilize the
output using the predefined template.

I would appreciate if you could share any working example of such
type.

I visited XML.com article ( http://www.xml.com/lpt/a/1096 ) and they
have
no examples where we can take the input feed from XML and generate on
a
Template. All example includes SQL and due to some freak problem, I am
still struggling to get the SQL part running.

Thanks in advance,
-Siddhu
-- 
View this message in context:
http://www.nabble.com/XML-to-Excel-template-examples-Required.-tf4108469.html#a11683207

Sent from the Cocoon - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org 
For additional commands, e-mail: users-help@cocoon.apache.org 



-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
CallCentre@csir.co.za.


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org