|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSL for 2 columns- Format Specified
Hi,
You are posting in the wrong group. This question belongs in the
xsl-fo mailing list located at
http://lists.w3.org/Archives/Public/www-xsl-fo/
Anyway, To get multi-column you have to specify the column-count attribute
to the simple-page-master like below:
<fo:simple-page-master master-name="all-pages" xsl:use-attribute-sets="page
"><fo:region-body margin-top="{$page-margin-top}" margin-right="
{$page-margin-right}" margin-bottom="{$page-margin-bottom}margin-left="
{$page-margin-left}" column-count="{$column-count}" column-gap="
{$column-gap}" />
Regards,
Omprakash.V
samir sawant
<cindy_mona@y To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
ahoo.com> cc: (bcc: omprakash.v/Polaris)
Subject: Re: XSL for 2 columns- Format Specified
01/25/2005
02:35 AM
Please
respond to
xsl-list
Hi..
Thanks for the reply..
I was looking for the FO output though.
what could be the modification required?
Thanks,
Samir
--- Joris Gillis <roac@xxxxxxxxxx> wrote:
> Tempore 15:47:57, die 01/24/2005 AD, hinc in
> xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit samir
> sawant
> <cindy_mona@xxxxxxxxx>:
>
> > Need to convert this in following format where i
> will
> > get 2 columns side by side on pages which will
> > continue till the end of data. Flow of the data on
> the
> > page should be down and then across
> >
> > AFter every 5 records , the line space should be
> > there.
> > BOth columns should be inline means space after 5
> > records in both columns should match on the same
> line.
> > Field within same column should be seperated by
> space
> >
> > two columns should be seperated by vertical line
> in
> > between. Headings should repeat on each page.
> > Format should look like as below:
>
> Something like this might do:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:output indent="yes" method="html"/>
>
> <xsl:variable name="size"
> select="ceiling(count(root/region/row) div 2)"/>
>
> <xsl:template match="root">
> <html>
> <body>
> <xsl:apply-templates select="region"/>
> </body>
> </html>
> </xsl:template>
>
> <xsl:template match="region">
> <table>
> <thead>
> <th>field A</th>
> <th>field B</th>
> </thead>
> <xsl:apply-templates
> select="row[position() <= $size]"/>
> </table>
> </xsl:template>
>
> <xsl:template match="row">
> <tr>
> <xsl:apply-templates select="."
> mode="col"/>
> </tr>
> <xsl:if test="position() mod 5=0">
> <tr><td><br/></td><td><br/></td></tr>
> </xsl:if>
> </xsl:template>
>
> <xsl:template match="row" mode="col">
> <td style="border-right:1px solid black">
> <xsl:apply-templates select="*"/>
> </td>
> <td>
> <xsl:apply-templates
>
select="following-sibling::row[position()=$size]/*"/>
> </td>
> </xsl:template>
>
> <xsl:template match="field">
> <xsl:apply-templates/><xsl:text> </xsl:text>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
>
> regards,
> --
> Joris Gillis
>
(http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
> Laudeo W3C et dona ferens
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.
If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
Visit Us at http://www.polaris.co.in
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








