On Tue, Jan 31, 2012 at 8:35 PM, Karl Wright <daddy...@gmail.com> wrote:
> On Tue, Jan 31, 2012 at 8:04 AM, Tim Williams <william...@gmail.com> wrote:
>> On Tue, Jan 31, 2012 at 3:16 AM, Karl Wright <daddy...@gmail.com> wrote:
>>> Hi Hitoshi,
>>>
>>> plugins/org.apache.forrest.plugin.output.pdf/resources/stylesheets/document-to-fo.xsl
>>> does seem like the right place to conditionalize things, but I'm
>>> unclear in your example where the language specifier comes from?  In
>>> other words, I'd like the path to the current file to determine the
>>> language, not the system settings.  Do you (or does anyone else) know
>>> how to construct a conditional within the document-to-fo.xsl file that
>>> would (say) base a decision for a font choice on whether a file had a
>>> name that matched a particular regular expression?  That's the kind of
>>> logic I'm looking for here.
>>
>> Hi Karl,
>> Know?  Unfortunately not - this is a guess.  Create a copy of
>> document-to-fo.xsl - using the project-specific locationmap to find
>> it.  Then, inside your own document-to-fo.xsl you should have access
>> to a "path" parameter.  You may add an additional condition to the
>> font of interest (e.g. rootFontFamily) that uses XSL string functions
>> against your $path parameter. Unfortunately, I can't verify any of
>> this until tonight.
>>
>> Thanks,
>> --tim
>
> Thanks, Tim, for the reply.  I'll experiment to see if I can use $path
> in the manner I need.
>
> Could you elaborate on where the "project-specific locationmap" should
> be found?  Our site was created initially by someone else and doesn't
> appear to have such a thing.
>
> Karl

I generated a new site with "forrest seed", and found a
locationmap.xml file under src/documentation/content.  But there's no
mention of document-to-fo.xsl in the generated stub; maybe it's
possible to override something at this level but it is not clear how.

On the other hand, I know where to find document-to-fo.xsl inside
Forrest itself, so I may just start there.

Karl