You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Michael Glavassevich <mr...@ca.ibm.com> on 2012/08/18 22:59:24 UTC
Re: Progress of GSoC 2012 project - Cannot validate against multiple XML
schemas within the same namespace
(Forwarding to the mailing list.)
Shakya, thanks for the update.
Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Shakya Wijerama <sh...@gmail.com> wrote on 18/08/2012 02:34:41
PM:
> Hello Michael and Devs,
>
> Up to now I have written the code for the second part of the
> project, which is the "entity resolver". I discussed the latest
> issues I had, with Michael and will update the code for the project
> by tomorrow in the JIRA.
>
> Thanks.
> On Mon, Jul 30, 2012 at 7:47 AM, Michael Glavassevich
<mrglavas@ca.ibm.com
> > wrote:
> Hi Shakya,
>
> Great work!
>
> I know you're almost ready to tie this together with an entity
> resolver. Let us know if you have any questions on how to design and
> implement that.
>
> Thanks.
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
> Shakya Wijerama <sh...@gmail.com> wrote on 24/07/2012 11:42:34
AM:
>
> > Hello Michael and devs,
> >
> > This is to update my progress until the mid term evaluations.
> >
> > I have been working on getting the namespaces from the
> > XMLInputSource. Since there are four types of sources that can be
> > passed to XMLInputSource such as Stream, SAX, DOM and StAX sources.
> > Though extracting the namespace from the DOMSource was
> > starightforward, extracting the namespace from the SAXSource was
> > complex and I had to write a SAXContentHandler which implements
> > the ContentHandler interface. Then I set the SAXContenHandler an
> > XMLSerializer object with a ByteArrayOutputStream object injected.
> >
> > Then I set the SAXContentHandler the above XMLSerialzer and injected
> > the SAXContentHandler to the parser. After parsing the source I
> > could get the namespace of the SAXSource via the output stream.
> >
> > I am working on extracting the namespaces for the StAX source and,
> > Stream source and will complete that task within next few days.
> > Later I will have to continue with entity resolvers as I have
> > mentioned in my project proposal
> >
> > Thanks.
>
> > On Mon, Jul 2, 2012 at 8:14 AM, Shakya Wijerama
<shakya.wijerama@gmail.com
> > > wrote:
> > Hello Michael, devs,
> >
> > Here are the steps I have followed inorder to develop the code after
> > a discussion with Michael.
> >
> > 1. The important modifications are done in the newSchema(Source []
> > sources) methods in the XMLSchemaFactory.java class.
> > 2. Inorder to validate shcemas against multiple namespaces, a new
> > method has been introduced and invoked just before the
> > loadGrammar() method.
> > 3. After passing the XMLInputSources in to the new method which is
> > named as generateDummySchema(XMLInputSource[] xmlInputSources)
> > it will return a top-level generated schema.
> > 4. It glues all the the sources together and can contain a tree of
> > schemas which can be traversed recursively by Xerces.
> > 5. After schema generation a new entity resolver to resolve the
> > sources which I have generated in the generateDummySchema method
> > (this has to be implemented).
> > 6. I have to keep a cache of the sources that were passed in and any
> > include level schemas that were generated, the resolver would
> > return these documents when asked by Xerces. The caching mechanism
> > is done through StringBuffers.
> >
> > Hope to update you more in next few days.
> >
> > Thanks.
> >
> > On Thu, Jun 21, 2012 at 7:48 PM, Michael Glavassevich
<mrglavas@ca.ibm.com
> > > wrote:
> > Hi Shakya,
> >
> > Thanks for the update. Looking forward to hearing more about how
> > things are progressing.
> >
> > Michael Glavassevich
> > XML Technologies and WAS Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> >
> > Shakya Wijerama <sh...@gmail.com> wrote on 21/06/2012
12:22:23 AM:
> >
> > > Hi Devs,
> > >
> > > I have been working on "Cannot validate against multiple XML schema
> > > within the same namespace" and studied thoroughly about the related
> > > areas of the project in the Xerces code and
> > > learnt about Schema generation. And I have been implementing the
> > > design as discussed with Michael and will give an update about the
> > > implementation along with the code within next few days.
> > >
> > > --
> > >
> > > Regards,
> > >
> > > Shakya Wijerama
> > >
> > > Senior Student,
> > > Faculty of Applied Sciences,
> > > Sabaragamuwa University of Sri Lanka.
> >
>
> >
> > --
> >
>
> >
> > Regards,
> >
> > Shakya Wijerama
> >
> > Senior Student,
> > Faculty of Applied Sciences,
> > Sabaragamuwa University of Sri Lanka.
> >
> >
>
> >
> > --
> >
>
> >
> > Regards,
> >
> > Shakya Wijerama
> >
> > Senior Student,
> > Faculty of Applied Sciences,
> > Sabaragamuwa University of Sri Lanka.
>
>
> --
>
>
> Regards,
>
> Shakya Wijerama
>
> Senior Student,
> Faculty of Applied Sciences,
> Sabaragamuwa University of Sri Lanka.
Re: Progress of GSoC 2012 project - Cannot validate against multiple XML
schemas within the same namespace
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Shakya,
Thank you for your contributions and all the effort you've put in
throughout the summer.
Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
Shakya Wijerama <sh...@gmail.com> wrote on 24/08/2012 10:30:55
PM:
> Hello Michael/Devs,
>
> It is my pleasure to tell you that I have passed the final
> evaluations and there by I have finished the Google summer
> successfully. So would like to make this an opportunity to thank
> you all who helped me and special gratitude and credit goes to my
> mentor (Michael Glavassevich) who inspired me and helped me
> enormously throughout the summer.
>
> Thanks.
>
> On Sun, Aug 19, 2012 at 2:29 AM, Michael Glavassevich
<mrglavas@ca.ibm.com
> > wrote:
> (Forwarding to the mailing list.)
>
> Shakya, thanks for the update.
>
> Michael Glavassevich
> XML Technologies and WAS Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
> Shakya Wijerama <sh...@gmail.com> wrote on 18/08/2012 02:34:41
PM:
>
> > Hello Michael and Devs,
> >
> > Up to now I have written the code for the second part of the
> > project, which is the "entity resolver". I discussed the latest
> > issues I had, with Michael and will update the code for the project
> > by tomorrow in the JIRA.
> >
> > Thanks.
>
> > On Mon, Jul 30, 2012 at 7:47 AM, Michael Glavassevich
<mrglavas@ca.ibm.com
> > > wrote:
> > Hi Shakya,
> >
> > Great work!
> >
> > I know you're almost ready to tie this together with an entity
> > resolver. Let us know if you have any questions on how to design and
> > implement that.
> >
> > Thanks.
> >
> > Michael Glavassevich
> > XML Technologies and WAS Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
>
> > Shakya Wijerama <sh...@gmail.com> wrote on 24/07/2012
11:42:34 AM:
> >
> > > Hello Michael and devs,
> > >
> > > This is to update my progress until the mid term evaluations.
> > >
> > > I have been working on getting the namespaces from the
> > > XMLInputSource. Since there are four types of sources that can be
> > > passed to XMLInputSource such as Stream, SAX, DOM and StAX sources.
> > > Though extracting the namespace from the DOMSource was
> > > starightforward, extracting the namespace from the SAXSource was
> > > complex and I had to write a SAXContentHandler which implements
> > > the ContentHandler interface. Then I set the SAXContenHandler an
> > > XMLSerializer object with a ByteArrayOutputStream object injected.
> > >
> > > Then I set the SAXContentHandler the above XMLSerialzer and injected
> > > the SAXContentHandler to the parser. After parsing the source I
> > > could get the namespace of the SAXSource via the output stream.
> > >
> > > I am working on extracting the namespaces for the StAX source and,
> > > Stream source and will complete that task within next few days.
> > > Later I will have to continue with entity resolvers as I have
> > > mentioned in my project proposal
> > >
> > > Thanks.
> >
> > > On Mon, Jul 2, 2012 at 8:14 AM, Shakya Wijerama
<shakya.wijerama@gmail.com
> > > > wrote:
> > > Hello Michael, devs,
> > >
> > > Here are the steps I have followed inorder to develop the code after
> > > a discussion with Michael.
> > >
> > > 1. The important modifications are done in the newSchema(Source []
> > > sources) methods in the XMLSchemaFactory.java class.
> > > 2. Inorder to validate shcemas against multiple namespaces, a new
> > > method has been introduced and invoked just before the
> > > loadGrammar() method.
> > > 3. After passing the XMLInputSources in to the new method which is
> > > named as generateDummySchema(XMLInputSource[] xmlInputSources)
> > > it will return a top-level generated schema.
> > > 4. It glues all the the sources together and can contain a tree of
> > > schemas which can be traversed recursively by Xerces.
> > > 5. After schema generation a new entity resolver to resolve the
> > > sources which I have generated in the generateDummySchema method
> > > (this has to be implemented).
> > > 6. I have to keep a cache of the sources that were passed in and any
> > > include level schemas that were generated, the resolver would
> > > return these documents when asked by Xerces. The caching mechanism
> > > is done through StringBuffers.
> > >
> > > Hope to update you more in next few days.
> > >
> > > Thanks.
> > >
> > > On Thu, Jun 21, 2012 at 7:48 PM, Michael Glavassevich
<mrglavas@ca.ibm.com
> > > > wrote:
> > > Hi Shakya,
> > >
> > > Thanks for the update. Looking forward to hearing more about how
> > > things are progressing.
> > >
> > > Michael Glavassevich
> > > XML Technologies and WAS Development
> > > IBM Toronto Lab
> > > E-mail: mrglavas@ca.ibm.com
> > > E-mail: mrglavas@apache.org
> > >
> > > Shakya Wijerama <sh...@gmail.com> wrote on 21/06/2012
> 12:22:23 AM:
> > >
> > > > Hi Devs,
> > > >
> > > > I have been working on "Cannot validate against multiple XML
schema
> > > > within the same namespace" and studied thoroughly about the
related
> > > > areas of the project in the Xerces code and
> > > > learnt about Schema generation. And I have been implementing the
> > > > design as discussed with Michael and will give an update about the
> > > > implementation along with the code within next few days.
> > > >
> > > > --
> > > >
> > > > Regards,
> > > >
> > > > Shakya Wijerama
> > > >
> > > > Senior Student,
> > > > Faculty of Applied Sciences,
> > > > Sabaragamuwa University of Sri Lanka.
> > >
> >
> > >
> > > --
> > >
> >
> > >
> > > Regards,
> > >
> > > Shakya Wijerama
> > >
> > > Senior Student,
> > > Faculty of Applied Sciences,
> > > Sabaragamuwa University of Sri Lanka.
> > >
> > >
> >
> > >
> > > --
> > >
> >
> > >
> > > Regards,
> > >
> > > Shakya Wijerama
> > >
> > > Senior Student,
> > > Faculty of Applied Sciences,
> > > Sabaragamuwa University of Sri Lanka.
> >
>
> >
> > --
> >
>
> >
> > Regards,
> >
> > Shakya Wijerama
> >
> > Senior Student,
> > Faculty of Applied Sciences,
> > Sabaragamuwa University of Sri Lanka.
>
>
> --
>
>
> Regards,
>
> Shakya Wijerama
>
> Senior Student,
> Faculty of Applied Sciences,
> Sabaragamuwa University of Sri Lanka.