neilg       2003/06/18 15:13:45

  Modified:    java/src/org/apache/xerces/impl/msg
                        XMLSchemaMessages.properties
               java/src/org/apache/xerces/impl/xs/traversers
                        XSDHandler.java
  Log:
  update to use new error schema for schema error message
  
  Revision  Changes    Path
  1.70      +1 -3      
xml-xerces/java/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties
  
  Index: XMLSchemaMessages.properties
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/msg/XMLSchemaMessages.properties,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- XMLSchemaMessages.properties      18 Jun 2003 17:04:59 -0000      1.69
  +++ XMLSchemaMessages.properties      18 Jun 2003 22:13:44 -0000      1.70
  @@ -103,12 +103,10 @@
           src-element.2.1 = src-element.2.1: : One of ''ref'' or ''name'' must be 
present in a local element declaration.
           src-element.2.2 = src-element.2.2: Since ''{0}'' contains the ''ref'' 
attribute, its content must match (annotation?). However, ''{1}'' was found.
           src-element.3 = src-element.3: Element ''{0}'' has both a ''type'' 
attribute and a ''anonymous type'' child. Only one of these is allowed for an element.
  -        src-import = src-import: An <import> element cannot contain a child of type 
''{0}''.
           src-import.1.1 = src-import.1.1: The namespace attribute ''{0}'' of an 
<import> element information item must not be the same as the targetNamespace of the 
schema it exists in.
           src-import.2 = src-import.2: The root element of document ''{0}'' has to 
have the namespace name ''http://www.w3.org/2001/XMLSchema'' and the local name 
''schema''.
           src-import.3.1 = src-import.3.1: The namespace attribute, ''{0}'', of an 
<import> element information item must be identical to the targetNamespace attribute, 
''{1}'', of the imported document.
           src-import.3.2 = src-import.3.2: An <import> element information item that 
had no namespace attribute was found, so the imported document cannot have a 
targetNamespace attribute. However, the targetNamespace ''{1}'' was found in the 
imported document.
  -        src-include = src-include: An <include> element cannot contain a child of 
type ''{0}''.
           src-include.1 = src-include.1: The root element of document ''{0}'' has to 
have the namespace name ''http://www.w3.org/2001/XMLSchema'' and the local name 
''schema''.
           src-include.2.1 = src-include.2.1: The targetNamespace of the referenced 
schema, currently ''{1}'', must be identical to that of the including schema, 
currently ''{0}''.
           src-redefine.2 = src-redefine.2: The root element of document ''{0}'' has 
to have the namespace name ''http://www.w3.org/2001/XMLSchema'' and the local name 
''schema''.
  
  
  
  1.70      +5 -5      
xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
  
  Index: XSDHandler.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- XSDHandler.java   18 Jun 2003 15:16:53 -0000      1.69
  +++ XSDHandler.java   18 Jun 2003 22:13:45 -0000      1.70
  @@ -636,10 +636,10 @@
                       if (importComponentType.equals(SchemaSymbols.ELT_ANNOTATION)) {
                           fElementTraverser.traverseAnnotationDecl(importChild, 
importAttrs, true, currSchemaInfo);
                       } else {
  -                        reportSchemaError("src-import", new Object [] 
{importComponentType}, importChild);
  +                        reportSchemaError("s4s-elt-must-match.1", new Object [] 
{localName, "annotation?", importComponentType}, child);
                       }
                       if(DOMUtil.getNextSiblingElement(importChild) != null) {
  -                        reportSchemaError("src-import", new Object [] 
{importComponentType}, importChild);
  +                        reportSchemaError("s4s-elt-must-match.1", new Object [] 
{localName, "annotation?", 
DOMUtil.getLocalName(DOMUtil.getNextSiblingElement(importChild))}, child);
                       }
                   }
                   fAttributeChecker.returnAttrArray(importAttrs, currSchemaInfo);
  @@ -703,10 +703,10 @@
                           if 
(includeComponentType.equals(SchemaSymbols.ELT_ANNOTATION)) {
                               fElementTraverser.traverseAnnotationDecl(includeChild, 
includeAttrs, true, currSchemaInfo);
                           } else {
  -                            reportSchemaError("src-include", new Object [] 
{includeComponentType}, includeChild);
  +                            reportSchemaError("s4s-elt-must-match.1", new Object [] 
{localName, "annotation?", includeComponentType}, child);
                           }
                           if(DOMUtil.getNextSiblingElement(includeChild) != null) {
  -                            reportSchemaError("src-include", new Object [] 
{includeComponentType}, includeChild);
  +                            reportSchemaError("s4s-elt-must-match.1", new Object [] 
{localName, "annotation?", 
DOMUtil.getLocalName(DOMUtil.getNextSiblingElement(includeChild))}, child);
                           }
                       }
                   }
  
  
  

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

Reply via email to