topichead and metadata inheritance
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 4
- Joined: Fri Mar 04, 2022 11:23 am
topichead and metadata inheritance
Hi,
I am trying to figure out how the <topichead> element works exactly in DITA. As I understand it, it is meant to create a heading and to "articificially" group up <topicref> elements together so as when the DITA map is rendered as a TOC, it creates a hierarchy and new TOC entry. Specifically, I would like to know if a <topichead> can inherit metadata from the parent root map ? And specifically an <othermeta> element declared in the root map.
My usecase is this one : I would like topics nested inside a <topichead> element to inherit from any <othermeta> element placed on the root map. Currently, I am successful in making <othermeta> cascade down to topics if the <topicref> are declared directly inside the main map or a submap. However, when nesting <topicref> inside a <topichead> (to create hierarchy for instance), this seems to prevent <othermeta> inheritance to the child topics. Neither <topichead> or the nested topics have that element when rendering with DITA OT.
I am using DITA spec 1.3 with DITA OT 2.3.3, for reference.
Thank you in advance for any help you'll be able to provide !
Best,
I am trying to figure out how the <topichead> element works exactly in DITA. As I understand it, it is meant to create a heading and to "articificially" group up <topicref> elements together so as when the DITA map is rendered as a TOC, it creates a hierarchy and new TOC entry. Specifically, I would like to know if a <topichead> can inherit metadata from the parent root map ? And specifically an <othermeta> element declared in the root map.
My usecase is this one : I would like topics nested inside a <topichead> element to inherit from any <othermeta> element placed on the root map. Currently, I am successful in making <othermeta> cascade down to topics if the <topicref> are declared directly inside the main map or a submap. However, when nesting <topicref> inside a <topichead> (to create hierarchy for instance), this seems to prevent <othermeta> inheritance to the child topics. Neither <topichead> or the nested topics have that element when rendering with DITA OT.
I am using DITA spec 1.3 with DITA OT 2.3.3, for reference.
Thank you in advance for any help you'll be able to provide !
Best,
-
- Posts: 9424
- Joined: Fri Jul 09, 2004 5:18 pm
Re: topichead and metadata inheritance
Hi,
The topichead is usually useful to create titled sections in the documentation, it resembles a topicref but without a reference to a topic.
According to the DITA 1.3 specification:
https://www.oxygenxml.com/dita/1.3/spec ... adata.html
the <othermeta> element never cascades to child topicref elements.
You are using a very old DITA OT publishing engine, released about 6 years ago and no longer maintained in any way.
Older DITA OT publishing engines (like yours) would in general cascade <othermeta> from the map to the topics, but in newer DITA OT versions (the current version is 3.7) at some point this cascading for <othermeta> was inhibited completely as this is how it was defined in the DITA 1.3 specification.
Regards,
Radu
The topichead is usually useful to create titled sections in the documentation, it resembles a topicref but without a reference to a topic.
According to the DITA 1.3 specification:
https://www.oxygenxml.com/dita/1.3/spec ... adata.html
the <othermeta> element never cascades to child topicref elements.
You are using a very old DITA OT publishing engine, released about 6 years ago and no longer maintained in any way.
Older DITA OT publishing engines (like yours) would in general cascade <othermeta> from the map to the topics, but in newer DITA OT versions (the current version is 3.7) at some point this cascading for <othermeta> was inhibited completely as this is how it was defined in the DITA 1.3 specification.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Fri Mar 04, 2022 11:23 am
Re: topichead and metadata inheritance
Hi Radu,
Thank you for your answer. I am aware that according to the DITA 1.3 spec <othermeta> element never cascades.
I also know the DITA OT team corrected the incorrect behavior in 3.5 (https://www.dita-ot.org/3.5/release-not ... v3.5__bugs)
The thing is, the DITA OT archive is actually the one of a customer, which relies on <othermeta> inheritance for specific usecase and needs this inheritance to happen.
So, in short, is there a way for a <topichead> element to inherit metadata (not only othermeta) ? According to this table :
https://docs.oasis-open.org/dita/dita/v ... adata.html
Some metadata are allowed to cascade down. Do the ones listed in the table as "cascade to child <topicref> elements? yes" can actually cascade into topicrefs nested into a topichead element ?
Thank you for your answer. I am aware that according to the DITA 1.3 spec <othermeta> element never cascades.
I also know the DITA OT team corrected the incorrect behavior in 3.5 (https://www.dita-ot.org/3.5/release-not ... v3.5__bugs)
The thing is, the DITA OT archive is actually the one of a customer, which relies on <othermeta> inheritance for specific usecase and needs this inheritance to happen.
So, in short, is there a way for a <topichead> element to inherit metadata (not only othermeta) ? According to this table :
https://docs.oasis-open.org/dita/dita/v ... adata.html
Some metadata are allowed to cascade down. Do the ones listed in the table as "cascade to child <topicref> elements? yes" can actually cascade into topicrefs nested into a topichead element ?
Last edited by Gahr on Fri Mar 04, 2022 12:34 pm, edited 1 time in total.
-
- Posts: 9424
- Joined: Fri Jul 09, 2004 5:18 pm
Re: topichead and metadata inheritance
Hi,
I do not think this can be done in another way, the changes to inhibit othermeta propagation were done in the Java code so I suspect they cannot be inhibited by a DITA OT plugin.
Regards,
Radu
I understand, it's just they need a feature which is not covered in the specification. For example if I were to try adding support for cascading othermeta from the map to the topics with DITA OT 3.7 I would probably take the DITA OT Java code which is freely available and change it to revert the changes in the issue: https://github.com/dita-ot/dita-ot/pull/3326.The thing is, the DITA OT archive is actually the one of a customer, which relies on <othermeta> inheritance for specific usecase and needs this inheritance to happen.
I do not think this can be done in another way, the changes to inhibit othermeta propagation were done in the Java code so I suspect they cannot be inhibited by a DITA OT plugin.
Yes, they should, but I'm not using DITA OT 2.x. But you can test this on your side, take a DITA Map with such a structure and one or two topics, publish it to XHTML, set the "clean.temp" parameter to "no", after publishing look in the transformation temporary files folder at the content of the processed topics and see if they contain the metadata passed from the DITA Map side.Some metadata are allowed to cascade down. Do the ones listed in the table as "cascade to child <topicref> elements? yes" can actually cascade into topicrefs nested into a topichead element ?
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Fri Mar 04, 2022 11:23 am
Re: topichead and metadata inheritance
Thank you Radu, your anwser was very helpful.
I performed the test as you suggested and yes, the nested topics inherit from the metadata.
The last "pain" point is that it doesn't seem the <topichead> element can have metadata attached to it by itself, or am I incorrect ? I do not even see the topichead element inside the temporary transformation folder. The lack of metadata on the topichead element is an issue in the context of my client.
Kind regards,
I performed the test as you suggested and yes, the nested topics inherit from the metadata.
The last "pain" point is that it doesn't seem the <topichead> element can have metadata attached to it by itself, or am I incorrect ? I do not even see the topichead element inside the temporary transformation folder. The lack of metadata on the topichead element is an issue in the context of my client.
Kind regards,
Last edited by Gahr on Fri Mar 04, 2022 1:05 pm, edited 1 time in total.
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