[EMAIL PROTECTED] wrote:
> Hi, Richard,
>
>> What I would like is a way to specify the attribute-set inline at the
>> top of the .fo file and then reference them further down in fo layout
>> statements.
>
> That won't work in an FO file because FO doesn't know anything about
> transformation. You are right in thinking that you'll have to get the
> information through one of your Java-based steps in the process.
>
> I think the "standard" solution is to use XSLT to produce the FO
> file, which you indicate you are not doing. Given what little I
> understand of your processing model, I would apply the styles in the
> JSP layer. That would let me follow the general rule of applying
> style as late as possible so that I can produce different output
> formats with as few "upstream" changes to the process as possible.
>
> FWIW
Jay, thanks. I just tried that and its working like a charm. I've just
defined my styles as a bunch of JSP scripting variables and reference
them in my FO markup. Since I'm using JSP 2.0, I don't need to use any
ugly embeded tags (i.e. "tags within tags"). In case the post might help
someone else in the future, here's a snipped of what I am doing.
<BEGIN FO file>
...
<c:set var="fo_font_std" value='font-family="sans-serif"'/>
<c:set var="fo_border_light" value='border-collapse="separate"
border-color="black" border-width="0.5pt" border-style="solid"'/>
<c:set var="fo_border_heavy" value='border-collapse="separate"
border-color="black" border-width="1pt" border-style="solid"'/>
<c:set var="fo_cell_detail" value='${fo_font_std} font-size="10pt"
text-align="right"'/>
<c:set var="fo_cell_newSet" value='${fo_font_std} font-size="12pt"'/>
... Then later on I can refer to the above styles using JSP 2.0 syntax
of ${variable_name} as follows:
<fo:table-row>
<fo:table-cell ${fo_border_light}>
<fo:block ${fo_cell_detail}>
Cell text
</fo:block>
</fo:table-cell>
Thanks to all that have helped - Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]