> From: Mats Norén [mailto:[EMAIL PROTECTED]]
> Subject: Re: Cocoon Form binding and validation [was: RE: SchemoX forms]
> The SaxErrorHandler can, to the best of my knowledge, NOT provide you with
> the XPath location of the bad element,
> a quick workaround is to implement a tag tracking Stack in the
> errorhandler.
You may get some different opinions, but here is my $0.02 worth from a SAX
perspective: If you have a DOM, an XPath is not what you want -- you want
the actual org.w3c.dom.Node that caused the error. If you're doing what you
describe with JavaBeans, then you want an object and a property.
So, what you really want is an implementation of org.xml.sax.Locator that
adds some extra set/get methods for the kind of location that you want, and
then you have to make sure that whatever you're using to walk the object
model updates the Locator implementation about the most recently visited
object. (The DOM visitor implementation that is part of the JARV package is
a good example.)
-- Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]