Correct Behaviour of @locktitle in Output

Post here questions and problems related to editing and publishing DITA content.
Eddie
Posts: 106
Joined: Wed Dec 18, 2013 3:07 am

Correct Behaviour of @locktitle in Output

Post by Eddie »

Hello,
Using Author 17.0. I'm trying to work out how @locktitle should behave, but the differences in behaviour are confusing and the documentation I can find doesn't seem to help. Apologies for the long question.

With the following bookmap section:

Code: Select all

        <chapter href="topics/c-testee-tuto-3.dita" type="concept" locktitle="yes">
<topicref href="topics/c-testee-tuto-3-1.dita">
<topicmeta>
<navtitle>The First Navtitle Title</navtitle>
</topicmeta>
</topicref>
<topicref href="topics/t-sesame-tr-fileget.dita" type="task">
<topicmeta>
<navtitle>The Second Navtitle Title</navtitle>
</topicmeta>
</topicref>
The navtitles do not show in map manager and, in output using oXygen, they show in xhtml, but not in pdf. My question is, is this the correct behaviour?
My confusion is added to because we have an inhouse output tool which shows the navtitles in both xhtml and pdf when using the above code. The DITA 1.2 spec says
the title is locked when the closest ancestor topicref element sets or inherits the attribute locktitle="yes"
and I take this to mean that, with the above code, the navtitle should be used. Am I missing something? I found a discussion online (https://lists.oasis-open.org/archives/d ... 00010.html) which said
the
TC has made clear in the past that this attribute should *not* inherit
Incidentally, if I change the above code to the following:

Code: Select all

        <chapter href="topics/c-testee-tuto-3.dita" type="concept">
<topicref href="topics/c-testee-tuto-3-1.dita" locktitle="yes">
<topicmeta>
<navtitle>The First Navtitle Title</navtitle>
</topicmeta>
</topicref>
<topicref href="topics/t-sesame-tr-fileget.dita" type="task">
<topicmeta>
<navtitle>The Second Navtitle Title</navtitle>
</topicmeta>
</topicref>
The output appears as I would expect in the map manager and both xhtml and pdf (the first navtitle is shown, the second is not).
radu_pisoi
Posts: 404
Joined: Thu Aug 21, 2003 11:36 am
Location: Craiova
Contact:

Re: Correct Behaviour of @locktitle in Output

Post by radu_pisoi »

Hi,

The specification for the locktile attribute it's a bit confusing for me. To explain why, I will copy some fragments from DITA 1.2 specification.

navtitle element
When navtitle is used in a map, it functions in the same way as the navtitle attribute; both are used to specify a
navigation title for the target of the <topicref> element. That is, the title itself will only be used as an actual
navigation title when the title is locked; the title is locked when the closest ancestor topicref element sets or
inherits the attribute locktitle="yes".
it says that the locktitle attribute is inheritable.

Also in the section Metadata in maps and topics, you can find the next phrase.
The content of the <navtitle> element is used as a navigation title only if the @locktitle attribute of the parent <topicref> element is set to "yes".
which doesn't tell anything about inheritance. So, according to it, the navtitle element is used only if the @locktitle attribute of the parent <topicref> element is set to "yes".

Now reading the DITA 1.3 specification, Attributes common to many map elements
@locktitle
If the @locktitle attribute is set to "yes", the content of the <navtitle> element or @navtitle attribute is used for a navigation title, if it is present. If the @locktitle attribute is not present or set to "no", the content of the <navtitle> element or @navtitle attribute is ignored, and the title of the referenced topic is used as a navigation title.
there is nothing about inheritance.

But, if you read the documentation for other attributes that are inheritable you can notice that the specification contains the next phrase:
If the value is not specified locally, the value may cascade from another element in the map (for cascade rules, see Cascading of metadata attributes in a DITA map).
So, I suppose that the locktitle attribute is not inheritable because its documentation does not include the above phrase.

Regarding to the difference between the PDF and HTML transformations I have added an issue to the DITA-OT project, see Different behaviour when using locktitle attribute for PDF and XHTML transformations.
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Eddie
Posts: 106
Joined: Wed Dec 18, 2013 3:07 am

Re: Correct Behaviour of @locktitle in Output

Post by Eddie »

Thanks for the reply.
It's good to know I'm not the only one who was confused.

Eddie.
Post Reply