Author: mukulg
Date: Mon May 16 09:15:34 2011
New Revision: 1103656

URL: http://svn.apache.org/viewvc?rev=1103656&view=rev
Log:
committing slight improvement to schema targetNamespace initialization code (it 
seems the previous commit introduced problems with "EmptyTargetNamespace" 
schema error).

hopefully this would be fine now.

Modified:
    
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java

Modified: 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
URL: 
http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java?rev=1103656&r1=1103655&r2=1103656&view=diff
==============================================================================
--- 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
 (original)
+++ 
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/traversers/XSDocumentInfo.java
 Mon May 16 09:15:34 2011
@@ -122,12 +122,11 @@ class XSDocumentInfo {
             fValidationContext.setSymbolTable(symbolTable);
             fValidationContext.setTypeValidatorHelper(typeValidatorHelper);
             
-            fTargetNamespace = XMLChar.trim(DOMUtil.getAttrValue(root, 
SchemaSymbols.ATT_TARGETNAMESPACE));
-            if (!"".equals(fTargetNamespace)) {
-                fTargetNamespace = symbolTable.addSymbol(fTargetNamespace);
-            }
-            else {
-                fTargetNamespace = null; 
+            if (DOMUtil.getAttr(root, SchemaSymbols.ATT_TARGETNAMESPACE) != 
null) {
+                fTargetNamespace = XMLChar.trim(DOMUtil.getAttrValue(root, 
SchemaSymbols.ATT_TARGETNAMESPACE));
+                if (!"".equals(fTargetNamespace)) {
+                    fTargetNamespace = symbolTable.addSymbol(fTargetNamespace);
+                }
             }
                         
             fSchemaAttrs = attrChecker.checkAttributes(root, true, this);



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to