You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ashish Kumar <ng...@iitr.ernet.in> on 2003/10/13 20:12:17 UTC

newbie: editing simple-page2fo.xsl file for sql queries

hi all,
        i have to generate dynamic pdf from quering database and put it in
proper format (tables). for that i have put an xml file with sql
queries and modified simple-page2fo.xsl file with codes like following:
  
<xsl:template match="sql:strength">
   <fo:block font-size="13pt" space-before.optimum="12pt" text-align="center">
	<xsl:apply-templates/>
   </fo:block>
</xsl:template>

this is working fine, but i have to put many such entries in table in
proper format. i m quite new to xsl:fo and don't know where to proper
tags for tables (alongwith sql tags) tags and borders in the xsl file for
formatted pdf output. 
plz anyone tell me on how to add the tags. 
can i have a sample file regarding it.
also is there no graphical editor for xsl fo (as frontpage fro html)

thanking in advance,
ashish



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


newbie: template

Posted by Ashish Kumar <ng...@iitr.ernet.in>.
hi there,
         i have to generate similar pdf pages with data queried from
SQL database. i m able to generate dynamic pdf from database by adding sql
query codes in sample xsl files given in the distribution
(simple_page2fo.xsl), but i want to design a template having sql variables
so that the data can be put in standard formatted form. 
i don't know how & where to define the template.
can anyone tell me how to proceed for that?

ashish




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


Re: newbie: editing simple-page2fo.xsl file for sql queries

Posted by Ashish Kumar <ng...@iitr.ernet.in>.
hi there,
      strength is just another table as name1, name2 etc.
i can't get what should i make in the stylesheet
sqlTransformerOutput2simple-page as u said. could u plz make it more clear
by giving any example tags.

ashish


On Tue, 14 Oct 2003, Joerg Heinicke wrote:

> I don't know where the sql:strength comes from, but the general hint 
> remains: add an additional sqlTransformerOutput2simple-page stylesheet 
> as a intermediate step. So you can reuse the default simple-page 
> stylesheets as they are. Imagine different output formats, the 
> intermediate step simplifies it.
> 
> Joerg
> 
> On 14.10.2003 14:24, Ashish Kumar wrote:
> > hi there, 
> > thanx for ur response,
> > i have made following entries in the pipeline (file sitemap.xmap):
> > 
> > -------------------------
> > <map:match pattern="pdf/simple.pdf">
> >    <map:generate src="docs/samples/simple-page.xml"/>
> >      <map:transform type="sql">
> > 	<map:parameter name="use-connection" value="psql"/> 
> >      </map:transform>
> >    <map:transform src="stylesheets/page/simple-page2fo.xsl"/>
> >      <map:serialize type="fo2pdf"/>
> > </map:match>
> > -------------------------
> > 
> > and following is the entry in xml file:
> > 
> > ---------------------
> > <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> > 	<query>
> >            select id,name1,name2,strength from table1
> >         </query>
> > </execute-query>
> > ---------------------
> > 
> > hope this makes clear.
> > 
> > ashish 
> > 
> > On Tue, 14 Oct 2003, Joerg Heinicke wrote:
> > 
> > 
> >>What's your pipeline setup? It's hard to give valuable hints without 
> >>knowing your transformer stations. In general you should add a further 
> >>one, to make them more reusable and easier to maintain/understand.
> >>
> >>Joerg
> >>
> >>On 13.10.2003 20:12, Ashish Kumar wrote:
> >>
> >>
> >>>hi all,
> >>>        i have to generate dynamic pdf from quering database and put it in
> >>>proper format (tables). for that i have put an xml file with sql
> >>>queries and modified simple-page2fo.xsl file with codes like following:
> >>>  
> >>><xsl:template match="sql:strength">
> >>>   <fo:block font-size="13pt" space-before.optimum="12pt" text-align="center">
> >>>	<xsl:apply-templates/>
> >>>   </fo:block>
> >>></xsl:template>
> >>>
> >>>this is working fine, but i have to put many such entries in table in
> >>>proper format. i m quite new to xsl:fo and don't know where to proper
> >>>tags for tables (alongwith sql tags) tags and borders in the xsl file for
> >>>formatted pdf output. 
> >>>plz anyone tell me on how to add the tags. 
> >>>can i have a sample file regarding it.
> >>>also is there no graphical editor for xsl fo (as frontpage fro html)
> >>>
> >>>thanking in advance,
> >>>ashish
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Re: newbie: editing simple-page2fo.xsl file for sql queries

Posted by Joerg Heinicke <jh...@virbus.de>.
I don't know where the sql:strength comes from, but the general hint 
remains: add an additional sqlTransformerOutput2simple-page stylesheet 
as a intermediate step. So you can reuse the default simple-page 
stylesheets as they are. Imagine different output formats, the 
intermediate step simplifies it.

Joerg

On 14.10.2003 14:24, Ashish Kumar wrote:
> hi there, 
> thanx for ur response,
> i have made following entries in the pipeline (file sitemap.xmap):
> 
> -------------------------
> <map:match pattern="pdf/simple.pdf">
>    <map:generate src="docs/samples/simple-page.xml"/>
>      <map:transform type="sql">
> 	<map:parameter name="use-connection" value="psql"/> 
>      </map:transform>
>    <map:transform src="stylesheets/page/simple-page2fo.xsl"/>
>      <map:serialize type="fo2pdf"/>
> </map:match>
> -------------------------
> 
> and following is the entry in xml file:
> 
> ---------------------
> <execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
> 	<query>
>            select id,name1,name2,strength from table1
>         </query>
> </execute-query>
> ---------------------
> 
> hope this makes clear.
> 
> ashish 
> 
> On Tue, 14 Oct 2003, Joerg Heinicke wrote:
> 
> 
>>What's your pipeline setup? It's hard to give valuable hints without 
>>knowing your transformer stations. In general you should add a further 
>>one, to make them more reusable and easier to maintain/understand.
>>
>>Joerg
>>
>>On 13.10.2003 20:12, Ashish Kumar wrote:
>>
>>
>>>hi all,
>>>        i have to generate dynamic pdf from quering database and put it in
>>>proper format (tables). for that i have put an xml file with sql
>>>queries and modified simple-page2fo.xsl file with codes like following:
>>>  
>>><xsl:template match="sql:strength">
>>>   <fo:block font-size="13pt" space-before.optimum="12pt" text-align="center">
>>>	<xsl:apply-templates/>
>>>   </fo:block>
>>></xsl:template>
>>>
>>>this is working fine, but i have to put many such entries in table in
>>>proper format. i m quite new to xsl:fo and don't know where to proper
>>>tags for tables (alongwith sql tags) tags and borders in the xsl file for
>>>formatted pdf output. 
>>>plz anyone tell me on how to add the tags. 
>>>can i have a sample file regarding it.
>>>also is there no graphical editor for xsl fo (as frontpage fro html)
>>>
>>>thanking in advance,
>>>ashish



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


Re: newbie: editing simple-page2fo.xsl file for sql queries

Posted by Ashish Kumar <ng...@iitr.ernet.in>.
hi there, 
thanx for ur response,
i have made following entries in the pipeline (file sitemap.xmap):

-------------------------
<map:match pattern="pdf/simple.pdf">
   <map:generate src="docs/samples/simple-page.xml"/>
     <map:transform type="sql">
	<map:parameter name="use-connection" value="psql"/> 
     </map:transform>
   <map:transform src="stylesheets/page/simple-page2fo.xsl"/>
     <map:serialize type="fo2pdf"/>
</map:match>
-------------------------

and following is the entry in xml file:

---------------------
<execute-query xmlns="http://apache.org/cocoon/SQL/2.0">
	<query>
           select id,name1,name2,strength from table1
        </query>
</execute-query>
---------------------

hope this makes clear.

ashish 

On Tue, 14 Oct 2003, Joerg Heinicke wrote:

> What's your pipeline setup? It's hard to give valuable hints without 
> knowing your transformer stations. In general you should add a further 
> one, to make them more reusable and easier to maintain/understand.
> 
> Joerg
> 
> On 13.10.2003 20:12, Ashish Kumar wrote:
> 
> > hi all,
> >         i have to generate dynamic pdf from quering database and put it in
> > proper format (tables). for that i have put an xml file with sql
> > queries and modified simple-page2fo.xsl file with codes like following:
> >   
> > <xsl:template match="sql:strength">
> >    <fo:block font-size="13pt" space-before.optimum="12pt" text-align="center">
> > 	<xsl:apply-templates/>
> >    </fo:block>
> > </xsl:template>
> > 
> > this is working fine, but i have to put many such entries in table in
> > proper format. i m quite new to xsl:fo and don't know where to proper
> > tags for tables (alongwith sql tags) tags and borders in the xsl file for
> > formatted pdf output. 
> > plz anyone tell me on how to add the tags. 
> > can i have a sample file regarding it.
> > also is there no graphical editor for xsl fo (as frontpage fro html)
> > 
> > thanking in advance,
> > ashish
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Re: newbie: editing simple-page2fo.xsl file for sql queries

Posted by Joerg Heinicke <jh...@virbus.de>.
What's your pipeline setup? It's hard to give valuable hints without 
knowing your transformer stations. In general you should add a further 
one, to make them more reusable and easier to maintain/understand.

Joerg

On 13.10.2003 20:12, Ashish Kumar wrote:

> hi all,
>         i have to generate dynamic pdf from quering database and put it in
> proper format (tables). for that i have put an xml file with sql
> queries and modified simple-page2fo.xsl file with codes like following:
>   
> <xsl:template match="sql:strength">
>    <fo:block font-size="13pt" space-before.optimum="12pt" text-align="center">
> 	<xsl:apply-templates/>
>    </fo:block>
> </xsl:template>
> 
> this is working fine, but i have to put many such entries in table in
> proper format. i m quite new to xsl:fo and don't know where to proper
> tags for tables (alongwith sql tags) tags and borders in the xsl file for
> formatted pdf output. 
> plz anyone tell me on how to add the tags. 
> can i have a sample file regarding it.
> also is there no graphical editor for xsl fo (as frontpage fro html)
> 
> thanking in advance,
> ashish


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