You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2011/05/16 11:15:34 UTC

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

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: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org