Subject: Re: [xsl] Dynamic Two Column Printing From: "Dan Ochs" <dan.ochs@xxxxxxxxx> Date: Thu, 1 Feb 2007 14:33:28 -0800 |
Dan Ochs, Principal Consultant Wrycan, Inc dan(dot)ochs(at)wrycan(dot)com http://www.wrycan.com
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Xpath expression for nest, Simon Shutter | Thread | [xsl] How to protect the text only , Vanaja Selvaraj |
RE: [xsl] Xpath expression for nest, Michael Kay | Date | [xsl] How to protect the text only , Vanaja Selvaraj |
Month |