Output PDF file name based on variables
Posted: Fri May 17, 2024 8:09 pm
Hi,
How can I make sure the PDF output file name is based on the DITA bookmap title (or certain keywords)?
I tested various methods but none of them worked.
Best wishes.
How can I make sure the PDF output file name is based on the DITA bookmap title (or certain keywords)?
I tested various methods but none of them worked.
Best wishes.
Code: Select all
<!-- Overwrite file name, See
https://www.oxygenxml.com/doc/versions/26.1/ug-pdf-css/topics/dcpp_parameters.html?hl=args.output.base
https://www.oxygenxml.com/doc/versions/26.0/ug-editor/topics/editor-variables.html?hl=xpath_eval
https://www.oxygenxml.com/forum/post71459.html#p71459
https://www.oxygenxml.com/forum/post54730.html#p54730
-->
<!--with rootmapURL https://www.oxygenxml.com/doc/versions/26.1/ug-editor/topics/editor-variables.html -->
<!--Transformation fails -->
<!-- <parameter name="args.output.base" value="${xpath_eval(doc('${rootMapURL}')//*[contains (@class, " front-page/front-page-title")]/*[contains(@class, " topic/title ")]/*[contains(@class, " topic/keyword ")][2])}"/> -->
<!-- Transformation fails -->
<!-- <parameter name="args.output.base" value="${xpath_eval(//*[contains (@class, " front-page/front-page-title")]/*[contains(@class, " topic/title ")]/*[contains(@class, " topic/keyword ")][2])}"/> -->
<!-- static -->
<!-- Transformation fails -->
<!-- <parameter name="args.output.base" value="${xpath_eval(normalize-space(string-join(/*[contains(@class, 'topic/title')]//text())))}"/> -->
<!-- Transformation fails -->
<!-- <parameter name="args.output.base" value="${xpath_eval(normalize-space(string-join(/*[contains(@class, 'map/map')]/*[contains(@class, 'front-page/front-page-title')]//text())))}"/> -->
<!-- Transformation fails -->
<!-- <parameter name="args.output.base" value="${xpath_eval(normalize-space(string-join(/*[contains(@class, 'map/map')]/*[contains(@class, 'topic/title')]//text())))}"/> -->
<!-- file name is identical to value -->
<!--<parameter name="args.output.base" value="${xpath_eval(upper-case(substring('${cfn}', 1, 4)))}"/>-->
<!-- dynamic -->
<!-- Transformation fails -->
<!-- <parameter name="args.output.base" value="${ask('Set new ID attribute', generic, '${xpath_eval(normalize-space(string-join(/*[contains(@class, 'front-page/front-page-title')]//text())))}"/> -->
<!-- <parameter name="args.output.base" value="${ask('Set new ID attribute', generic, '${xpath_eval(//*[contains (@class, " front-page/front-page-title")]/*[contains(@class, " topic/title ")]/*[contains(@class, " topic/keyword ")][2]}')}"/> -->
<!-- file name is identical to value -->
<!-- <parameter name="args.output.base" value="${ask('Message', input_type, '${cfn}')}"/> -->