Page 1 of 1

create a DITA "topic" from command line

Posted: Tue Aug 18, 2020 11:09 am
by vishwavaranasi
Hello Team , I want to create a DITA "topic" from command line or from java , instead from Editor File -> New , is there any way to create like this?

Thanks,
vishwa

Re: create a DITA "topic" from command line

Posted: Tue Aug 18, 2020 12:06 pm
by Radu
Hi,

This question does not seem related to Oxygen XML Editor. Maybe from Java code or from a command line you can create a file on disk and save some XML content inside it.

Regards,
Radu

Re: create a DITA "topic" from command line

Posted: Tue Aug 18, 2020 12:57 pm
by vishwavaranasi
Thanks Radu for your reply.

I have tried copying our custom topic template xml to create a new topic and saved
but our topic template uses custom variable
customtoipcID
to create a unique topic id for a newly created topic

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//xxxx//DTD xxx DITA Topic//EN" "xxxtopic.dtd">
<topic id="${customtoipcID}">
<title></title>
<body></body>
</topic>

the new file with copied xml is giving error
Attribute value "${customtoipcID}" of type ID must be an NCName when namespaces are enabled.
when we create using File new - and topic template - the uniqueID will create automatically
where as in the case of manually it is giving error.

Thanks,
vishwa

Re: create a DITA "topic" from command line

Posted: Tue Aug 18, 2020 2:26 pm
by Radu
Hi,

Yes, when you use Oxygen's File->New dialog and choose a new file template, all Oxygen editor variables from inside the file will be automatically expanded by Oxygen before opening the file contents.

Regards,
Radu