InsertFragment to map/topicref

Post here questions and problems related to editing and publishing DITA content.
akheiljain
Posts: 32
Joined: Wed Nov 28, 2018 8:13 pm

InsertFragment to map/topicref

Post by akheiljain »

I am trying to add a xml fragment to map/topicref when selected from Element selector. I have tried adding it to the Author Actions, but it doesn't get inserted. Any help is appreciated.
Activation XPath: oxy:allows-child-element("topicref")
Operation: ro.sync.ecss.extensions.commons.operations.InsertFragmentOperation
fragment: <topicmeta>My Topic Meta</topicMeta>

I think the "Insert Topic Reference Dialog" might be overwriting it, how can I insert my fragment?
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: InsertFragment to map/topicref

Post by Radu »

Hi,

What do you mean by "Element selector"?
Could you tell us exactly how you are inserting the topicref? Do you insert it from the DITA Maps Manager view or from the main editing area? What specific action are you using?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
akheiljain
Posts: 32
Joined: Wed Nov 28, 2018 8:13 pm

Re: InsertFragment to map/topicref

Post by akheiljain »

Hi Radu,
Selecting Windows | Show View | Elements opens a windows to select Elements to insert (this is what I had referred to as Element selector). I tried inserting topicref by double clicking it in that window. This adds <topicref></topicref> tags, and right clicking on the page icon that is inserted and selecting insert Topic Reference, opens a dialog Insert Topic Reference, which allows us to select a topic from Tridion Docs.

Thanks again for all your help.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: InsertFragment to map/topicref

Post by Radu »

Hi,

And what is your final goal? Double click in the Elements view on the "topicref" element and have the same dialog appear as when you click the toolbar button?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
akheiljain
Posts: 32
Joined: Wed Nov 28, 2018 8:13 pm

Re: InsertFragment to map/topicref

Post by akheiljain »

Hi Radu,
I would like to insertFragment when inserting topicrefs, currently we only get <topicref></topicref> when we add the element using element selector, I would like it to add <topicref><topicmeta><hwHeading></hwHeading></topicmeta></topicref>, where hwHeading is a specialized tag.
The insert Fragment doesn't work, please see earlier messages in this thread.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: InsertFragment to map/topicref

Post by Radu »

Hi,

In the Oxygen Preferences->"Document Type Associations" page you can extend the "DITA Map" framework configuration. In the extension you can create a new Author action which inserts that fragment of XML content, then mount this Author action to the content completion window or in the Elements view. Here's an older post where I explained something similar:

post51575.html#p51575

But this will not influence the toolbar action for inserting a topicref.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply