create a DITA "topic" from command line

Post here questions and problems related to oXygen frameworks/document types.
vishwavaranasi
Posts: 37
Joined: Fri Feb 28, 2020 4:02 pm

create a DITA "topic" from command line

Post by vishwavaranasi » Tue Aug 18, 2020 11:09 am

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
Thanks,
vishwa

Radu
Posts: 7434
Joined: Fri Jul 09, 2004 5:18 pm

Re: create a DITA "topic" from command line

Post by Radu » Tue Aug 18, 2020 12:06 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

vishwavaranasi
Posts: 37
Joined: Fri Feb 28, 2020 4:02 pm

Re: create a DITA "topic" from command line

Post by vishwavaranasi » Tue Aug 18, 2020 12:57 pm

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
Thanks,
vishwa

Radu
Posts: 7434
Joined: Fri Jul 09, 2004 5:18 pm

Re: create a DITA "topic" from command line

Post by Radu » Tue Aug 18, 2020 2:26 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Post Reply