Hello Shakya, Shakya Wijerama <[email protected]> wrote on 02/04/2012 05:12:17 PM: > Hello Michael, > > I have completed my proposal to some extent and there are a few > things to clarify. I am not much familiar with custom entity > resolver. Can you briefly explain me the idea of that and how we can > apply it in the project.
For each include and import in a schema document, Xerces will make a call out to an entity resolver [1] to locate the include or import. This allows the application to resolve the location of the schema document in some other way than the default of opening the URL specified on the include/import. The includes and imports in the synthetic schemas you generate should resolve back to the Source objects that were passed to SchemaFactory.newSchema(). You would need to create an implementation of XMLEntityResolver which handles this custom resolution and register it with the SchemaFactory. > I have used the name for the project as it is in JIRA. It is more > like bug name and I think it is better to change the name as > "Validating against multiple XMl schemas with same namespace". What > do you suggest for this? Yes, sounds much better than the JIRA bug id. > I have not fully completed the proposal yet and there are some > modifications to be done. So I can complete the rest with your > feedback and submit it to Google tomorrow (since the deadline is 6thof April). > > Note: I have attached the proposal herewith.. Good work so far. Looking forward to seeing your completed proposal. > Thanks. > On Thu, Feb 23, 2012 at 10:30 AM, Michael Glavassevich <[email protected] > > wrote: > Hi Shakya, > > I understand what Mukul is saying, but disagree that Xerces is > working correctly. He described a work around for that specific > case, not a general solution. > > I believe users should be able to provide an array of schema > documents to SchemaFactory.newInstance() which all have the same > namespace and that Xerces should be fixed so that it can process that. > > It should be possible for the SchemaFactory implementation to > internally generate a synthetic schema document which combines the > user's list of schema documents together. From the schema loader's > perspective this would look like one master schema document for the > namespace which has includes to all the others. Taking that a step > further, another schema document could be generated which glues all > the namespaces together with imports. > > > Thanks. > > Michael Glavassevich > XML Technologies and WAS Development > IBM Toronto Lab > E-mail: [email protected] > E-mail: [email protected] Thanks. [1] http://xerces.apache.org/xerces2-j/javadocs/xni/org/apache/xerces/xni/parser/XMLEntityResolver.html Michael Glavassevich XML Technologies and WAS Development IBM Toronto Lab E-mail: [email protected] E-mail: [email protected]
