How to handle FrameMaker variables in header and footer while migrating to DITA
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 1
- Joined: Wed Feb 09, 2022 2:55 pm
How to handle FrameMaker variables in header and footer while migrating to DITA
My current unstructured FrameMaker documents contain variables (both user and system type) in the header and footer. I need to migrate my document into DITA format. While doing so I am struggling to handle these variables. Since DITA does not support the insertion of any element in page header and footer, I am not able to use the DITAVAL feature also in header and footer.
Is this achievable in Oxygen XML interface. If yes, please suggest a work around to have these variable in the DITA interface and also obtain the same during PDF generation.
Is this achievable in Oxygen XML interface. If yes, please suggest a work around to have these variable in the DITA interface and also obtain the same during PDF generation.
image.png
image.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: How to handle FrameMaker variables in header and footer while migrating to DITA
Post by chrispitude »
If you are using PDF Chemistry, you can do this in two steps.
First, create a map-level metaentry that "instantiates" (uses) your variable. For example,
This metadata definition causes the variable value to propagate into the final merged HTML that PDF Chemistry uses for PDF publishing:
Then in in your CSS, define a header or footer that references that propagated value using an XPath:
(The reason for the string-join() is that if your key definition value has element structure inside it, you want to collapse everything down to plaintext.)
You can also use profiling conditions inside the variable definition as needed, and those will be reflected in the header/footer.
I am attaching a .zip file with an example Oxygen project that does this; just run the "PDF With Variable in Header" transformation defined in the project.
Testcase:
First, create a map-level metaentry that "instantiates" (uses) your variable. For example,
Code: Select all
<map>
<title>My Map</title>
<topicmeta>
<data keyref="Product"/>
</topicmeta>
<keydef keys="Product">
<topicmeta>
<keywords>
<keyword>Put Product Name Here</keyword>
</keywords>
</topicmeta>
</keydef>
Code: Select all
<div keyref="Product" class="- topic/data data - topic/data data">
<div class="- topic/keyword keyword - topic/keyword keyword">Put Product Name Here</div>
</div>
Code: Select all
@page {
@top-left {
content: "User Guide for " oxy_xpath('string-join((//div[@keyref = "Product"])[1])');
}
}
You can also use profiling conditions inside the variable definition as needed, and those will be reflected in the header/footer.
I am attaching a .zip file with an example Oxygen project that does this; just run the "PDF With Variable in Header" transformation defined in the project.
Testcase:
pdf_chemistry_variable_in_header.zip
You do not have the required permissions to view the files attached to this post.
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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