pdf output with dynamic filename

Post here questions and problems related to oXygen frameworks/document types.
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

pdf output with dynamic filename

Post by Patrik »

Hi,

my current pdf transformation uses simply "${cfn}.pdf" as configured output file. However, I'd like to add the document version (coming from a specific element inside the document) to the filename. And for my diff it should be something like "${BookName}-Diff-v${NewerVersion}-to-${OlderVersion}.pdf".

I already implemented this for my pure xml transformation where I can use xsl:result-document and calculate the value fo @href inside the xslt. Is there any way to do the same when using the (apache-)fop?

Thanks and regards,

Patrik
Radu
Posts: 9056
Joined: Fri Jul 09, 2004 5:18 pm

Re: pdf output with dynamic filename

Post by Radu »

Hi Patrik,

Funny thing, there is somebody else on this forum with the user name patrick who had the same problem about a couple of weeks ago and he solved it using the xpath_eval editor variable:

http://www.oxygenxml.com/doc/ug-oxygen/ ... ables.html

which we added in Oxygen 16.0.

The forum thread is here:

http://www.oxygenxml.com/forum/topic11084.html

So initially I thought that you were asking again for an answer to the same problem.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Patrik
Posts: 280
Joined: Thu Nov 28, 2013 9:32 am
Location: Hamburg/Germany
Contact:

Re: pdf output with dynamic filename

Post by Patrik »

Hi Radu,

thanks for the hint. But the xpath-expression would be quite complex and programming inside a single line edit field is not really confortable.

Now I use xproc including an additional xslt to calculate the filename and this works as well and feels easier to maintain.

Regards,

Patrik
Radu
Posts: 9056
Joined: Fri Jul 09, 2004 5:18 pm

Re: pdf output with dynamic filename

Post by Radu »

Hi Patrik,

Yes, XProc is also an option. Or you can write an ANT build file with multiple stages and create a transformation scenario for it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply