Dear Wiki user, You have subscribed to a wiki page or wiki category on "Xerces Wiki" for change notification.
The "gsoc_xs_override_proposal" page has been changed by uswick. http://wiki.apache.org/xerces/gsoc_xs_override_proposal?action=diff&rev1=16&rev2=17 -------------------------------------------------- </override> }}} - . .Here “schemaLocation” indicates the location of the overriding schema document while “Content” corresponds to the types/groups/attributes/elements this schema will be overriding on the schemas available at corresponding “schemaLocation” . xs:override semantics are very much similar to class/prototypical inheritance where after successful application , corresponding overridden schemas replaces their old schemas by the new overriding schemas contained within a <xs:override> element. Following describes the criteria of xs:override on a general overview. Implementing thsese sematics on XML schema composition framework ,can be be considered the main objective of the project. + . .Here “schemaLocation” indicates the location of the overriden schema document while “Content” corresponds to the types/groups/attributes/elements this schema will be overriding on the schemas available at corresponding “schemaLocation” . xs:override semantics are very much similar to class/prototypical inheritance where after successful application , corresponding overridden schemas replaces their old schemas by the new overriding schemas contained within a <xs:override> element. Following describes the criteria of xs:override on a general overview. Implementing thsese sematics on XML schema composition framework ,can be be considered the main objective of the project. . {{{ 1.override only applies if the schema component within <xs:override> exists in the overridden schema (corresponding to the respective schema Location defined). If this condition is not true, there’s no effect on the overriden schema location and overriding grammer won’t exist in the final schema representation. }}} {{{ 2. - a)Each and every <override> schema information element would be subjected to “override transformation”[5] . However when target namespaces of overriding and overridden schemas don’t match “chameleon inclusion transformation”[6] is also performed prior to the override transform. Override transformation itself is pervasive and therefore would be applied to <include> information items on the overridden schema.(ie:- if schema A overrides B and B includes C then C will also be overridden accordingly ).Further more override transformation also applies to <override> information items present on the overridden schema by merging. . . + a)Each and every <override> schema information element would be subjected to “override transformation”[5] . However when target namespaces of overriding and overridden schemas don’t match “chameleon inclusion transformation”[6] is also performed prior to the override transform. Override transformation itself is pervasive and therefore would be applied to <include> information items on the overridden schema.(ie:- if schema A overrides B and B includes C then C will also be overridden accordingly ).Further more override transformation also applies to <override> information items present on the overridden schema by merging the two <override> schema components. }}} . Although the idea behind xs:override seems to be rather simple , several scenarios need to be considered where some complications would inevitably arise.Following are several such considerations. @@ -42, +42 @@ This scenario could occur in circular overrides as well (ie:- if schema A overrides B and B overrides A , then if B->A override transformation affects schema A then duplicate errors will occur) . . }}} . {{{ - In general if overriding schemas produce same override transformation schema result for inclusion, then they would be considered the same , other wise if the transformation results differ , duplicates will occur .(ie:- If schema A includes B,C and B,C both inturn override D ,then B,C would include same version of D if B->D and C->D override transform doesn’t affect D OR if B,C both got same override schema components ) + In general if overriding schemas produce same/identical override transformation schema results for inclusion, then they would be considered the same , other wise if the transformation results differ , duplicates will occur .(ie:- If schema A includes B,C and B,C both inturn override D ,then B,C would include same version of D if B->D and C->D override transform doesn’t affect D OR if B,C both have the same override schema components ) }}} . Implementation of xs:override should take into account the aforementioned factors so that dependencies are correctly evaluated and necessary schema preprocessing is performed. . Xerces2-j XMLSchema processing and supporting structures are mainly handled by classes located in org.apache.xerces.impl.xs package. Primarily XMLSchemaFactory and XMLScehmaLoader are responsible for loading(ie:- #loadGrammar() ) and handling schemas from a set of sources. Actually XMLSchemaLoader acts as an wrapper that provides necessary inputs for a XSDHandler (org.apache.xerces.impl.xs.traversers) instance which will inturn be coordinating the construction of a grammar object corresponding to a schema throughout several stages. XSDHandler instance is responsible for parsing each schema source (including the ones’s that are imported resulting in other grammers) , preprocessing/resoving /loading grammers etc. . XSDHandler#parseSchema() is responsible for coordinating these critical stages of schema composition which includes , + - . a) constructTrees – constructs XSschema objects .Attempts to resolve <include>,<redefine> schema components and builds a dependency map . + . . a) constructTrees – constructs XSschema objects .Attempts to resolve <include>,<redefine> schema components and builds a dependency map . . b) buildGlobalNameRegistries - builds registries for all globally-referenceable names. Keeps track of <redefine> component mapping. @@ -61, +62 @@ . f) storing imported grammars and building the Grammer Pool + . - . . xs:override implementation intends to extend this functionality to implement <override> structure semantics. Also several supporting structures will be needed so that <override> schema components will be identified during schema processing. For example extending of following class structures. + . xs:override implementation intends to extend this functionality to implement <override> structure semantics. Also several supporting structures will be needed so that <override> schema components will be identified during schema processing. For example extending of following class structures. - . • org.apache.xerces.impl.xs.SchemaSymbols – keeps track of collection of symbols used in parsing Schema Grammer. Need to introduce new <override> grammer symbols to this. - . • org.apache.xerces.impl.xs.XSDDescription - keeps track of all information specific to XML Schema grammars. This can be used to indicate the Schema processor that the current schema document is overridden by another scheama document. + . . • org.apache.xerces.impl.xs.SchemaSymbols – keeps track of collection of symbols used in parsing Schema Grammer. Need to introduce new <override> grammer symbols to this. + . • org.apache.xerces.impl.xs.XSDDescription - keeps track of all information specific to XML Schema grammars. This can be used to indicate the Schema processor that the current schema document is overridden by another schema document. + + . . Additionally Xs:override implementation may require quite a few new components/data structures to be added to org.apache.xerces.impl.xs package inorder to handle different scenarios regarding <override> semantics as was described in the beginning. == Things I have Done So far == --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
