Custom OT Error Messages

Post here questions and problems related to editing and publishing DITA content.
sevforeman
Posts: 6
Joined: Fri Apr 30, 2010 5:33 pm

Custom OT Error Messages

Post by sevforeman »

I have created some DITA OT .xsl overrides that include custom error messages in them. One might look like this:
[java] [ERROR] LARGE INLINE IMAGE - An image with a height of 674 pixels has been set as an inline image. The image will be scaled down to 16px to fit on a single line. (topic: CI Best Practices Product Feed Verifying the Category Hierarchy, image:..\Images\CI\image26.png)

However, when the a transformation completes, Oxygen does not open up an extra tab to display the errors like it does for the standard OT error messages. Is there a way for my error messages to trigger that action?

Best regards,
Severin Foreman
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom OT Error Messages

Post by Radu »

Hi Severin,

When detecting which problems from the DITA OT console output to present in a separate errors list, Oxygen looks in the output lines for patterns like:

[DOT...][ERROR]

The severity part can be ERROR or INFO or WARN.

So in your case you could probably output something like:

Code: Select all

[DOT_CUSTOM][ERROR]LARGE INLINE IMAGE - An image with a height of 674 pixels has been set as an inline image. The image will be scaled down to 16px to fit on a single line. (topic: CI Best Practices Product Feed Verifying the Category Hierarchy, image:..\Images\CI\image26.png)
We never considered that this detection that we make would be useful for custom error messages but this is an interesting usecase.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
sevforeman
Posts: 6
Joined: Fri Apr 30, 2010 5:33 pm

Re: Custom OT Error Messages

Post by sevforeman »

Thank you, Radu. Before I saw your post, I followed the steps on at this page, which worked perfectly.
http://dita-ot.sourceforge.net/1.5.4/de ... sages.html
I guess the only I was missing was [DOT...].
Regards,
Severin
jonas
Posts: 6
Joined: Wed Jan 21, 2015 12:29 pm

Re: Custom OT Error Messages

Post by jonas »

Hi Radu,

I have added some custom error messages to our DITA framework. The error messages are listed in the "Transformation problems" panel. So, everything works fine.

But one question on this: Is there a way to change the URL for the additional information?
It is now: "http://www.oxygenxml.com/DITA-messages. ... custom-001". I would like to link to an html page in our intranet.

Best regards,
Jonas
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom OT Error Messages

Post by Radu »

Hi Jonas,

When you click the book-like icon in the problems list Oxygen should ask the catalog to find a mapping for the URL before connecting to it.

So you could try to create an XML catalog with content like:

Code: Select all

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<uri name="http://www.oxygenxml.com/DITA-messages.html#msgs__DOT-mycustom-001" uri="http://www.google.com"/>
.....
</catalog>
and add it to Oxygen's catalogs list from the XML / XML Catalog preferences page or even refer to it from the DITA OT catalog-dita.xml, I think your custom DITA OT plugin could also contribute those extra mappings to the catalog-dita.xml when it gets integrated.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
jonas
Posts: 6
Joined: Wed Jan 21, 2015 12:29 pm

Re: Custom OT Error Messages

Post by jonas »

Hi Radu,

thank you. That redirect works and I can open an intranet page by clicking the book icon.

Of course, the URL is still "http://www.oxygenxml.com/DITA-messages. ... custom-001" when I mouse-over the book icon or when oXygen shows the message details in a dialog.

I guess I cannot manipulate the process when oXygen creates the error list based on the DITA OT console output?

Best regards,
Jonas
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom OT Error Messages

Post by Radu »

Hi Jonas,
Of course, the URL is still "http://www.oxygenxml.com/DITA-messages. ... custom-001" when I mouse-over the book icon or when oXygen shows the message details in a dialog.
I noticed the same thing when testing if this worked for you, I added an issue to try and improve on this behavior.
I guess I cannot manipulate the process when oXygen creates the error list based on the DITA OT console output?
We do not have extension API for this, we just take the message error code and add it to an URL which indirects through the Oxygen server to the DITA OT 1.8 documentation specs. But if we work a little on properly showing the catalog resolved URL in our GUI, I think the XML catalog would be the easiest solution for somebody wanting to follow more error codes.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Custom OT Error Messages

Post by Radu »

Hi,

Just to update the thread, this:

Of course, the URL is still "http://www.oxygenxml.com/DITA-messages. ... custom-001" when I mouse-over the book icon or when oXygen shows the message details in a dialog.
should be already fixed in Oxygen 17.0.

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