You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Sjur Moshagen <sj...@mac.com> on 2008/08/19 14:48:31 UTC
To lm or not to lm - pdf
Hello all,
In the main stylesheet for the transformation to fo, the following
lines caught my attention:
<xsl:include
href="helper-pdfoutline.xsl" />
<xsl:include
href="footerinfo.xsl" />
<xsl:include
href="lm://pdf.transform.helper.pageBreaks" />
<xsl:include
href="helper-pageNumber.xsl" />
<xsl:include
href="helper-commonElements.xsl" />
<xsl:include
href="helper-layout.xsl" />
<xsl:include
href="helper-xmpMetadata.xsl" />
Only the third inclusion is using the locationmap.
Is there any reason for this (no-)use of lm lookups, or could I
rewrite the rest of the inclusions to use locationmap lookups?
Hm, come to think of it - speed might be a good reason why the rest
are not looked up via locationmaps. But then why the page breaks? One
would rather expect the commonElements or some other major part to be
made easily available for customisation (the main reason for lm lookup
in pdf generation, I assume).
Comments?
Best regards,
Sjur
Re: To lm or not to lm - pdf
Posted by Sjur Moshagen <sj...@mac.com>.
Den 19. aug. 2008 kl. 15.48 skrev Sjur Moshagen:
> Hello all,
>
> In the main stylesheet for the transformation to fo, the following
> lines caught my attention:
Sorry, forgot to mention which file this is:
resources/stylesheets/document-to-fo.xsl within the pdf plugin.
Sjur
Re: To lm or not to lm - pdf
Posted by Sjur Moshagen <sj...@mac.com>.
Den 23. aug. 2008 kl. 00.03 skrev Ross Gardler:
> Thorsten Scherler wrote:
>> On Tue, 2008-08-19 at 15:48 +0300, Sjur Moshagen wrote:
>>> Hello all,
>>>
>>> In the main stylesheet for the transformation to fo, the
>>> following lines caught my attention:
>>>
>>> <xsl:include
>>> href="helper-pdfoutline.xsl" />
>>> <xsl:include
>>> href="footerinfo.xsl" />
>>> <xsl:include
>>> href="lm://pdf.transform.helper.pageBreaks" />
>>> <xsl:include
>>> href="helper-pageNumber.xsl" />
>>> <xsl:include
>>> href="helper-commonElements.xsl" />
>>> <xsl:include
>>> href="helper-layout.xsl" />
>>> <xsl:include
>>> href="helper-xmpMetadata.xsl" />
>>>
>>> Only the third inclusion is using the locationmap.
>>>
>>> Is there any reason for this (no-)use of lm lookups, or could I
>>> rewrite the rest of the inclusions to use locationmap lookups?
>> I would say yes we should use the locationmap since that makes it
>> easy
>> overwritable. I reckon nobody came around to implement the
>> corresponding matches, feel
>> free to do so if you want.
>
> As I'm (probably) the one who did the transfer to LM in the first
> place I can't think of any reason why I did not do it using the LM.
> Quite possibly these were added after the LM tranfer and done by
> someone who didn't know how it worked.
It is very easy to change for all helper-* files, the LM match is
already defined. I have changed it locally, but since the same
stylesheet is now full of changes related to the ongoing work of
making the pdf plugin fully user configurable and i18n-ed, I haven't
commited the change yet. (Hm, I know, it is usually much better to
check in small amounts of edits than one gigantuous, but most of the
changes are interdependent, and checking in only some of them would
make the plugin non-functional in one or more areas; perhaps a
separate branch would have been better)
Best regards,
Sjur
Re: To lm or not to lm - pdf
Posted by Ross Gardler <rg...@apache.org>.
Thorsten Scherler wrote:
> On Tue, 2008-08-19 at 15:48 +0300, Sjur Moshagen wrote:
>> Hello all,
>>
>> In the main stylesheet for the transformation to fo, the following
>> lines caught my attention:
>>
>> <xsl:include
>> href="helper-pdfoutline.xsl" />
>> <xsl:include
>> href="footerinfo.xsl" />
>> <xsl:include
>> href="lm://pdf.transform.helper.pageBreaks" />
>> <xsl:include
>> href="helper-pageNumber.xsl" />
>> <xsl:include
>> href="helper-commonElements.xsl" />
>> <xsl:include
>> href="helper-layout.xsl" />
>> <xsl:include
>> href="helper-xmpMetadata.xsl" />
>>
>> Only the third inclusion is using the locationmap.
>>
>> Is there any reason for this (no-)use of lm lookups, or could I
>> rewrite the rest of the inclusions to use locationmap lookups?
>
> I would say yes we should use the locationmap since that makes it easy
> overwritable.
>
> I reckon nobody came around to implement the corresponding matches, feel
> free to do so if you want.
As I'm (probably) the one who did the transfer to LM in the first place
I can't think of any reason why I did not do it using the LM. Quite
possibly these were added after the LM tranfer and done by someone who
didn't know how it worked.
Ross
Re: To lm or not to lm - pdf
Posted by Thorsten Scherler <th...@apache.org>.
On Tue, 2008-08-19 at 15:48 +0300, Sjur Moshagen wrote:
> Hello all,
>
> In the main stylesheet for the transformation to fo, the following
> lines caught my attention:
>
> <xsl:include
> href="helper-pdfoutline.xsl" />
> <xsl:include
> href="footerinfo.xsl" />
> <xsl:include
> href="lm://pdf.transform.helper.pageBreaks" />
> <xsl:include
> href="helper-pageNumber.xsl" />
> <xsl:include
> href="helper-commonElements.xsl" />
> <xsl:include
> href="helper-layout.xsl" />
> <xsl:include
> href="helper-xmpMetadata.xsl" />
>
> Only the third inclusion is using the locationmap.
>
> Is there any reason for this (no-)use of lm lookups, or could I
> rewrite the rest of the inclusions to use locationmap lookups?
I would say yes we should use the locationmap since that makes it easy
overwritable.
I reckon nobody came around to implement the corresponding matches, feel
free to do so if you want.
salu2
>
> Hm, come to think of it - speed might be a good reason why the rest
> are not looked up via locationmaps. But then why the page breaks? One
> would rather expect the commonElements or some other major part to be
> made easily available for customisation (the main reason for lm lookup
> in pdf generation, I assume).
>
> Comments?
>
> Best regards,
> Sjur
>
--
Thorsten Scherler thorsten.at.apache.org
Open Source Java consulting, training and solutions