Hi,
Please find the attached patch for XSDSimpleTypeTraverser.
NPE in SchemaGrammar's addGobalTypeDecl() when the name of a global
simple type declaration is an invalid NCName or empty string.
Pavani
--
Pavani Mukthipudi
Sun Microsystems Inc.
Phone: 080 - 2298989 Extn: 87390
Index: XSDSimpleTypeTraverser.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/impl/v2/XSDSimpleTypeTraverser.java,v
retrieving revision 1.30
diff -u -r1.30 XSDSimpleTypeTraverser.java
--- XSDSimpleTypeTraverser.java 2001/10/23 14:57:17 1.30
+++ XSDSimpleTypeTraverser.java 2001/10/24 07:02:55
@@ -162,7 +162,10 @@
//---------------------------------------------------
// set qualified name
//---------------------------------------------------
- if (nameProperty == null) { // anonymous simpleType
+ if (nameProperty == null && isGlobal) {
+ return null;
+ }
+ else if (nameProperty == null) { // anonymous simpleType
qualifiedName = fSchemaDoc.fTargetNamespace == null?
",#s#"+(fSimpleTypeAnonCount++):
fSchemaDoc.fTargetNamespace+",#S#"+(fSimpleTypeAnonCount++);
XSDSimpleTypeTraverser.java
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]