Custom inheritance of metadatas from maps to topics
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 98
- Joined: Tue Mar 06, 2018 2:07 pm
- Contact:
Custom inheritance of metadatas from maps to topics
Hi,
I would like, for HTML5 output, to change behavior of inheritance of metadatas from maps to topics.
It seems that is made in move-meta-entries implemented in java.
I don't know where and how can I modify this behavior?
Thanks for any help.
Regards,
Nicolas
I would like, for HTML5 output, to change behavior of inheritance of metadatas from maps to topics.
It seems that is made in move-meta-entries implemented in java.
I don't know where and how can I modify this behavior?
Thanks for any help.
Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
AmeXio
nicolas.delobel at amexiogroup.com
-
- Posts: 9438
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Custom inheritance of metadatas from maps to topics
Hi Nicolas,
I do not know much about how this works, I looked a little bit at how the "move-meta-entries" is defined in the build files:
and at the Java code for the MoveMetaModule:
https://github.com/dita-ot/dita-ot/blob ... odule.java
It seems to have two stages, one which pushes content from map to topics, and one which pulls content from topics to the map:
The second step "pullTopicMetadata" which takes metadata from topics and pushes it to maps seems to call the ${dita.plugin.org.dita.base.dir}/xsl/preprocess/mappull.xsl stylesheet so this would mean you have a chance to make changes in XSLT.
But the step which takes metadata from the map and pushes it to topics is Java based:
There is a "org.dita.dost.reader.MapMetaReader" which seems to create a map of element names which will later be pushed to each topic.
Regards,
Radu
I do not know much about how this works, I looked a little bit at how the "move-meta-entries" is defined in the build files:
Code: Select all
<target name="move-meta-entries"
dita:depends="{depend.preprocess.move-meta-entries.pre}"
dita:extension="depends org.dita.dost.platform.InsertDependsAction"
unless="preprocess.move-meta-entries.skip"
description="Move metadata entries">
<pipeline message="Move metadata entries." taskname="move-meta"
inputmap="${user.input.file}">
<module class="org.dita.dost.module.MoveMetaModule">
<param name="style" location="${dita.plugin.org.dita.base.dir}/xsl/preprocess/mappull.xsl"/>
<param name="conserve-memory" expression="${conserve-memory}" if:set="conserve-memory"/>
<dita:extension id="dita.preprocess.mappull.param" behavior="org.dita.dost.platform.InsertAction"/>
</module>
</pipeline>
</target>
https://github.com/dita-ot/dita-ot/blob ... odule.java
It seems to have two stages, one which pushes content from map to topics, and one which pulls content from topics to the map:
Code: Select all
pushMetadata(mapSet);
pullTopicMetadata(input, fis);
But the step which takes metadata from the map and pushes it to topics is Java based:
Code: Select all
final Map<URI, Map<String, Element>> mapSet = getMapMetadata(fis);
pushMetadata(mapSet);
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 98
- Joined: Tue Mar 06, 2018 2:07 pm
- Contact:
Re: Custom inheritance of metadatas from maps to topics
Hi Radu,
Thanks for these informations and for your help.
But I just saw that my expected behavior is now implemented in DITA OT 3.5: https://www.dita-ot.org/3.5/release-notes/.
Thanks for these informations and for your help.
But I just saw that my expected behavior is now implemented in DITA OT 3.5: https://www.dita-ot.org/3.5/release-notes/.
The DITA 1.x specification defines cascade behaviors for maps such that <othermeta> and <source> do not cascade to child <topicref> elements. In earlier releases the mappull stage of processing pushed these to nested elements; that behavior is now corrected to match the specification.
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
AmeXio
nicolas.delobel at amexiogroup.com
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