custom error msg for XSD assert

Having trouble installing Oxygen? Got a bug to report? Post it all here.
vlindhol
Posts: 2
Joined: Tue Mar 31, 2015 9:22 am

custom error msg for XSD assert

Post by vlindhol »

(I debated with myself whether to post here or in the XML Schema forum, but since this seems to be a nonstandard, Oxygen-specific feature I put it here.)

I'm trying to produce an easier to read error message for an XSD assertion that I have in place for an XML schema of mine. I found in the Oxygen manual that this is possible using a validator-specific feature (http://www.oxygenxml.com/doc/ug-editor/ ... sages.html).

As is mentioned in the manual, I have imported the Xerces namespace and have put a message attribute in my assertion:

Code: Select all

<assert test="someTest" xerces:message="Custom error message"/>
But the message never shows up, only the default technical one. Is this feature supported anymore?
tavy
Posts: 389
Joined: Thu Jul 01, 2004 12:29 pm

Re: custom error msg for XSD assert

Post by tavy »

Hello,

Yes, is possible to specify a custom error message for an assert. But there is a small problem with the namespace that we specified in the user manual for Xerces messages. The namespace declaration for Xerces messages should be xmlns:xerces="http://xerces.apache.org", not "http://xerces.apache.org/".

This is not an Oxygen specific feature, is more like a processor specific feature. So, you can use it in any application that has that validation processor.

Regards,
Octavian
Octavian Nadolu
<oXygen/> XML Editor
http://www.oxygenxml.com
vlindhol
Posts: 2
Joined: Tue Mar 31, 2015 9:22 am

Re: custom error msg for XSD assert

Post by vlindhol »

Ah, there we go! Removing the slash from the URL made all the difference. Thanks!
Post Reply