qiuwei / jing-trang

Automatically exported from code.google.com/p/jing-trang
Other
1 stars 1 forks source link

Provide infrastructure for richer information about validation errors #45

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
This could include other kinds of error as well, but validation errors are
the most important, because they are the ones that may be exposed to the
least technical users.

Validation errors should provide a location in terms of the element
structure of the input document.

It should be possible for applications to use the rich information to
generate their own customized error message display without having to
change any of the library code.

Applications should be able to do the localization themselves.

It should be straightforward to generate a complete XML representation of
the information, so that applications can use XSLT to generate an
appropriate presentation of the errors.

Original issue reported on code.google.com by jjc.jclark.com on 7 Nov 2008 at 6:00

GoogleCodeExporter commented 8 years ago
My current thinking is to provide a single subclass of SAXParseException, which
contains this information in some form.

Original comment by jjc.jclark.com on 7 Nov 2008 at 6:02

GoogleCodeExporter commented 8 years ago

Original comment by jjc.jclark.com on 18 Nov 2008 at 12:07

GoogleCodeExporter commented 8 years ago
Could this representation also include exceptions that are passed up from the 
level of dynamic schema processing? In my application, a URL with query string 
points to a PHP script that builds a Relax NG schema on-the-fly. If an invalid 
parameter is used, I have written the script to serve a default schema, but 
there is no way of passing on the information that something was not quite 
right. I would prefer to throw an exception and have the calling application 
decide what action to take.

Original comment by taraAt...@gmail.com on 25 Nov 2011 at 2:56

GoogleCodeExporter commented 8 years ago
I don't understand your comment.  What's to stop you throwing an exception at 
the moment?

Original comment by j...@jclark.com on 26 Nov 2011 at 9:03

GoogleCodeExporter commented 8 years ago
The schema processing is performed on a webserver and the validation is 
performed elsewhere (local machine or another server). So the schema processing 
PHP script could throw an exception but it would be local to the PHP script -it 
wouldn't be communicated to the validator, as that only sees the served rnc 
file. What I would like to do is "throw" the exception as an annotation in the 
rnc, and have a means for the validator to do something with it - minimally, to 
print a warning or error message in the validator output.

Original comment by taraAt...@gmail.com on 26 Nov 2011 at 4:30

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Is there any progress? 
Our project need it to expose validation information to user.  

Original comment by starreid...@gmail.com on 18 Sep 2012 at 9:44

GoogleCodeExporter commented 8 years ago
No progress.  Don't hold your breath: I haven't done significant work on this 
project for a couple of years now.

Original comment by j...@jclark.com on 19 Sep 2012 at 1:01