Please find the attached text file ( patch for bug# 3040 ).

regards,
Pavani


-- 

Pavani Mukthipudi
Sun Microsystems Inc.

Phone: 080 - 2298989   Extn: 87390
? build
? patch2.txt
Index: src/org/apache/xerces/msg/XMLMessages.java
===================================================================
RCS file: 
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/msg/Attic/XMLMessages.java,v
retrieving revision 1.5
diff -c -r1.5 XMLMessages.java
*** src/org/apache/xerces/msg/XMLMessages.java  2001/08/08 18:20:19     1.5
--- src/org/apache/xerces/msg/XMLMessages.java  2001/09/04 12:50:16
***************
*** 279,285 ****
          { "PrefixDeclared", "The namespace prefix \"{0}\" was not declared." },
          { "MSG_ATT_DEFAULT_INVALID", "The defaultValue \"{1}\" of attribute \"{0}\" 
is not legal as for the lexical constraints of this attribute type." },
          { "MSG_GENERIC_SCHEMA_ERROR", "General Schema Error: {0}." },
!         { "MSG_DTD_SCHEMA_ERROR", "Xerces-J parser may not validate an XML document 
correctly if both XML Schema and DTD are present." }
  
      };
  
--- 279,286 ----
          { "PrefixDeclared", "The namespace prefix \"{0}\" was not declared." },
          { "MSG_ATT_DEFAULT_INVALID", "The defaultValue \"{1}\" of attribute \"{0}\" 
is not legal as for the lexical constraints of this attribute type." },
          { "MSG_GENERIC_SCHEMA_ERROR", "General Schema Error: {0}." },
!         { "MSG_DTD_SCHEMA_ERROR", "Xerces-J parser may not validate an XML document 
correctly if both XML Schema and DTD are present." },
!       { "NamespaceNameEmpty", "The namespace name for prefix \"{0}\" is empty." }
  
      };
  
Index: src/org/apache/xerces/utils/XMLMessages.java
===================================================================
RCS file: 
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/utils/Attic/XMLMessages.java,v
retrieving revision 1.5
diff -c -r1.5 XMLMessages.java
*** src/org/apache/xerces/utils/XMLMessages.java        2001/08/08 18:20:19     1.5
--- src/org/apache/xerces/utils/XMLMessages.java        2001/09/04 12:50:51
***************
*** 312,317 ****
--- 312,318 ----
          MSG_ATT_DEFAULT_INVALID = 168,
          MSG_GENERIC_SCHEMA_ERROR = 169,
          MSG_DTD_SCHEMA_ERROR = 170,
+       MSG_NAMESPACE_NAME_EMPTY = 171,
  
          // ...
          MSG_MAX_CODE = 200;
***************
*** 488,493 ****
--- 489,495 ----
          "MSG_ATT_DEFAULT_INVALID",      // 168, "MSG_ATT_DEFAULT_INVALID"
          "MSG_GENERIC_SCHEMA_ERROR",     // 169  "MSG_GENERIC_SCHEMA_ERROR"
          "MSG_DTD_SCHEMA_ERROR",         // 170
+       "NamespaceNameEmpty",           // 171, "MSG_NAMESPACE_NAME_EMPTY"
          // ...
          ""                              //
      };
***************
*** 641,646 ****
--- 643,649 ----
          NC_PREFIX_DECLARED = 144,
          VC_ATTRIBUTE_DEFAULT_LEGAL = 145,
          SCHEMA_GENERIC_ERROR = 146,
+       NC_NAMESPACE_NAME_EMPTY = 147,
          
          // ...
          CONSTRAINT_MAX_CODE = 200;
***************
*** 1239,1244 ****
--- 1242,1249 ----
                         "No element type may have more than one NOTATION attribute 
specified."),
      // NC_PREFIX_DECLARED = 144
          new Constraint("4.", "", "NC: Prefix Declared", ""),
+     // NC_NAMESPACE_NAME_EMPTY = 147
+       new Constraint("","","NC: Namespace name is empty",""),
  
          // ...
          new Constraint(null, null, null, null)
Index: src/org/apache/xerces/validators/common/XMLValidator.java
===================================================================
RCS file: 
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/validators/common/Attic/XMLValidator.java,v
retrieving revision 1.186
diff -c -r1.186 XMLValidator.java
*** src/org/apache/xerces/validators/common/XMLValidator.java   2001/08/09 19:21:49    
 1.186
--- src/org/apache/xerces/validators/common/XMLValidator.java   2001/09/04 12:51:44
***************
*** 2506,2511 ****
--- 2506,2519 ----
                 if (attPrefix == fNamespacesPrefix) {
                    int nsPrefix = attrList.getAttrLocalpart(index);
                    int uri = fStringPool.addSymbol(attrList.getAttValue(index));
+                 if(uri == StringPool.EMPTY_STRING) {
+                    Object[] args = { fStringPool.toString(nsPrefix) };
+                    fErrorReporter.reportError(fErrorReporter.getLocator(),
+                                               XMLMessages.XMLNS_DOMAIN,
+                                               XMLMessages.MSG_NAMESPACE_NAME_EMPTY,
+                                               XMLMessages.NC_NAMESPACE_NAME_EMPTY,
+                                               args, 
+XMLErrorReporter.ERRORTYPE_RECOVERABLE_ERROR);
+                 }
                    fNamespacesScope.setNamespaceForPrefix(nsPrefix, uri);
  
                    if (fValidating && fSchemaValidation) {

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to