Topics

Normalized DITA and keys #keys


Dawn.Bunting@...
 

I am running a dita to dita transform using the command on this page.  I am getting the conrefs resolved by not the keys.
The keys are defined in a separate map, that is included in the ditamap
Any ideas of what I am doing wrong or how I can get the keys to resolve as well? 
Thanks!

https://www.dita-ot.org/3.4/topics/dita2dita.html


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>dita to dita processing</title>
<mapref href="now-keys-common.ditamap"/>
<topicref href="release-notes/it-operations-management/service-mapping-rn.dita"/>
<topicref href="release-notes/it-operations....


Radu Coravu
 

Hi Dawn,

Maybe you can post a small DITA project exemplifying the problem.
I tried with something like:

<keydef keys="abc">
<topicmeta>
<keywords>
<keyword>def</keyword>
</keywords>
</topicmeta>
</keydef>
and a keyref in one of the topics:

<ph keyref="abc"/>
got expanded to something like in the normalized DITA output:

<ph keyref="abc">def</ph>

Regards,
Radu

Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

On 2/21/2020 9:33 PM, Dawn.Bunting@... wrote:
I am running a dita to dita transform using the command on this page.  I am getting the conrefs resolved by not the keys.
The keys are defined in a separate map, that is included in the ditamap
Any ideas of what I am doing wrong or how I can get the keys to resolve as well?
Thanks!
https://www.dita-ot.org/3.4/topics/dita2dita.html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE map PUBLIC "-//OASIS//DTD DITA Map//EN" "map.dtd">
<map>
<title>dita to dita processing</title>
<maprefhref="now-keys-common.ditamap"/>
<topicrefhref="release-notes/it-operations-management/service-mapping-rn.dita"/>
<topicrefhref="release-notes/it-operations....


Dawn.Bunting@...
 

Thanks Radu.  As always, you are correct.

I can see now that I was expecting the resolved topic to just have text in place, and not still contain the keyref element, because that is what the conrefs do., and so I did not note that the text had been put in. 

What I really want as an end is just text, but I see now that after I normalize the dita, ( using your example code)  I can just use LXML in a script to remove the <ph keyref="abc"> and the </ph> and I will be left with the simple text I am looking for.

Many thanks!