Hi Jérôme,

This would definitely be great to have available, and I'll gladly add a link in the new RC2 documentation. If you want to actually contribute the code to the project (as opposed to keeping it on your own site) I'll need you to fill out the contributor license agreement and mail or fax it in to me (if you want to fax it, let me know so I can hookup the fax machine). I'd also want you to commit to maintaining the code for at least a few months. We've had problems in the past with code donations which are then dropped, with no support.

On your RFE, there's an issue with this in that the ValidationException is not currently used by anything within the JiBX code. I added the class some time ago with the intention of offering more flexibly handling of errors, but have not implemented the use of this. It may be possible to get this used in the 1.1 timeframe (which is actually fairly soon - I plan to have a 1.1 beta out by the end of the year, including StAX parser and writer support).

It sounds like you're really looking for information on errors in the binding definition, though - right? If so, the binding model already accumulates this information in the org.jibx.binding.model.ValidationContext. The individual problems are instances of org.jibx.binding.model.ValidationProblem, and the getComponent() object implements (or should always implement) the org.jibx.runtime.ITrackSource interface. The reported position should always be that of the end of the start tag for the element with the problem.

The actual binding definition validation handling is built into the org.jibx.binding.model.BindingElement class, in the validateBinding() method. This actually prints out the errors to System.out, but the methods it uses are all public and could be used directly for other types of reporting.

 - Dennis

Jérôme BERNARD wrote:

Hi,

As promised on the users ML I am willing to give my plugin for the JiBX project.
After some code cleanup, should I submit a patch in JIRA?

Next, I would like to ask for a RFE.
I would find extremely useful to have the exception
ValidationException expose the file name, the colomn and row where the
problem is located at. This data is available for the getDescription()
method, but I'd like to public getters in order to be able to "jump"
to the right place from the IDE compilation errors.

Regards,
Jérôme.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opÌk
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to