how to add product release information in PDF cover page

Post here questions and problems related to editing and publishing DITA content.
lisazeng
Posts: 29
Joined: Tue Jun 27, 2017 2:10 pm

how to add product release information in PDF cover page

Post by lisazeng »

Hi Expert,

In oxygen, i set the release inforamtion in the ditamap, like below

Code: Select all


<map title="Lisa Guide" product="Lisa test" otherprops="DN1234567">
<title>Goodix MCU SDK Developer Guide</title>
<topicmeta>
<prodinfo>
<prodname>@product.name@</prodname>
<vrmlist>
<vrm version="3" release="1.1"/>
</vrmlist>
<brand>@company.name@</brand>
<component>@product.component@</component>
</prodinfo>
</topicmeta>
if I want to get the otherprops value, i can use

Code: Select all


							<xsl:value-of select="//*[contains(@class, ' map/map ')]/@otherprops"/>.
How can I get the version value?
I used

Code: Select all

<xsl:value-of select="$map/*[contains(@class,' topic/vrm ')]/@version" />
, and my version is 3, it prints a lot of 3 in my pdf.

Thanks!

Lisa
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: how to add product release information in PDF cover page

Post by Radu »

Hi Lisa,

You can try this:

Code: Select all

<xsl:value-of select="($map/*[contains(@class,' topic/vrm ')]/@version)[1]" />
to match only the first version attribute from the merged DITA Map.
To understand more precisely on what content your XPath will match, you can output an xsl:message like:

Code: Select all

<xsl:message>Merged map: <xsl:copy-of select="$map"/></xsl:message>
.

If in the Oxygen Preferences->"DITA" page you choose to always show the console output, after publishing the "DITA OT" console view at the bottom of Oxygen should also show your xsl:messages.
So you can use xsl:messages to debug what you are doing.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
lisazeng
Posts: 29
Joined: Tue Jun 27, 2017 2:10 pm

Re: how to add product release information in PDF cover page

Post by lisazeng »

Hi Radu,


The following code has no output in the pdf,but the array index helps me.

Code: Select all


<xsl:value-of select="($map/*[contains(@class,' topic/vrm ')]/@version)[1]" />
I changes a bit. so below code, works.

Code: Select all


<xsl:value-of select="(//*[contains(@class,' topic/vrm ')]/@version)[1]"/>
Thanks very much!!

Lisa
Post Reply