Populating <bookmap> element attributes on cover page.
Posted: Wed Jun 27, 2018 4:52 pm
Hello Oxygen Team/Users
We are migrating our structured authoring solution from XMetaL/TopLeaf to Oxygen/DITA Map PDF - based on DITA & CSS (WYSIWYG).
In my custom CSS, I am attempting to display the following on the cover page of our Release Notes:
Issue Date: [today's date] <-- The document issue date
UAT Date: [bookmap attribute "rev"] <-- The release install to UAT date
Production Date: [bookmap attribute "otherprops"] <-- The release production date
[bookmap attribute "type] <-- The security level internal/confidential/public
I have been able to get the issue date formatting using an xpath expression, but I am scratching my head on how to pull in the attribute values (which are dates, manually set on all of of publications dating back years) and security level. Any suggestions on a good way to approach this?
With regards,
Paul Hillier
We are migrating our structured authoring solution from XMetaL/TopLeaf to Oxygen/DITA Map PDF - based on DITA & CSS (WYSIWYG).
In my custom CSS, I am attempting to display the following on the cover page of our Release Notes:
Issue Date: [today's date] <-- The document issue date
UAT Date: [bookmap attribute "rev"] <-- The release install to UAT date
Production Date: [bookmap attribute "otherprops"] <-- The release production date
[bookmap attribute "type] <-- The security level internal/confidential/public
I have been able to get the issue date formatting using an xpath expression, but I am scratching my head on how to pull in the attribute values (which are dates, manually set on all of of publications dating back years) and security level. Any suggestions on a good way to approach this?
With regards,
Paul Hillier
Code: Select all
/* Cover Page */
@media print {
*[class~="front-page/front-page"] {
page: front-page;
}
*[class~="front-page/front-page-title"] {
display:inline;
text-align:left;
margin-top:5in;
font-size:2.5em;
font-family:Segoe UI, helvetica, sans-serif;
color:#00386b;
font-weight:normal;
}
*[class~="bookmap/booktitle"] {
display: inline;
text-align: left;
font-family:Segoe UI, helvetica, sans-serif;
padding-bottom: 1em;
font-weight:normal;
}
*[class~="bookmap/booktitlealt"] {
display: inline;
text-align: left;
padding-bottom: 2.5in;
font-style:normal;
font-weight:normal;
font-family:Segoe UI, helvetica, sans-serif;
color:#6aade4;
}
*[class ~= "bookmap/booktitle"]:after {
display:block;
font-size:0.5em;
content: none;
text-align: right;
padding-bottom: 2.21in;
}
*[class ~= "bookmap/booktitle"]:after(2) {
display:block;
font-size:0.5em;
content: "Issue Date: " oxy_xpath("format-date(current-date(), '[D01] [MNn] [Y0001]')");
text-align: right;
color: gray;
}
*[class ~= "bookmap/booktitle"]:after(3) {
display:block;
font-size:0.5em;
content: "UAT Date: " "[bookmap " attr(rev) "]";
text-align: right;
color: gray;
}
*[class ~= "bookmap/booktitle"]:after(4) {
display:block;
font-size:0.5em;
content: "Production Date: TBD";
text-align: right;
color: gray;
}
*[class ~= "bookmap/booktitle"]:after(5) {
display:block;
font-size:0.75em;
content: "TBD";
text-align: right;
text-transform: uppercase;
padding-top: 0.25em;
color: gray;
}
@page front-page {
@top-left-corner { content:url("sidebar.png") -0.5in}
@top-left { content:none }
@top-center { content:none }
@top-right { content:url("IFDSBLUE2.JPG"); ; padding-top:0.825in}
@top-right-corner { content:none }
@bottom-left-corner { content:none }
@bottom-left { content:none }
@bottom-center { content:none }
@bottom-right { content:none }
@bottom-right-corner{ content:none }
}
}