The new added element for taskbody

lhsihan
Posts: 24
Joined: Thu Aug 15, 2019 5:31 pm

The new added element for taskbody

Post by lhsihan » Tue Aug 20, 2019 10:37 am

We are doing investigation with Oxygen XML Author and would like to adopt it as our daily writing tools. We have some custom requirements such like add one element "limitation" to taskbody which is the same level with steps.

I have modified the DTD files
1. Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\strictTaskbodyConstraint.mod
2. Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\task.mod

added some "limitation" declaritions.

But when doing DITA writing, there are questions for this new added element:
1. Why the generated context "Self defined limitation" is not bold?
2. Why there is one arrow icon before the "limitation" element in Author writing mode?
QQ截图20190821060606.png
QQ截图20190821060606.png (2.54 KiB) Viewed 162 times
3. Is "dita-ot-3.3.3\plugins\org.oasis-open.dita.v1_3" or "dita-ot-3.3.3\plugins\org.oasis-open.dita.v1_2" used by Oxygen? How can we know it?

Thanks a lot!
Last edited by lhsihan on Wed Aug 21, 2019 1:05 am, edited 1 time in total.

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

Re: The new added element for taskbody

Post by Radu » Tue Aug 20, 2019 11:38 am

Hi,

Please see some remarks below:
I have modified the DTD files
1. Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\strictTaskbodyConstraint.mod
2. Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins\org.oasis-open.dita.v1_3\dtd\technicalContent\dtd\task.mod
added some "limitation" declaritions.
The correct way to specialize DITA is by creating a separate plugin which adds the specialization DTDs with specific specialization public IDs and thus avoids modifying directly the DTDs which are part of the DITA standard.

http://dita4practitioners.github.io/dit ... tutorials/
https://www.oxygenxml.com/doc/versions/ ... ation.html
1. Why the generated context "Self defined limitation" is not bold?
Are you referring to Oxygen's visual Author editing mode or to the published output?
Oxygen's visual editing is CSS based. There is a CSS Inspector side view which can be used similarly to a web browser CSS debugger tool to see what CSS rules are used for rendering a particular DITA element:

https://www.oxygenxml.com/doc/versions/ ... -view.html

You can add your own CSS used for editing to the DITA framework configuration:

https://blog.oxygenxml.com/2016/10/cust ... iting.html
2. Why there is one arrow icon before the "limitation" element in Author writing mode?
Again, you can find this out using the CSS inspector view. It depends probably on the @class attribute value you have set of the custom element.
3. Is "dita-ot-3.3.3\plugins\org.oasis-open.dita.v1_3" or "dita-ot-3.3.3\plugins\org.oasis-open.dita.v1_2" used by Oxygen? How can we know it?
It depends on the public ID defined in the DITA topics, by default the public ID -//OASIS//DTD DITA Topic//EN is mapped through the DITA XML catalogs to the DITA 1.3 DTDs. But a DTD public ID like this -//OASIS//DTD DITA 1.2 Topic//EN would be mapped to the DITA 1.2 DTDs.
If you open a DITA topic in Oxygen there should be a toolbar button called Open associated schema. If you want more precise localization you can open the DITA topic, switch to the Text editing mode, right click inside an XML element and choose Go to definition.

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

lhsihan
Posts: 24
Joined: Thu Aug 15, 2019 5:31 pm

Re: The new added element for taskbody

Post by lhsihan » Fri Aug 23, 2019 1:21 am

Thanks a lot Radu.
I have did the following parts:
1. followed the steps listed in http://dita4practitioners.github.io/dit ... shell.html to create one DTD Task Type shell and put the plugin under Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\plugins\com.example.doctype.userdefine.

2. and package the shells as toolkit plugin following http://dita4practitioners.github.io/dit ... l#topic-id.

But when running "ant -f integrator.xml" I have met the following error:

Code: Select all

C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\bin>ant -f "C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\integrator.xml"
Buildfile: C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\integrator.xml

integrate:
[integrate] Recoverable error
[integrate]   java.io.FileNotFoundException: C:\Program Files\Oxygen XML Editor
[integrate]   21\frameworks\dita\DITA-OT3.x\config\plugins.xml (请求的操作无法在使用用户映射区域打开的文件上执行。)

BUILD FAILED
C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\integrator.xml:45: Integration failed: java.io.FileNotFoundException: C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\config\plugins.xml (请求的操作无法在 使用用户映射区域打开的文件上执行。)

Total time: 9 seconds

Could you please help check why the ant build failed? Thanks a lot. PS: the doctype is attached.
com.example.doctype.userdefine.zip
(8.81 KiB) Downloaded 10 times

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

Re: The new added element for taskbody

Post by Radu » Fri Aug 23, 2019 9:02 am

Hi,

At first glance your plugin looks good.
Because Oxygen is installed in the "Program Files" folder the Windows operating system does not allow user started processes to make changes to files in the folder.
Couple of things you could do:
- Right click in Windows Explorer on the "C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\" folder and give the current user permissions for full write access on it.
- Copy the entire folder "C:\Program Files\Oxygen XML Editor 21\frameworks\dita\DITA-OT3.x\" somewhere on your local disk where there is full write access (for example in your user home folder). Then in the Oxygen Preferences->DITA page set this custom copy of the DITA OT 3.x to be the default used DITA OT.

Also instead of "ant -f integrator.xml" you should invoke instead:

Code: Select all

...DITA-OT3.x\bin>dita -install
which is the new way of doing things (as the tutorial you are following is quite old):

https://www.dita-ot.org/dev/parameters/ ... ments.html

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

Post Reply