Hi Udayanga, See my comments below (<kn>).
Regards, Khaled From: udayanga wickramasinghe <[email protected]> To: [email protected] Date: 03/24/2010 04:46 PM Subject: Re: About Xerces projects for GSoc 2010 Hi Khaled, thnx for your feedback. please see some of my comments, below... On Wed, Mar 24, 2010 at 9:13 PM, Khaled Noaman <[email protected]> wrote: Hi Udayanga, According to your example, B and B' would be considered 2 different documents and we would end up with conflicting components, not just e2 (assuming B.xsd had other global components). The reason we consider B and B' as different documents is the facet that B' now contain a different declaration for e2. If xs:override did not apply from C->B, then in that case we can consider B and B' the same and there would be no duplicate components. yes.....just to verify...what you mean is like , if B.xsd has the following format , Schema B <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:override schemaLocation="schemaC.xsd"> <xs:element name="e1" type="xs:int"/> <xs:element name="e2" type="xs:date"/> <xs:override> <xs:element name="e3" type="xs:string"/> </xs:schema> then C->B overrride won't ocuur , since overrdden schema B.xsd , dont have either element e2 or e1 for override. Hence no schematic difference in [B] and [B'] and schema inclusion for both A.xsd and C.xsd would be idential...i suppose this is what you meant... <kn>Yes. That's what I meant</kn> You would need to apply override to check for cyclical dependencies.As I mentioned above if override does not modify the overridden schema, then 2 similar schema documents (B and B') would be treated as similar (in other words, no duplicates). As from the above example , nw i see after only applying override we can definitely say for sure whether there exists cyclic dependency conflicts.. Consider the following case: A include B and C, B and C override D. Now you end up with 2 versions of D (D' included by B and D'' included by C). If neither B or C changes D, then both D' and D'' are considered the same. It would be great if you can start by looking at the following packages in Xerces-J: * org.apache.xerces.impl.xs.traversers - schema processing classes (XSDHandler is a starting point) * org.apache.xerces.impl.xs - classes representing the different schema components as well the main class for schema validation (XMLSchemaValidator) * org.apache.xerces.impl.xs.models - content model classes (e.g. DFA. all, empty) sure i'll go through the above implementations n interfaces and get to you incase i want to clarify some finer points....thnx for the details....Btw are there any architecture docs/articles on Xerces Xmlschema processing ? (i found several docs related to Xerces2 parsers,XNI and validators but not a lot on XmlSchema ) .thnx again.. <kn>Check the documentation for Xerces-J ( http://xerces.apache.org/xerces2-j/xml-schema.html). You can also take a look at the samples that are included as part of Xerces-J source code.</kn> Regards, Udayanga
