[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Dynamic Two Column Printing

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

http://renderx.com/reference.html#Flow_sections

dan



Dan Ochs, Principal Consultant
Wrycan, Inc
dan(dot)ochs(at)wrycan(dot)com
http://www.wrycan.com


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.

XML:

<legaldoc>
        <law>
                <section>
                        <sectno></sectno>
                        <amendatorysection>
                                <bookinfo>Title goes here</bookinfo>
                                <statueno>XX-XXXX</statueno>
                                <catchline>Section header goes here</catchline>
                                <para>Paragraph one</para>
                                <para>Paragraph two</para>
                                ...
                        </amendatorysection>
                </section>
                <source>
                        <para>Source one</para>
                        <para>Source two</para>
                        ...
                        <operativedate>Date</operativedate>
                </source>
                <crossreference>
                        <para>
                                <emphasis>Cross Reference Name</emphasis>
                                location of cross reference name
                        </para>
                </crossreference>
                <annotation>
                        <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>
                        ...
                        ...
                </annotation>
        </law>
</legaldoc>

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

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

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


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?

Thanks,
Luke Jones
Technology Center Intern
Nebraska Legislature

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.