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

Re: cals table tgroup/colspec/@align attributes writte

Subject: Re: cals table tgroup/colspec/@align attributes written to entry/@align
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 21 May 2007 13:31:47 +0100
Re:  cals table tgroup/colspec/@align attributes writte
On 5/21/07, Frank Marent <frank.marent@xxxxxxxxxxx> wrote:
hello

i wonder if there is an existing xslt solution for this. i couldn't
find one:

in cals tables column alignments are set as tgroup/colspec/@align
attributes. we need an xslt that inherits entry/@align attributes
from the appropriate tgroup/colspec/@align attributes, so the values
of the tgroup/colspec/@align attributes are written correctly to the
appropriate entry/@align attributes.

since cals tables can be very mean concernings cell spans this is not
a trivial task. like this six column table below shows. in this table
the three cells in the fifth row (a5, d5 and f5) have to be
recognized correctly as first, forth and sixth column cell and cell
d5 should be centered since column d is centered.

Here's an XSLT 1.0 solution I wrote a long time ago:


http://www.dpawson.co.uk/xsl/sect2/N7450.html#d10871e676

I'm sure I had an XSLT 2.0 version somewhere but I can't find it
now... I can't vouch for the quality of 1.0 solution, I just remember
CALS being a pain - the optional naming of cells which means you would
have to normalize the table first to work out exactly which colgroup
the cell belonged to, something like that anyway... the synapses have
long since disconnected and moved to happier parts.

Alternatively you can look at docbooks table.xsl which is for the
OASIS table model, which is very similar but doesn't have the nasty
parts of CALS (afaik).

Best of luck,
andrew.

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.