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 Pavani Mukthipudi <Pa...@Sun.COM> on 2001/09/18 16:45:38 UTC

[Xerces2] XSDHandler - mutual s

Hi Neil,

A snippet of the current XSDHandler code :

	else if ((localName.equals(SchemaSymbols.ELT_INCLUDE)) ||
                     (localName.equals(SchemaSymbols.ELT_REDEFINE))) {
                     
		Object[] includeAttrs = fAttributeChecker.checkAttributes(child, 	
					true, currSchemaInfo.fNamespaceSupport);
                schemaHint = 								
		(String)includeAttrs[XSAttributeChecker.ATTIDX_SCHEMALOCATION];
                fAttributeChecker.returnAttrArray(includeAttrs, 			
					currSchemaInfo.fNamespaceSupport);
                newSchemaRoot = getSchema(EMPTY_STRING, schemaHint);
            }
            ...
	    XSDocumentInfo newSchemaInfo = constructTrees(newSchemaRoot);


Here before the getSchema() is called, a check has to be made with the 
XSDocumentInfo objects in the 'dependencies' vector and 'fDependencyMap' 
to find whether or not the new schema has already been traversed. But, 
at this point, the only information we have regarding the new schema is 
'schemaHint' which is not a field in XSDocumentInfo. So, how do we make 
the check ?

I can see 3 ways of doing this :

1. use a vector fIncludeLocations (as in 1.4.x) to store (schemaHint,uri)
2. introduce a new field 'schemaHint' in XSDocumentInfo.
3. parse the new schema (again), get the Document object and then use 
   that to compare.

Did i miss something ?  


Secondly, if fTraversed is used to hold completely traversed schemas 
(i.e.XSDocumentInfo objects),how will it help us in handling mutual 
<include>s ? 

Am i wrong in any sense ? if yes, please correct me.


Pavani

-- 

Pavani Mukthipudi
Sun Microsystems Inc.

Phone: 080 - 2298989   Extn: 87390


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org