Re: [xsl] Question about table column width in XSLT/XSLFO

Subject: Re: [xsl] Question about table column width in XSLT/XSLFO
From: ms <mina_hurray@xxxxxxxxx>
Date: Tue, 17 Oct 2006 09:20:16 -0700 (PDT)
Well, I am a little confused. Please bear with me as I
try to explain.

My XML does not have "colnum" as an attrinute to
'colspec". It only has "colname", and the "entry" tag
has the "namest" and "namend". The "colname" tag has
names of the columns like "c1", "c2" etc. So how the
XML for entry will have 
<entry namest="c1" namend="c9">

How do you achieve column span using these column
names instead of column numbers in xslt? 

Thank you for all your patience and help.


--- "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
wrote:

> At 2006-10-17 07:18 -0700, ms wrote:
> >Thank you for your response Ken. I was able to work
> >out a solution for XSLT.
> 
> I'm assuming that you mean, above, "for HTML" ... 
> I'm not sure what it means to say you have a
> "solution for XSLT".
> 
> >I am having an issue with
> >XSLFO though. Converting CALS to PDF. Specially
> with
> >the column span attribute. How do I calculate
> column
> >span using namest and namend from cals for XSLFO?
> It
> >seems simpler in XSLT, but I am lost with XSLFO.
> 
> Perhaps I'm confused ... what do you mean by "in 
> XSLT"?  One usually uses XSLT to create an 
> instance of XSL-FO.  But the same is true for 
> creating an instance of HTML, so again I'll 
> assume you have already solved your problem for
> HTML.
> 
> And if you already have the answer for HTML using 
> XSLT, then you are already calculating the number 
> of columns spanned by dereferencing the named 
> column for nameend from the named column for 
> namest.  Something like the following untested
> snippet:
> 
>    colspan="{ count(
> ancestor::table[1]/colspec[name=current()/@nameend]/
>                      preceding-sibling::colspec ) -
>               count(
> ancestor::table[1]/colspec[name=current()/@namest]/
>                      preceding-sibling::colspec )
>               + 1 }"
> 
> Just do the same in XSL-FO for 
> number-columns-spanned= ... I don't see any 
> difference between the two for spanning columns 
> of a table cell.  When I've had to work with 
> nameend= and namest= I've used something along 
> the lines of the above with easy success.
> 
> I'm not sure why the calculation you are already 
> doing for HTML isn't working for XSL-FO.
> 
> I hope this helps.
> 
> . . . . . . . . . . . . . Ken
> 
> 
> --
> UBL/XSLT/XSL-FO training: Allerxd/Verx Denmark
> 2006-11-13,17,20/24
> UBL International 2006  2006-11-13/17
> http://www.ublconference.com
> World-wide corporate, govt. & user group UBL, XSL, &
> XML training.
> G. Ken Holman                
> mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
> Crane Softwrights Ltd.         
> http://www.CraneSoftwrights.com/s/
> Box 266, Kars, Ontario CANADA K0A-2E0   
> +1(613)489-0999 (F:-0995)
> Male Cancer Awareness Aug'05 
> http://www.CraneSoftwrights.com/s/bc
> Legal business disclaimers: 
> http://www.CraneSoftwrights.com/legal
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread