You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Kevin K." <ke...@yahoo.com> on 2003/09/16 18:06:11 UTC
Creating multiple tables using a single XSL stylesheet?
Hello,
My knowledge is limited about XML technologies. I am trying creating PDF files from Value Objects(VO). I am following the following way:
1. VO -> XML
2. Create XSL Stylesheet then
3. Use FOP with XML and XSL Stylesheet files to create PDF file.
I am having problem with creating XSL Stylesheet. I am trying to create it manually. How can I create XSL Stylesheet? Is there any good tutorial about it?
Now, I want to output two tables. Both categories are found within the same XML source but need to be placed in separate tables. Here is my xsl Stylesheet code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
<xsl:template match="projectteam">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="2cm" margin-bottom="2cm" margin-left="2cm" margin-right="2cm">
<fo:region-body/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simpleA4">
<fo:flow flow-name="xsl-region-body">
<fo:block font-size="16pt" font-weight="bold" space-after="5mm">Project: <xsl:value-of select="projectname"/>
</fo:block>
<fo:block font-size="10pt">
<fo:table>
<fo:table-column column-width="proportional-column-width(3)"/>
<fo:table-column column-width="proportional-column-width(1)"/>
<fo:table-column column-width="proportional-column-width(3)" />
<fo:table-header>
<fo:table-row>
<fo:table-cell border="solid black 1px" padding="1em" border-collapse="collapse">
<fo:block text-align="justify" font-weight="bold">Column 1</fo:block>
</fo:table-cell>
<fo:table-cell border="solid black 1px" padding="1em" border-collapse="collapse">
<fo:block text-align="justify" font-weight="bold">Column 2</fo:block>
</fo:table-cell>
<fo:table-cell border="solid black 1px" padding="1em" border-collapse="collapse">
<fo:block text-align="justify" font-weight="bold">Column 3</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:apply-templates/>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<xsl:template match="member">
<fo:table-row>
<fo:table-cell border="solid black 1px" padding="1em" border-collapse="collapse">
<fo:block>
<xsl:value-of select="name"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border="solid black 1px" padding="1em" border-collapse="collapse">
<fo:block>
<xsl:value-of select="function"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border="solid black 1px" padding="1em" border-collapse="collapse">
<fo:block>
<xsl:value-of select="email"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:template>
</xsl:stylesheet>
Thanks in advance...
Kevin
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Creating multiple tables using a single XSL stylesheet?
Posted by "Kevin K." <ke...@yahoo.com>.
Hi Abhijit,
I would like to output the following tables.
Thanks,
Kevin
=======================================================================
= = =
= = =
= = =
= = =
================================================= =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
=======================================================================
=======================================================================
= =
= =
=======================================================================
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
=======================================================================
Abhijit Junnare <ma...@yahoo.com> wrote:
What two different tables do you want? You said
something about both categories. Do you mena to say
that you want two tables exactly similar to each
other? Didnt quite understand the problem.
Thanks,
abhi
--- "Kevin K." wrote:
> Hello,
>
> My knowledge is limited about XML technologies. I
> am trying creating PDF files from Value Objects(VO).
> I am following the following way:
> 1. VO -> XML
> 2. Create XSL Stylesheet then
> 3. Use FOP with XML and XSL Stylesheet files to
> create PDF file.
> I am having problem with creating XSL Stylesheet. I
> am trying to create it manually. How can I create
> XSL Stylesheet? Is there any good tutorial about it?
> Now, I want to output two tables. Both categories
> are found within the same XML source but need to be
> placed in separate tables. Here is my xsl Stylesheet
> code:
>
>
>
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format"
> exclude-result-prefixes="fo">
> > omit-xml-declaration="no" indent="yes"/>
>
>
> > xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
> > master-name="simpleA4" page-height="29.7cm"
> page-width="21cm" margin-top="2cm"
> margin-bottom="2cm" margin-left="2cm"
> margin-right="2cm">
>
>
>
>
>
> > font-weight="bold" space-after="5mm">Project:
>
>
>
>
> > column-width="proportional-column-width(3)"/>
> > column-width="proportional-column-width(1)"/>
> > column-width="proportional-column-width(3)" />
>
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 1
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 2
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 3
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
>
>
>
>
> Thanks in advance...
>
> Kevin
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Creating multiple tables using a single XSL stylesheet?
Posted by Clay Leeds <cl...@medata.com>.
Kevin K. wrote:
> How about this time :-)
Every time you've posted one of these, it puts characters all over the
window. I use COURIER for my viewing, and it still looked funny. Perhaps
it would be better to create an HTML version of what you want, and post
a _link_ to the page. That way, people can see what you want?
HTH!
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Creating multiple tables using a single XSL stylesheet?
Posted by Abhijit Junnare <ma...@yahoo.com>.
I dont think I am following you and may be other arent
too.
Sorry about that but just doesnt enter my head :)
--- "Kevin K." <ke...@yahoo.com> wrote:
> How about this time :-)
>
>
==============================================================
> =
> =
> =
> =
> =
> =
> ==================================================
> =
> =
> =
> =
> =
> =
> =
> =
>
> = =
> =
> =
> =
> =
> =
> =
>
==============================================================
>
>
>
>
==============================================================
> =
>
> =
> =
>
> =
>
==============================================================
> = = =
> = =
> =
> = = =
> = =
> =
> = = =
> = =
> =
> = = =
> = =
> =
> = = =
> = =
> =
>
==============================================================
>
>
>
>
>
> "Kevin K." <ke...@yahoo.com> wrote:
> Opps....
>
> I mean the following tables:
> Thanks,
> Kevin
>
>
=======================================================================
> = = =
> = = =
> = = =
> = = =
> =================================================
> =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
> = = =
>
=======================================================================
>
>
=======================================================================
> = =
> = =
>
=======================================================================
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
> = = = = =
>
=======================================================================
>
> Abhijit Junnare <ma...@yahoo.com> wrote:
> What two different tables do you want? You said
> something about both categories. Do you mena to say
> that you want two tables exactly similar to each
> other? Didnt quite understand the problem.
> Thanks,
> abhi
> --- "Kevin K." wrote:
> > Hello,
> >
> > My knowledge is limited about XML technologies. I
> > am trying creating PDF files from Value
> Objects(VO).
> > I am following the following way:
> > 1. VO -> XML
> > 2. Create XSL Stylesheet then
> > 3. Use FOP with XML and XSL Stylesheet files to
> > create PDF file.
> > I am having problem with creating XSL Stylesheet.
> I
> > am trying to create it manually. How can I create
> > XSL Stylesheet? Is there any good tutorial about
> it?
> > Now, I want to output two tables. Both categories
> > are found within the same XML source but need to
> be
> > placed in separate tables. Here is my xsl
> Stylesheet
> > code:
> >
> >
> >
> > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > xmlns:fo="http://www.w3.org/1999/XSL/Format"
> > exclude-result-prefixes="fo">
> > > omit-xml-declaration="no" indent="yes"/>
> >
> >
> > > xmlns:fo="http://www.w3.org/1999/XSL/Format">
> >
> > > master-name="simpleA4" page-height="29.7cm"
> > page-width="21cm" margin-top="2cm"
> > margin-bottom="2cm" margin-left="2cm"
> > margin-right="2cm">
> >
> >
> >
> >
> >
> > > font-weight="bold" space-after="5mm">Project:
> >
> >
> >
> >
> > > column-width="proportional-column-width(3)"/>
> > > column-width="proportional-column-width(1)"/>
> > > column-width="proportional-column-width(3)" />
> >
> >
> >
> > > padding="1em" border-collapse="collapse">
> > > font-weight="bold">Column 1
> >
> >
> > > padding="1em" border-collapse="collapse">
> > > font-weight="bold">Column 2
> >
> >
> > > padding="1em" border-collapse="collapse">
> > > font-weight="bold">Column 3
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > padding="1em" border-collapse="collapse">
> >
> >
> >
> >
> >
> > > padding="1em" border-collapse="collapse">
> >
>
=== message truncated ===
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
Re: Creating multiple tables using a single XSL stylesheet?
Posted by "Kevin K." <ke...@yahoo.com>.
How about this time :-)
==============================================================
= = =
= = =
================================================== =
= = =
= = = = = =
= = =
= = =
==============================================================
==============================================================
= =
= =
==============================================================
= = = = = =
= = = = = = = = = = = =
= = = = = =
= = = = = =
==============================================================
"Kevin K." <ke...@yahoo.com> wrote:
Opps....
I mean the following tables:
Thanks,
Kevin
=======================================================================
= = =
= = =
= = =
= = =
================================================= =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
=======================================================================
=======================================================================
= =
= =
=======================================================================
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
=======================================================================
Abhijit Junnare <ma...@yahoo.com> wrote:
What two different tables do you want? You said
something about both categories. Do you mena to say
that you want two tables exactly similar to each
other? Didnt quite understand the problem.
Thanks,
abhi
--- "Kevin K." wrote:
> Hello,
>
> My knowledge is limited about XML technologies. I
> am trying creating PDF files from Value Objects(VO).
> I am following the following way:
> 1. VO -> XML
> 2. Create XSL Stylesheet then
> 3. Use FOP with XML and XSL Stylesheet files to
> create PDF file.
> I am having problem with creating XSL Stylesheet. I
> am trying to create it manually. How can I create
> XSL Stylesheet? Is there any good tutorial about it?
> Now, I want to output two tables. Both categories
> are found within the same XML source but need to be
> placed in separate tables. Here is my xsl Stylesheet
> code:
>
>
>
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format"
> exclude-result-prefixes="fo">
> > omit-xml-declaration="no" indent="yes"/>
>
>
> > xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
> > master-name="simpleA4" page-height="29.7cm"
> page-width="21cm" margin-top="2cm"
> margin-bottom="2cm" margin-left="2cm"
> margin-right="2cm">
>
>
>
>
>
> > font-weight="bold" space-after="5mm">Project:
>
>
>
>
> > column-width="proportional-column-width(3)"/>
> > column-width="proportional-column-width(1)"/>
> > column-width="proportional-column-width(3)" />
>
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 1
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 2
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 3
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
>
>
>
>
> Thanks in advance...
>
> Kevin
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Creating multiple tables using a single XSL stylesheet?
Posted by "Kevin K." <ke...@yahoo.com>.
Opps....
I mean the following tables:
Thanks,
Kevin
=======================================================================
= = =
= = =
= = =
= = =
================================================= =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
= = =
=======================================================================
=======================================================================
= =
= =
=======================================================================
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
= = = = =
=======================================================================
Abhijit Junnare <ma...@yahoo.com> wrote:
What two different tables do you want? You said
something about both categories. Do you mena to say
that you want two tables exactly similar to each
other? Didnt quite understand the problem.
Thanks,
abhi
--- "Kevin K." wrote:
> Hello,
>
> My knowledge is limited about XML technologies. I
> am trying creating PDF files from Value Objects(VO).
> I am following the following way:
> 1. VO -> XML
> 2. Create XSL Stylesheet then
> 3. Use FOP with XML and XSL Stylesheet files to
> create PDF file.
> I am having problem with creating XSL Stylesheet. I
> am trying to create it manually. How can I create
> XSL Stylesheet? Is there any good tutorial about it?
> Now, I want to output two tables. Both categories
> are found within the same XML source but need to be
> placed in separate tables. Here is my xsl Stylesheet
> code:
>
>
>
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format"
> exclude-result-prefixes="fo">
> > omit-xml-declaration="no" indent="yes"/>
>
>
> > xmlns:fo="http://www.w3.org/1999/XSL/Format">
>
> > master-name="simpleA4" page-height="29.7cm"
> page-width="21cm" margin-top="2cm"
> margin-bottom="2cm" margin-left="2cm"
> margin-right="2cm">
>
>
>
>
>
> > font-weight="bold" space-after="5mm">Project:
>
>
>
>
> > column-width="proportional-column-width(3)"/>
> > column-width="proportional-column-width(1)"/>
> > column-width="proportional-column-width(3)" />
>
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 1
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 2
>
>
> > padding="1em" border-collapse="collapse">
> > font-weight="bold">Column 3
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
> > padding="1em" border-collapse="collapse">
>
>
>
>
>
>
>
>
>
> Thanks in advance...
>
> Kevin
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
Re: Creating multiple tables using a single XSL stylesheet?
Posted by Abhijit Junnare <ma...@yahoo.com>.
What two different tables do you want? You said
something about both categories. Do you mena to say
that you want two tables exactly similar to each
other? Didnt quite understand the problem.
Thanks,
abhi
--- "Kevin K." <ke...@yahoo.com> wrote:
> Hello,
>
> My knowledge is limited about XML technologies. I
> am trying creating PDF files from Value Objects(VO).
> I am following the following way:
> 1. VO -> XML
> 2. Create XSL Stylesheet then
> 3. Use FOP with XML and XSL Stylesheet files to
> create PDF file.
> I am having problem with creating XSL Stylesheet. I
> am trying to create it manually. How can I create
> XSL Stylesheet? Is there any good tutorial about it?
> Now, I want to output two tables. Both categories
> are found within the same XML source but need to be
> placed in separate tables. Here is my xsl Stylesheet
> code:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.1"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format"
> exclude-result-prefixes="fo">
> <xsl:output method="xml" version="1.0"
> omit-xml-declaration="no" indent="yes"/>
>
> <xsl:template match="projectteam">
> <fo:root
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <fo:layout-master-set>
> <fo:simple-page-master
> master-name="simpleA4" page-height="29.7cm"
> page-width="21cm" margin-top="2cm"
> margin-bottom="2cm" margin-left="2cm"
> margin-right="2cm">
> <fo:region-body/>
> </fo:simple-page-master>
> </fo:layout-master-set>
> <fo:page-sequence master-reference="simpleA4">
> <fo:flow flow-name="xsl-region-body">
> <fo:block font-size="16pt"
> font-weight="bold" space-after="5mm">Project:
> <xsl:value-of select="projectname"/>
> </fo:block>
> <fo:block font-size="10pt">
> <fo:table>
> <fo:table-column
> column-width="proportional-column-width(3)"/>
> <fo:table-column
> column-width="proportional-column-width(1)"/>
> <fo:table-column
> column-width="proportional-column-width(3)" />
>
> <fo:table-header>
> <fo:table-row>
> <fo:table-cell border="solid black 1px"
> padding="1em" border-collapse="collapse">
> <fo:block text-align="justify"
> font-weight="bold">Column 1</fo:block>
> </fo:table-cell>
>
> <fo:table-cell border="solid black 1px"
> padding="1em" border-collapse="collapse">
> <fo:block text-align="justify"
> font-weight="bold">Column 2</fo:block>
> </fo:table-cell>
>
> <fo:table-cell border="solid black 1px"
> padding="1em" border-collapse="collapse">
> <fo:block text-align="justify"
> font-weight="bold">Column 3</fo:block>
> </fo:table-cell>
> </fo:table-row>
> </fo:table-header>
>
> <fo:table-body>
> <xsl:apply-templates/>
> </fo:table-body>
> </fo:table>
> </fo:block>
> </fo:flow>
> </fo:page-sequence>
> </fo:root>
> </xsl:template>
>
> <xsl:template match="member">
> <fo:table-row>
>
> <fo:table-cell border="solid black 1px"
> padding="1em" border-collapse="collapse">
> <fo:block>
> <xsl:value-of select="name"/>
> </fo:block>
> </fo:table-cell>
>
> <fo:table-cell border="solid black 1px"
> padding="1em" border-collapse="collapse">
> <fo:block>
> <xsl:value-of select="function"/>
> </fo:block>
> </fo:table-cell>
>
> <fo:table-cell border="solid black 1px"
> padding="1em" border-collapse="collapse">
> <fo:block>
> <xsl:value-of select="email"/>
> </fo:block>
> </fo:table-cell>
>
> </fo:table-row>
> </xsl:template>
> </xsl:stylesheet>
>
> Thanks in advance...
>
> Kevin
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org