DITA PDF2 "external-graphic" reference
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 58
- Joined: Fri Sep 12, 2008 12:12 am
DITA PDF2 "external-graphic" reference
Hello,
I am using Oxygen to transform DITA topics into PDF2 (Idiom plugin) and I have added the following code to the front-matter_1.0.xsl file:
But I need the path to be relative not absolute. I am not sure if this is possible so I have tried rather utilizing an existing parameter such as <fo:external-graphic src="{$artworkPrefix}/cis_logo.jpg"/> and that seems to work okay except it does not point to the directory of my logo (the basedir), so I would like to pass another parameter to it from build.xml (in /DITA-OT/demo/fo), but am unsure of how to do this. Does anyone have any ideas how I can point to the logo in my basedir with a variable/parameter? Or should I consult the DITA yahoo users group?
Thanks,
Josh
I am using Oxygen to transform DITA topics into PDF2 (Idiom plugin) and I have added the following code to the front-matter_1.0.xsl file:
Code: Select all
<fo:block>
<fo:external-graphic src="/some/absolute/path/cis_logo.jpg"/>
</fo:block>
Thanks,
Josh
-
- Posts: 9472
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DITA PDF2 "external-graphic" reference
Hi Josh,
Ok, so first, as you explained on the DITA Users List you have to set a parameter for it in the "front-matter_1.0.xsl":
<xsl:param name="artworkPrefixPath"/>
Then you have to pass a value for the XSLT parameter from the build file.
Open the DITA-OT\demo\fo\build.xml file in Oxygen.
Add a new parameter at the start of the build file:
<property name="artworkPrefixPath"/>
Now search for the XSLT transformation which creates the FO file.
Search for the line:
<arg line='-o "${buildDir}/stage2.fo"'/>
and add at the end of the arguments list an argument like:
<arg line='"artworkPrefixPath=${artworkPrefixPath}"'/>
Then, open the DITA Map in Oxygen, edit a DITA to PDF transformation scenario, in the Parameters tab add a new Parameter called "artworkPrefixPath" with the desired value.
Regards,
Radu
Ok, so first, as you explained on the DITA Users List you have to set a parameter for it in the "front-matter_1.0.xsl":
<xsl:param name="artworkPrefixPath"/>
Then you have to pass a value for the XSLT parameter from the build file.
Open the DITA-OT\demo\fo\build.xml file in Oxygen.
Add a new parameter at the start of the build file:
<property name="artworkPrefixPath"/>
Now search for the XSLT transformation which creates the FO file.
Search for the line:
<arg line='-o "${buildDir}/stage2.fo"'/>
and add at the end of the arguments list an argument like:
<arg line='"artworkPrefixPath=${artworkPrefixPath}"'/>
Then, open the DITA Map in Oxygen, edit a DITA to PDF transformation scenario, in the Parameters tab add a new Parameter called "artworkPrefixPath" with the desired value.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 58
- Joined: Fri Sep 12, 2008 12:12 am
Re: DITA PDF2 "external-graphic" reference
Wow. How have I not noticed the feature to add new parameters to the transformations before? Has that always been there? Having a fixed number of parameters has been a problem in the past.
At any rate, thank you Radu for the response. I will try this shortly.
At any rate, thank you Radu for the response. I will try this shortly.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service