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

How to calculate column number of the entry?

Subject: How to calculate column number of the entry?
From: Toshihiko Makita <tmakita@xxxxxxxxx>
Date: Thu, 28 May 2009 12:03:38 +0900
 How to calculate column number of the entry?
Hi all,

I have a question about DocBook table to XSL-FO transformation.

I am developing DocBook table to XSL-FO stylesheet. It is not
specialized for specific user use. It should be a general stylesheet.

My question is as follows:

1. The table columns are described with colspec element like follows:

   <colspec colname="col1" colwidth="1*"/>
   <colspec colname="col2" colwidth="2*" align="right"/>
   <colspec colname="col3" colwidth="2*"/>

2. Usually XSL-FO property is inherited from fo:table-and-caption ==>
fo:table ==> fo:table-header, fo:table-footer, fo:table-body ==>
fo:table-row ==> fo:table-cell. However I want to apply colspec/@align
attribute using from-table-column() function to fo:table-cell *only*
when it is defined in colspec element. In the above example, I want to
apply text-align="right" to the fo:table-cell only when its column
number is 2.

   <fo:table-cell text-align="from-table-column()">
    ...
   </fo:table-cell)

3. To know colspec/@align is defined or not in colspec, it is necessary
to know what column number current entry is. The entry element defines
colname, namest or spanname attribute. If one of them is specified, the
stylesheet can calculate column number from the attribute value. But
these attributes are not mandatory.

4. If above attributes are not defined in the entry element, the
stylesheet must calculate the column number by itself. I think it is
easy when the table has no row spans. If there are row spans, it may be
impossible for stylesheet to calculate the correct column number.

Is there any elegant way to get the column number of the entry element
in stylesheet? Or is there any misunderstanding in my assumption?

Any suggestion is welcome.

Thanks,

Toshihiko Makita

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.