xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Glavassevich <mrgla...@ca.ibm.com>
Subject Re: SAX events while compiling schema
Date Mon, 10 Aug 2009 02:44:13 GMT

Hi Ajay,

You haven't stated what you're actually trying to accomplish but I'd like
to point out that you can pass a SAXSource [1] as input to the
SchemaFactory. That SAXSource can contain an XMLFilter [2] that you've
written which wraps a real SAX parser and intercepts the SAX events (doing
whatever you feel like with them) before passing them on to the
ContentHandler that the SchemaFactory registered with your XMLFilter.

Thanks.

[1]
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/transform/sax/SAXSource.html
[2]
http://xerces.apache.org/xerces2-j/javadocs/api/org/xml/sax/XMLFilter.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

ajay bhadauria <abhadauria@yahoo.com> wrote on 08/07/2009 01:23:30 PM:

> Hi,
>
> I can register SchemaFactory with errorHandler to get all the error,
> fatalError and warning while compiling schema but just wanted to
> know that Schema compilation (parsing ) is sax based or dom based
internally ?
>
> Can I register SchemaFactory to java ErrorHandler class to get all
> SAX events ?
>
> Thanks
> Ajay
>
> --- On Fri, 8/7/09, ajay bhadauria <abhadauria@yahoo.com> wrote:
>
> > From: ajay bhadauria <abhadauria@yahoo.com>
> > Subject: SAX events while compiling schema
> > To: j-users@xerces.apache.org
> > Date: Friday, August 7, 2009, 3:33 PM
> > Hi,
> >
> > I am using javax.xml.validation.SchemaFactory to create
> > SchemaFactory using newInstance ( SchemaLanguage) method.
> > After that I get Schema Object using newSchema(source)
> > method.
> >
> > How do I register SchemaFactory so that I get all the SAX
> > events ?
> >
> > Thanks
> > Ajay
> >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
Mime
View raw message