custom error msg for XSD assert
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Tue Mar 31, 2015 9:22 am
custom error msg for XSD assert
(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:
But the message never shows up, only the default technical one. Is this feature supported anymore?
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"/>
-
- Posts: 389
- Joined: Thu Jul 01, 2004 12:29 pm
Re: custom error msg for XSD assert
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service