Page 1 of 1
Apply template to existing topic
Posted: Mon Jul 31, 2023 9:17 pm
by JulieP
Hello. Is there a way to apply a template to an existing topic?
Re: Apply template to existing topic
Posted: Tue Aug 01, 2023 12:30 pm
by alex_jitianu
Hi,
First, let's be sure that I understand the requirement. You have a new document topic that imposes a certain structure and an already existing topic that doesn't respect this structure. You want to refactor the existing topic to respect the template structure? Is this the use case? If not, please give me more details.
Best regards,
Alex
Re: Apply template to existing topic
Posted: Thu Aug 03, 2023 6:20 pm
by JulieP
HI Alex! Yes, that is the use case. For example, the new template would have metadata and sections with specific titles that the existing topic should have.
Re: Apply template to existing topic
Posted: Fri Aug 04, 2023 1:43 pm
by alex_jitianu
Hi,
In theory it could be done wither though a custom XML refactoring action or through a prompt in our AI Positron add-on. To decide which path is more feasible, could you send us some sample files on
support@oxygenxml.com? After we make the analysis I will remove the files from my system. You can also use the action
Help->Support tools->Randomize XML text content before sending the files if they contain sensitive information.
Re: Apply template to existing topic
Posted: Fri Aug 11, 2023 2:39 pm
by chrispitude
Hi JulieP,
If you want to insert metadata into an existing topic that might or might not have it, the following Oxygen XML Blog post might be useful:
Inserting and Reformatting Content in Refactoring Operations
We used it for exactly that purpose. Some topics had a
<prolog> and some did not. We needed a reliable way to create or reuse metadata structures as needed, while respecting DITA content models.
If you are talking about content restructuring, that would probably require some other approach, such as the ones Alex suggested.