Re: [xsl] Dynamic Two Column Printing

Subject: Re: [xsl] Dynamic Two Column Printing
From: "Dan Ochs" <dan.ochs@xxxxxxxxx>
Date: Thu, 1 Feb 2007 14:33:28 -0800
I would use the rx:flow-section element to accomplish this.


Dan Ochs, Principal Consultant
Wrycan, Inc

On 1/29/07, Luke Jones <ljones@xxxxxxxxxx> wrote:
I'm trying to take a portion of an xml document and format it so it is
in two columns, the rest of the document would remain unaffected.

Here is a sample of an xml document.  Eventually MANY of these types of
documents will be linked together and parsed as one in making a large
legal book.


                                <bookinfo>Title goes here</bookinfo>
                                <catchline>Section header goes here</catchline>
                                <para>Paragraph one</para>
                                <para>Paragraph two</para>
                        <para>Source one</para>
                        <para>Source two</para>
                                <emphasis>Cross Reference Name</emphasis>
                                location of cross reference name
                        <toc> Table of contence enteries </toc>
                        <heading> Heading title one </heading>
                        <!-- these paras are NOT children to heading but rather siblings to
the annotation parent.-->
                        <para> Para one under Heading title one </para>
                        <heading> Heading title two </heading>
                        <para> Para one under Heading title two>

The XSL I have so far is pretty simple. It is as follows.

<template match = "\">
                <fo:page-sequence master-reference = "all-pages">
                        <fo:flow flow-name="xsl-region-body">
                                <fo:block text-align-last = "justify">
                                         <xsl:apply-templates />

<template match = "section">
<template match = "source"?
<!-- it is within this template where I am trying to get the two column
</template match = "annotation">

I've tried using column attributes within the simple-page-master functions. However that makes the entire document two columned. Since span = "all" needs to be a child of flow, I could not specify which templates to ignore the column command. (This is to the best of my understanding)

I've also tried using a table, however with a table the data does not
wrap to the next column when it reaches the end of a page.  I've been
looking to see if there is a way to keep track of the position of the
text however I haven't found quite what I'm looking for.

Is what I'm trying to do possible?  Does anyone have any ideas on how to
accomplish this?

Luke Jones
Technology Center Intern
Nebraska Legislature

Current Thread