You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ra...@apache.org on 2002/03/18 11:56:56 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/parsers XMLGrammarCachingConfiguration.java
rahuls 02/03/18 02:56:56
Modified: java/src/org/apache/xerces/parsers
XMLGrammarCachingConfiguration.java
Log:
XSDHandler#parseSchema signature is changed. The call to parseSchema should use updated signature.
Revision Changes Path
1.5 +11 -3 xml-xerces/java/src/org/apache/xerces/parsers/XMLGrammarCachingConfiguration.java
Index: XMLGrammarCachingConfiguration.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/XMLGrammarCachingConfiguration.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XMLGrammarCachingConfiguration.java 3 Mar 2002 15:22:56 -0000 1.4
+++ XMLGrammarCachingConfiguration.java 18 Mar 2002 10:56:56 -0000 1.5
@@ -104,7 +104,7 @@
*
* @author Neil Graham, IBM
*
- * @version $Id: XMLGrammarCachingConfiguration.java,v 1.4 2002/03/03 15:22:56 rahuls Exp $
+ * @version $Id: XMLGrammarCachingConfiguration.java,v 1.5 2002/03/18 10:56:56 rahuls Exp $
*/
public class XMLGrammarCachingConfiguration
extends StandardParserConfiguration {
@@ -149,6 +149,7 @@
protected XSGrammarBucket fXSGrammarBucket;
protected SubstitutionGroupHandler fSubGroupHandler;
protected CMBuilder fCMBuilder;
+ protected XSDDescription fXSDDescription = new XSDDescription();
//
// Constructors
@@ -306,8 +307,15 @@
// Should check whether the grammar with this namespace is already in
// the grammar resolver. But since we don't know the target namespace
// of the document here, we leave such check to XSDHandler
- SchemaGrammar grammar = fSchemaHandler.parseSchema(null, is,
- XSDDescription.CONTEXT_PREPARSE);
+ fXSDDescription.reset();
+ fXSDDescription.setContextType(XSDDescription.CONTEXT_PREPARSE);
+ String sid = is.getSystemId();
+ if (sid != null) {
+ fXSDDescription.setLiteralSystemId(sid);
+ fXSDDescription.setExpandedSystemId(sid);
+ fXSDDescription.setLocationHints(new String[]{sid});
+ }
+ SchemaGrammar grammar = fSchemaHandler.parseSchema(is, fXSDDescription);
if (getFeature(SCHEMA_FULL_CHECKING)) {
XSConstraints.fullSchemaChecking(fXSGrammarBucket, fSubGroupHandler, fCMBuilder, fErrorReporter);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org