XSLT param for FOP pdfprofile parameter

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

XSLT param for FOP pdfprofile parameter

Stefan Hegny (hydrografix Consulting GmbH)
Hello,
would like to know if when calling fop (2.1) with -pdfprofile 'PDF/A-1a'
(e.g.)
this value is also somehow available to a xalan xslt transform that is
invoked
by fop when using -xsl stylesheet.xsl -xml input.xml. Or do I have to
declare
it in xslt manually somehow and set by -param mypdfprofile .. somehow.
Thx a lot & kind regards - Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: XSLT param for FOP pdfprofile parameter

Andreas Delmelle-2
Hi Stefan

> On 22 Jul 2016, at 16:09, Stefan Hegny (hydrografix Consulting GmbH) <[hidden email]> wrote:
>
> Hello,
> would like to know if when calling fop (2.1) with -pdfprofile 'PDF/A-1a' (e.g.)
> this value is also somehow available to a xalan xslt transform that is invoked
> by fop when using -xsl stylesheet.xsl -xml input.xml. Or do I have to declare
> it in xslt manually somehow and set by -param mypdfprofile .. somehow.

The latter, I'm afraid. The output format is only available to FOP itself, and not passed to the XSLT (pre-)processor.

That said, I don't think it would be too hard to build that into FOP as it uses JAXP, but given that our current PMC chair seems to be of the opinion that it was a mistake to add support for XML+XSLT input as a convenience for the users in the first place, it could turn out to be a tough sell...


Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: XSLT param for FOP pdfprofile parameter

Stefan Hegny (hydrografix Consulting GmbH)
In reply to this post by Stefan Hegny (hydrografix Consulting GmbH)

Thanks Andreas!

It's no mistake for me, xalanj does a good job. And adding the parameter separately is just a bit inconvenient...

BR Stefan

Hi Stefan

> On 22 Jul 2016, at 16:09, Stefan Hegny (hydrografix Consulting GmbH) [hidden email]
wrote:
> 
> Hello,
> would like to know if when calling fop (2.1) with -pdfprofile 'PDF/A-1a' (e.g.)
> this value is also somehow available to a xalan xslt transform that is invoked
> by fop when using -xsl stylesheet.xsl -xml input.xml. Or do I have to declare
> it in xslt manually somehow and set by -param mypdfprofile .. somehow.

The latter, I'm afraid. The output format is only available to FOP itself, and not passed
to the XSLT (pre-)processor.

That said, I don't think it would be too hard to build that into FOP as it uses JAXP, but
given that our current PMC chair seems to be of the opinion that it was a mistake to add support
for XML+XSLT input as a convenience for the users in the first place, it could turn out to
be a tough sell...


Cheers

Andreas

-- 

Stefan Hegny, Geschäftsführer/Manager
hydrografix Consulting GmbH       [hidden email]
Tel. +49 - 173-3257674            Fax +49 - 6106-772614
Görlitzer Str. 13
D-63110 Rodgau                    Amtsgericht Offenbach/Main HRB 43974
Geschäftsführer: Roland Junker, Stefan Hegny

Reply | Threaded
Open this post in threaded view
|

Re: XSLT param for FOP pdfprofile parameter

Stefan Hegny (hydrografix Consulting GmbH)
Hi Andreas,

one more idea:
Put the other way round, there's also no way to force a specific pdfprofile from a fo? Where the xsltransform could insert it depending on a param?

Cheers
Stefan


Hi Stefan

> On 22 Jul 2016, at 16:09, Stefan Hegny (hydrografix Consulting GmbH) [hidden email]
wrote:
> 
> Hello,
> would like to know if when calling fop (2.1) with -pdfprofile 'PDF/A-1a' (e.g.)
> this value is also somehow available to a xalan xslt transform that is invoked
> by fop when using -xsl stylesheet.xsl -xml input.xml. Or do I have to declare
> it in xslt manually somehow and set by -param mypdfprofile .. somehow.

The latter, I'm afraid. The output format is only available to FOP itself, and not passed
to the XSLT (pre-)processor.

That said, I don't think it would be too hard to build that into FOP as it uses JAXP, but
given that our current PMC chair seems to be of the opinion that it was a mistake to add support
for XML+XSLT input as a convenience for the users in the first place, it could turn out to
be a tough sell...


Cheers

Andreas

-- 

Stefan Hegny, Geschäftsführer/Manager
hydrografix Consulting GmbH       [hidden email]
Tel. +49 - 173-3257674            Fax +49 - 6106-772614
Görlitzer Str. 13
D-63110 Rodgau                    Amtsgericht Offenbach/Main HRB 43974
Geschäftsführer: Roland Junker, Stefan Hegny



-- 

Stefan Hegny, Geschäftsführer/Manager
hydrografix Consulting GmbH       [hidden email]
Tel. +49 - 173-3257674            Fax +49 - 6106-772614
Görlitzer Str. 13
D-63110 Rodgau                    Amtsgericht Offenbach/Main HRB 43974
Geschäftsführer: Roland Junker, Stefan Hegny

Reply | Threaded
Open this post in threaded view
|

Re: XSLT param for FOP pdfprofile parameter

Andreas Delmelle-2
Hi Stefan

> On 22 Jul 2016, at 23:21, Stefan Hegny (hydrografix Consulting GmbH) <[hidden email]> wrote:
>
> Hi Andreas,
>
> one more idea:
> Put the other way round, there's also no way to force a specific pdfprofile from a fo?

Correct. It is just an additional output option for FOP's PDF renderer, and as such not covered by XSL-FO (although one could conceivably use the fo:declarations section to carry that info, but that too would require an extension to be written, and still, it would not be automatically available in the XSLT stage)

> Where the xsltransform could insert it depending on a param?

Yep, and what I was thinking of, is that based on that XSLT parameter, the user/stylesheet author would be able to conditionally generate different FO. For example, if you know that certain FO constructs would lead to PDF that does not conform to PDF/A-1a, then if that parameter is passed to the XSLT process, one could take that into account and use a different set of templates.

If those additional output options were _always_ passed by FOP to the XSLT processor via JAXP, say as parameters with a name prefixed with 'fop-output-' or something along those lines, then it can be documented and every user would have those available, if needed.

Just my 2 cents...


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]