You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Morgan Delagrange <md...@yahoo.com> on 2002/10/14 21:06:56 UTC

[Jelly] handing invalid XML

Hi all,

I am preparing a change to the
org.apache.commons.jelly.Jelly class that will allow
clients to enable XML validation.  However I noticed
that the XMLParser.warning(SAXException) method simply
logs warnings without throwing the exception.  That
means that whether or not validation succeeds, the
script will continue to execute.

Is that really the desired behaviour?  I would have
assumed that a script would fail if it was not valid
and validation was enabled.  Can/should I modify the
XMLParser class so that warnings will result in a
SAXException?

- Morgan

=====
Morgan Delagrange
http://jakarta.apache.org/taglibs
http://jakarta.apache.org/commons
http://axion.tigris.org
http://jakarta.apache.org/watchdog

__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Jelly] handing invalid XML

Posted by James Strachan <ja...@yahoo.co.uk>.
From: "Morgan Delagrange" <md...@yahoo.com>
> I am preparing a change to the
> org.apache.commons.jelly.Jelly class that will allow
> clients to enable XML validation.  However I noticed
> that the XMLParser.warning(SAXException) method simply
> logs warnings without throwing the exception.  That
> means that whether or not validation succeeds, the
> script will continue to execute.
>
> Is that really the desired behaviour?  I would have
> assumed that a script would fail if it was not valid
> and validation was enabled.  Can/should I modify the
> XMLParser class so that warnings will result in a
> SAXException?


Sounds like a bug/oversight to me. If validation is on then it should fail.
I guess the validation flag needs to be a context thing?

James
-------
http://radio.weblogs.com/0112098/

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>