Page 1 of 1

Customerize Oxygen XML author

Posted: Thu Aug 15, 2019 6:05 pm
by lhsihan
Hi experts,
We are tring XML author and want to adopt it in our daily work. I have three questions for XML author:

1. How can we use own DTD/XSD when doing DITA writing? Such like we want to add some sections such like "limitations" to task body with the same level of steps、postreq、prereq. How can we do that?

2. There are some Hints when doing DITA writing with XML author using author mode such like "before you begin" 、''short descriptions". Can we change it to Chinese characters? If yes, how can we do that?
QQ截图20190815225017.png
QQ截图20190815225017.png (4.12 KiB) Viewed 776 times
3. how can I change the default icon for warning, caution and etc when publishing dita files as HTML5 ?

Thanks a lot for this.

Re: Customerize Oxygen XML author

Posted: Fri Aug 16, 2019 12:21 pm
by Radu
Hi,

Please see some answers below:
1. How can we use own DTD/XSD when doing DITA writing? Such like we want to add some sections such like "limitations" to task body with the same level of steps、postreq、prereq. How can we do that?
There is a topic in the Oxygen user's manual about using a custom DITA DTD or XSD:

https://www.oxygenxml.com/doc/versions/ ... ation.html

besides this, as an alternative Oxygen also has various application-specific layers which can restrict the elements allowed to be inserted in a parent element:

https://www.oxygenxml.com/doc/versions/ ... ually.html
There are some Hints when doing DITA writing with XML author using author mode such like "before you begin" 、''short descriptions". Can we change it to Chinese characters? If yes, how can we do that?
Oxygen's visual editing mode is CSS based. In this case we translate out of the box the strings in English, German and French.
For example this CSS holds the English translations that you are seeing:

OXYGEN_INSTALL_DIR\frameworks\dita\css\core\-i18n-en.css

and this CSS holds the equivalent German translations having the ":lang(de)" added to all CSS selectors so that the German translation is applied when you have the xml:lang="de-DE" attribute set in the DITA topic.

So you would need to duplicate the "-i18n-en.css" to a "-i18n-zh.css" and translate all (or a part of) those static texts to Chinese adding also the ":lang(zh)" part to all selectors.
Then in the OXYGEN_INSTALL_DIR\frameworks\dita\css\core\-i18n.css add a reference to the new "-i18n-zh.css".
Or to avoid making changes directly in the OXYGEN_INSTALL_DIR\frameworks\dita\css\core\ folder you can keep your custom CSS outside of Oxygen:

https://blog.oxygenxml.com/2016/10/cust ... iting.html

If you want to share with us the "-i18n-zh.css" we can consider shipping it in a future Oxygen version by default.

how can I change the default icon for w ... as HTML5 ?
3. how can I change the default icon for warning, caution and etc when publishing dita files as HTML5 ?
You can add a note with a certain @type in a DITA topic and look at the generated HTML content, maybe open it in a web browser and see with the CSS inspector what rules are applied to it. Then if you edit the transformation scenario used in Oxygen for publishing there is a parameter called "args.css" which can point to your own CSS which can add static content before the element. There is also a parameter called "args.copy.css" which can be set to "yes" to always copy your CSS file to the output folder.

Regards,
Radu