invalid XML silently ignored

1 view
Skip to first unread message

Barney Boisvert

unread,
Jun 12, 2009, 1:16:28 PM6/12/09
to coldspri...@googlegroups.com
I just fat fingered (the 'l' in 'rel') some XML:

<property name="cacheStats"><rel bean="contentCacheStats" /></property>

ColdSpring happily loaded the XML and initialized the bean factory, it
just silently ignored that property. Obviously it's my fault for fat
fingering, but it seems like the XML consumer ought to notice this and
tell me I'm an idiot, right? It's valid XML, of course, but clearly
doesn't satisfy the DTD. On this particular project we're
intentionally using a slightly outdated version of ColdSpring, so
before I go digging in, does anyone know if this is still a problem
with HEAD?

cheers,
barenyb

--
Barney Boisvert
bboi...@gmail.com
http://www.barneyb.com/

Mark Mandel

unread,
Jun 12, 2009, 8:48:58 PM6/12/09
to coldspri...@googlegroups.com
As far as I am aware, ColdSpring deviates in a few places from the spring DTD/Schema (most notable the 'name' attribute on contructor-args), so there is no actual checking against it on load up of ColdSpring, although I may have to look at the code to confirm that.

I just added a Story to the tracker we've started using to make sure that for the next version we are validating against a Schema, to avoid these sorts of issues.

Mark
--
E: mark....@gmail.com
W: www.compoundtheory.com

Barney Boisvert

unread,
Jun 12, 2009, 9:09:49 PM6/12/09
to coldspri...@googlegroups.com
Yeah, I know it doesn't validate against the Spring DTD (I use the
Spring Eclipse plugin and ignore the 'name' errors), but it seems like
if it finds a <property> tag without any valid children it should
notice. Didn't phrase my original email very well, did I? But since
I saw Chris' tweet about a bottom-up rewrite, I'll happily wait for
that version without any distractions from such a minor issue as this.

So consider my complaint withdrawn. I'll try to type better. :)

cheers,
barneyb
Reply all
Reply to author
Forward
0 new messages