You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2006/04/07 16:56:51 UTC
svn commit: r392309 -
/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Author: peterjm
Date: Fri Apr 7 07:56:33 2006
New Revision: 392309
URL: http://svn.apache.org/viewcvs?rev=392309&view=rev
Log:
Changed the processing of the root-type-definition property to account for built-in types.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
URL: http://svn.apache.org/viewcvs/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?rev=392309&r1=392308&r2=392309&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java Fri Apr 7 07:56:33 2006
@@ -1928,17 +1928,21 @@
if (rootTypeNamespace != null && rootTypeNamespace.equals(XMLConstants.NULL_NS_URI)) {
rootTypeNamespace = null;
}
- SchemaGrammar grammarForRootType =
- findSchemaGrammar(
- XSDDescription.CONTEXT_ELEMENT, rootTypeNamespace, null, null, null);
- if (grammarForRootType != null) {
- fCurrentType = grammarForRootType.getGlobalTypeDecl(fRootTypeQName.getLocalPart());
+ if (rootTypeNamespace == SchemaSymbols.URI_SCHEMAFORSCHEMA) {
+ fCurrentType = SchemaGrammar.SG_SchemaNS.getGlobalTypeDecl(fRootTypeQName.getLocalPart());
+ }
+ else {
+ SchemaGrammar grammarForRootType = findSchemaGrammar(
+ XSDDescription.CONTEXT_ELEMENT, rootTypeNamespace, null, null, null);
+ if (grammarForRootType != null) {
+ fCurrentType = grammarForRootType.getGlobalTypeDecl(fRootTypeQName.getLocalPart());
+ }
}
if (fCurrentType == null) {
String typeName = (fRootTypeQName.getPrefix().equals(XMLConstants.DEFAULT_NS_PREFIX)) ?
- fRootTypeQName.getLocalPart() :
- fRootTypeQName.getPrefix()+":"+fRootTypeQName.getLocalPart();
- reportSchemaError("cvc-type.1", new Object[] {typeName});
+ fRootTypeQName.getLocalPart() :
+ fRootTypeQName.getPrefix()+":"+fRootTypeQName.getLocalPart();
+ reportSchemaError("cvc-type.1", new Object[] {typeName});
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org