You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2002/01/15 22:07:55 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs/traversers XSAttributeChecker.java XSDAbstractTraverser.java XSDComplexTypeTraverser.java XSDSimpleTypeTraverser.java

sandygao    02/01/15 13:07:55

  Modified:    java/src/org/apache/xerces/impl/dv DatatypeException.java
                        InvalidDatatypeFacetException.java
                        InvalidDatatypeValueException.java
               java/src/org/apache/xerces/impl/dv/xs_new AnyURIDV.java
                        Base64BinaryDV.java BooleanDV.java DateDV.java
                        DateTimeDV.java DayDV.java DecimalDV.java
                        DoubleDV.java DurationDV.java EntityDV.java
                        FloatDV.java HexBinaryDV.java IDDV.java
                        IDREFDV.java MonthDV.java MonthDayDV.java
                        QNameDV.java TimeDV.java XSSimpleTypeDecl.java
                        YearDV.java YearMonthDV.java
               java/src/org/apache/xerces/impl/msg
                        XMLSchemaMessages.properties
               java/src/org/apache/xerces/impl/xs XMLSchemaException.java
               java/src/org/apache/xerces/impl/xs/traversers
                        XSAttributeChecker.java XSDAbstractTraverser.java
                        XSDComplexTypeTraverser.java
                        XSDSimpleTypeTraverser.java
  Log:
  Update simple type error messages: get rid of "General", and use error codes
  from the schema spec.
  
  Revision  Changes    Path
  1.2       +1 -17     xml-xerces/java/src/org/apache/xerces/impl/dv/DatatypeException.java
  
  Index: DatatypeException.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/DatatypeException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DatatypeException.java	19 Nov 2001 20:13:00 -0000	1.1
  +++ DatatypeException.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -65,25 +65,9 @@
    *
    * @author Sandy Gao, IBM
    *
  - * @version $Id: DatatypeException.java,v 1.1 2001/11/19 20:13:00 sandygao Exp $
  + * @version $Id: DatatypeException.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class DatatypeException extends Exception {
  -
  -    // in case the exception is thrown from a Schema DV, but the DTD constructor
  -    // is used, we treat it as a general schema error, and use the "general"
  -    // error code.
  -    private static final String GENERAL_ERROR = "general";
  -
  -    /**
  -     * Create a new datatype exception by providing an error message.
  -     *
  -     * @param msg  error message
  -     */
  -    public DatatypeException(String msg) {
  -        super(msg);
  -        this.key = GENERAL_ERROR;
  -        this.args = new Object[]{msg};
  -    }
   
       // used to store error code and error substitution arguments
       protected String key;
  
  
  
  1.2       +1 -12     xml-xerces/java/src/org/apache/xerces/impl/dv/InvalidDatatypeFacetException.java
  
  Index: InvalidDatatypeFacetException.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/InvalidDatatypeFacetException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InvalidDatatypeFacetException.java	19 Nov 2001 20:13:00 -0000	1.1
  +++ InvalidDatatypeFacetException.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -63,20 +63,9 @@
    *
    * @author Sandy Gao, IBM
    *
  - * @version $Id: InvalidDatatypeFacetException.java,v 1.1 2001/11/19 20:13:00 sandygao Exp $
  + * @version $Id: InvalidDatatypeFacetException.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class InvalidDatatypeFacetException extends DatatypeException {
  -
  -    /**
  -     * Create a new datatype exception by providing an error message.
  -     * NOTE: this message shouldn't be called, after we provide complete
  -     *       schema error code support.
  -     *
  -     * @param msg  error message
  -     */
  -    public InvalidDatatypeFacetException(String msg) {
  -        super(msg);
  -    }
   
       /**
        * Create a new datatype exception by providing an error code and a list
  
  
  
  1.2       +1 -10     xml-xerces/java/src/org/apache/xerces/impl/dv/InvalidDatatypeValueException.java
  
  Index: InvalidDatatypeValueException.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/InvalidDatatypeValueException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InvalidDatatypeValueException.java	19 Nov 2001 20:13:00 -0000	1.1
  +++ InvalidDatatypeValueException.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -62,18 +62,9 @@
    *
    * @author Sandy Gao, IBM
    *
  - * @version $Id: InvalidDatatypeValueException.java,v 1.1 2001/11/19 20:13:00 sandygao Exp $
  + * @version $Id: InvalidDatatypeValueException.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class InvalidDatatypeValueException extends DatatypeException {
  -
  -    /**
  -     * Create a new datatype exception by providing an error message.
  -     *
  -     * @param msg  error message
  -     */
  -    public InvalidDatatypeValueException(String msg) {
  -        super(msg);
  -    }
   
       /**
        * Create a new datatype exception by providing an error code and a list
  
  
  
  1.3       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/AnyURIDV.java
  
  Index: AnyURIDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/AnyURIDV.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AnyURIDV.java	3 Jan 2002 20:14:13 -0000	1.2
  +++ AnyURIDV.java	15 Jan 2002 21:07:54 -0000	1.3
  @@ -67,7 +67,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: AnyURIDV.java,v 1.2 2002/01/03 20:14:13 sandygao Exp $
  + * @version $Id: AnyURIDV.java,v 1.3 2002/01/15 21:07:54 sandygao Exp $
    */
   public class AnyURIDV extends TypeValidator {
   
  @@ -95,7 +95,7 @@
                   new URI(BASE_URI, content );
               }
           } catch (URI.MalformedURIException ex) {
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is a Malformed URI");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "anyURI"});
           }
   
           // REVISIT: do we need to return the new URI object?
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/Base64BinaryDV.java
  
  Index: Base64BinaryDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/Base64BinaryDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Base64BinaryDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ Base64BinaryDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -67,7 +67,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: Base64BinaryDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: Base64BinaryDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class Base64BinaryDV extends TypeValidator {
   
  @@ -78,7 +78,7 @@
       public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
           String decoded = Base64.decode(content);
           if (decoded == null)
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not encoded in base64");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "base64Binary"});
   
           return decoded;
       }
  
  
  
  1.2       +2 -4      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/BooleanDV.java
  
  Index: BooleanDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/BooleanDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BooleanDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ BooleanDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -66,7 +66,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: BooleanDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: BooleanDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class BooleanDV extends TypeValidator{
   
  @@ -84,9 +84,7 @@
           else if (content.equals(fValueSpace[1]) || content.equals(fValueSpace[3]))
               ret = Boolean.TRUE;
           else
  -            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_BOOLEAN],
  -            //                                        new Object[]{content});
  -            throw new InvalidDatatypeValueException("'" + content + "' is not a valid boolean value");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "boolean"});
           return ret;
       }
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DateDV.java
  
  Index: DateDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DateDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DateDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ DateDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -66,7 +66,7 @@
    * @author Elena Litani
    * @Gopal Sharma, SUN Microsystems Inc.
    *
  - * @version $Id: DateDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: DateDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class DateDV extends DateTimeDV {
   
  @@ -74,7 +74,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid date");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "date"});
           }
       }
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DateTimeDV.java
  
  Index: DateTimeDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DateTimeDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DateTimeDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ DateTimeDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -66,7 +66,7 @@
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
    *
  - * @version $Id: DateTimeDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: DateTimeDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class DateTimeDV extends AbstractDateTimeDV {
   
  @@ -74,7 +74,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid dataTime");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "dateTime"});
           }
       }
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DayDV.java
  
  Index: DayDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DayDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DayDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ DayDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -65,7 +65,7 @@
    *
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
  - * @version $Id: DayDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: DayDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class DayDV extends AbstractDateTimeDV {
   
  @@ -76,7 +76,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid day");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gDay"});
           }
       }
   
  
  
  
  1.3       +2 -4      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DecimalDV.java
  
  Index: DecimalDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DecimalDV.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DecimalDV.java	30 Nov 2001 19:29:22 -0000	1.2
  +++ DecimalDV.java	15 Jan 2002 21:07:54 -0000	1.3
  @@ -67,7 +67,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: DecimalDV.java,v 1.2 2001/11/30 19:29:22 sandygao Exp $
  + * @version $Id: DecimalDV.java,v 1.3 2002/01/15 21:07:54 sandygao Exp $
    */
   public class DecimalDV extends TypeValidator {
   
  @@ -79,9 +79,7 @@
           try {
               return new BigDecimal( stripPlusIfPresent( content));
           } catch (Exception nfe) {
  -            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_DECIMAL],
  -            //                                        new Object[]{content});
  -            throw new InvalidDatatypeValueException("'" + content + "' is not a valid decimal value");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "decimal"});
           }
       } //getActualValue()
   
  
  
  
  1.3       +2 -4      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DoubleDV.java
  
  Index: DoubleDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DoubleDV.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DoubleDV.java	28 Nov 2001 17:54:52 -0000	1.2
  +++ DoubleDV.java	15 Jan 2002 21:07:54 -0000	1.3
  @@ -66,7 +66,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: DoubleDV.java,v 1.2 2001/11/28 17:54:52 sandygao Exp $
  + * @version $Id: DoubleDV.java,v 1.3 2002/01/15 21:07:54 sandygao Exp $
    */
   public class DoubleDV extends TypeValidator {
   
  @@ -79,9 +79,7 @@
           try{
               return dValueOf(content);
           } catch (Exception ex){
  -            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_DOUBLE ],
  -            //                                        new Object[]{content});
  -            throw new InvalidDatatypeValueException("'" + content + "' is not a valid double value");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "double"});
           }
       }//getActualValue()
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DurationDV.java
  
  Index: DurationDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/DurationDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DurationDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ DurationDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -65,7 +65,7 @@
    *
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
  - * @version $Id: DurationDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: DurationDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class DurationDV extends AbstractDateTimeDV {
   
  @@ -87,7 +87,7 @@
           try{
               return parse(content, null);
           } catch (Exception ex) {
  -            throw new InvalidDatatypeValueException("not a valid duration");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "duration"});
           }
       }
   
  
  
  
  1.2       +3 -3      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/EntityDV.java
  
  Index: EntityDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/EntityDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntityDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ EntityDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -67,7 +67,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: EntityDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: EntityDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class EntityDV extends TypeValidator {
   
  @@ -77,7 +77,7 @@
   
       public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
           if (!XMLChar.isValidNCName(content)) {
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "NCName"});
           }
   
           return content;
  @@ -85,7 +85,7 @@
   
       public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException {
           if (!context.isEntityDeclared((String)value)) {
  -            throw new InvalidDatatypeValueException("entity not declared");
  +            throw new InvalidDatatypeValueException("UndeclaredEntity", new Object[]{value});
           }
       }
   
  
  
  
  1.3       +2 -4      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/FloatDV.java
  
  Index: FloatDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/FloatDV.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FloatDV.java	28 Nov 2001 17:54:52 -0000	1.2
  +++ FloatDV.java	15 Jan 2002 21:07:54 -0000	1.3
  @@ -66,7 +66,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: FloatDV.java,v 1.2 2001/11/28 17:54:52 sandygao Exp $
  + * @version $Id: FloatDV.java,v 1.3 2002/01/15 21:07:54 sandygao Exp $
    */
   public class FloatDV extends TypeValidator {
   
  @@ -79,9 +79,7 @@
           try{
               return fValueOf(content);
           } catch (Exception ex){
  -            //throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_FLOAT ],
  -            //                                        new Object[]{content});
  -            throw new InvalidDatatypeValueException("'" + content + "' is not a valid float value");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "float"});
           }
       }//getActualValue()
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/HexBinaryDV.java
  
  Index: HexBinaryDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/HexBinaryDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- HexBinaryDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ HexBinaryDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -67,7 +67,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: HexBinaryDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: HexBinaryDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class HexBinaryDV extends TypeValidator {
   
  @@ -78,7 +78,7 @@
       public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
           String decoded = HexBin.decode(content);
           if (decoded == null)
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not encoded in Hex");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "hexBinary"});
   
           return decoded;
       }
  
  
  
  1.2       +3 -3      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/IDDV.java
  
  Index: IDDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/IDDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IDDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ IDDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -67,7 +67,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: IDDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: IDDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class IDDV extends TypeValidator{
   
  @@ -77,7 +77,7 @@
   
       public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
           if (!XMLChar.isValidNCName(content)) {
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "NCName"});
           }
           return content;
       }
  @@ -85,7 +85,7 @@
       public void checkExtraRules(Object value, ValidationContext context) throws InvalidDatatypeValueException {
           String content = (String)value;
           if (context.isIdDeclared(content))
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
  +            throw new InvalidDatatypeValueException("cvc-id.2", new Object[]{content});
           context.addId(content);
       }
   } // class IDDV
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/IDREFDV.java
  
  Index: IDREFDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/IDREFDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IDREFDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ IDREFDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -67,7 +67,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: IDREFDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: IDREFDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class IDREFDV extends TypeValidator{
   
  @@ -77,7 +77,7 @@
   
       public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException {
           if (!XMLChar.isValidNCName(content)) {
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid ID");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "NCName"});
           }
           return content;
       }
  
  
  
  1.5       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/MonthDV.java
  
  Index: MonthDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/MonthDV.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- MonthDV.java	4 Jan 2002 19:52:38 -0000	1.4
  +++ MonthDV.java	15 Jan 2002 21:07:54 -0000	1.5
  @@ -66,7 +66,7 @@
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
    *
  - * @version $Id: MonthDV.java,v 1.4 2002/01/04 19:52:38 sandygao Exp $
  + * @version $Id: MonthDV.java,v 1.5 2002/01/15 21:07:54 sandygao Exp $
    */
   
   public class MonthDV extends AbstractDateTimeDV {
  @@ -81,7 +81,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid month");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gMonth"});
           }
       }
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/MonthDayDV.java
  
  Index: MonthDayDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/MonthDayDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MonthDayDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ MonthDayDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -66,7 +66,7 @@
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
    *
  - * @version $Id: MonthDayDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: MonthDayDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   
   public class MonthDayDV extends AbstractDateTimeDV {
  @@ -84,7 +84,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid monthDay");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gMonthDay"});
           }
       }
   
  
  
  
  1.3       +4 -4      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/QNameDV.java
  
  Index: QNameDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/QNameDV.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- QNameDV.java	30 Nov 2001 19:29:22 -0000	1.2
  +++ QNameDV.java	15 Jan 2002 21:07:54 -0000	1.3
  @@ -68,7 +68,7 @@
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    * @author Sandy Gao, IBM
    *
  - * @version $Id: QNameDV.java,v 1.2 2001/11/30 19:29:22 sandygao Exp $
  + * @version $Id: QNameDV.java,v 1.3 2002/01/15 21:07:54 sandygao Exp $
    */
   public class QNameDV extends TypeValidator {
   
  @@ -95,15 +95,15 @@
   
           // both prefix (if any) and localpart must be valid NCName
           if (prefix.length() > 0 && !XMLChar.isValidNCName(prefix))
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid QName: '" + prefix + "' is not an NCName");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "QName"});
   
           if(!XMLChar.isValidNCName(localpart))
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid QName: '" + localpart + "' is not an NCName");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "QName"});
   
           // resove prefix to a uri, report an error if failed
           String uri = context.getURI(prefix);
           if (prefix.length() > 0 && uri == null)
  -            throw new InvalidDatatypeValueException("Value '"+content+"' is not a valid QName: cannot resolve the prefix to a namespace uri");
  +            throw new InvalidDatatypeValueException("UndeclaredPrefix", new Object[]{content, prefix});
   
           return new QName(prefix, context.getSymbol(localpart), context.getSymbol(content), uri);
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/TimeDV.java
  
  Index: TimeDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/TimeDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TimeDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ TimeDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -66,7 +66,7 @@
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
    *
  - * @version $Id: TimeDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: TimeDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   public class TimeDV extends AbstractDateTimeDV {
   
  @@ -80,7 +80,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid time");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "time"});
           }
       }
   
  
  
  
  1.6       +108 -223  xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/XSSimpleTypeDecl.java
  
  Index: XSSimpleTypeDecl.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/XSSimpleTypeDecl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XSSimpleTypeDecl.java	10 Jan 2002 17:10:23 -0000	1.5
  +++ XSSimpleTypeDecl.java	15 Jan 2002 21:07:54 -0000	1.6
  @@ -65,7 +65,6 @@
   import org.apache.xerces.impl.dv.InvalidDatatypeValueException;
   import org.apache.xerces.impl.dv.InvalidDatatypeFacetException;
   import org.apache.xerces.impl.dv.ValidatedInfo;
  -import org.apache.xerces.impl.dv.DatatypeMessageProvider;
   import org.apache.xerces.impl.validation.ValidationContext;
   import org.apache.xerces.impl.xs.XSTypeDecl;
   import org.apache.xerces.util.XMLChar;
  @@ -78,7 +77,7 @@
    * @author Sandy Gao, IBM
    * @author Neeraj Bajaj, Sun Microsystems, inc.
    *
  - * @version $Id: XSSimpleTypeDecl.java,v 1.5 2002/01/10 17:10:23 sandygao Exp $
  + * @version $Id: XSSimpleTypeDecl.java,v 1.6 2002/01/15 21:07:54 sandygao Exp $
    */
   class XSSimpleTypeDecl implements XSAtomicSimpleType, XSListSimpleType, XSUnionSimpleType {
   
  @@ -429,55 +428,46 @@
           // length
           if ((presentFacet & FACET_LENGTH) != 0) {
               if ((allowedFacet & FACET_LENGTH) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"length"});
               } else {
                   fLength = facets.length;
                   fFacetsDefined |= FACET_LENGTH;
                   if ((fixedFacet & FACET_LENGTH) != 0)
                       fFixedFacet |= FACET_LENGTH;
  -                // check 4.3.1.c0 must: length >= 0
  -                if (fLength < 0)
  -                    reportError("length value '"+facets.length+"' must be a nonNegativeInteger");
               }
           }
           // minLength
           if ((presentFacet & FACET_MINLENGTH) != 0) {
               if ((allowedFacet & FACET_MINLENGTH) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"minLength"});
               } else {
                   fMinLength = facets.minLength;
                   fFacetsDefined |= FACET_MINLENGTH;
                   if ((fixedFacet & FACET_MINLENGTH) != 0)
                       fFixedFacet |= FACET_MINLENGTH;
  -                // check 4.3.2.c0 must: minLength >= 0
  -                if (fMinLength < 0)
  -                    reportError("minLength value '"+facets.minLength+"' must be a nonNegativeInteger");
               }
           }
           // maxLength
           if ((presentFacet & FACET_MAXLENGTH) != 0) {
               if ((allowedFacet & FACET_MAXLENGTH) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"maxLength"});
               } else {
                   fMaxLength = facets.maxLength;
                   fFacetsDefined |= FACET_MAXLENGTH;
                   if ((fixedFacet & FACET_MAXLENGTH) != 0)
                       fFixedFacet |= FACET_MAXLENGTH;
  -                // check 4.3.3.c0 must: maxLength >= 0
  -                if (fMaxLength < 0)
  -                    reportError("maxLength value '"+facets.maxLength+"' must be a nonNegativeInteger");
               }
           }
           // pattern
           if ((presentFacet & FACET_PATTERN) != 0) {
               if ((allowedFacet & FACET_PATTERN) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"pattern"});
               } else {
                   RegularExpression regex = null;
                   try {
                       regex = new RegularExpression(facets.pattern, "X");
                   } catch (Exception e) {
  -                    reportError("pattern value '"+facets.pattern+"' is not valid: " + e.getLocalizedMessage());
  +                    reportError("InvalidRegex", new Object[]{facets.pattern, e.getLocalizedMessage()});
                   }
                   if (regex != null) {
                       fPattern = new Vector();
  @@ -492,7 +482,7 @@
           // enumeration
           if ((presentFacet & FACET_ENUMERATION) != 0) {
               if ((allowedFacet & FACET_ENUMERATION) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"enumeration"});
               } else {
                   fEnumeration = new Vector();
                   Vector enumVals = facets.enumeration;
  @@ -505,7 +495,7 @@
                           // check 4.3.5.c0 must: enumeration values from the value space of base
                           fEnumeration.addElement(this.fBase.validate((String)enumVals.elementAt(i), ctx, fTempInfo));
                       } catch (InvalidDatatypeValueException ide) {
  -                        reportError("Value of enumeration '" + enumVals.elementAt(i) + "' must be from the value space of base");
  +                        reportError("FacetValueFromBase", new Object[]{enumVals.elementAt(i), "enumeration"});
                       }
                   }
                   fFacetsDefined |= FACET_ENUMERATION;
  @@ -516,7 +506,7 @@
           // whiteSpace
           if ((presentFacet & FACET_WHITESPACE) != 0) {
               if ((allowedFacet & FACET_WHITESPACE) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"whiteSpace"});
               } else {
                   fWhiteSpace = facets.whiteSpace;
                   fFacetsDefined |= FACET_WHITESPACE;
  @@ -527,7 +517,7 @@
           // maxInclusive
           if ((presentFacet & FACET_MAXINCLUSIVE) != 0) {
               if ((allowedFacet & FACET_MAXINCLUSIVE) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"maxInclusive"});
               } else {
                   try {
                       fMaxInclusive = getActualValue(facets.maxInclusive, context, fTempInfo);
  @@ -535,14 +525,14 @@
                       if ((fixedFacet & FACET_MAXINCLUSIVE) != 0)
                           fFixedFacet |= FACET_MAXINCLUSIVE;
                   } catch (InvalidDatatypeValueException ide) {
  -                    reportError("maxInclusive value '"+facets.maxInclusive+"' is invalid");
  +                    reportError("FacetValueFromBase", new Object[]{facets.maxInclusive, "maxInclusive"});
                   }
               }
           }
           // maxExclusive
           if ((presentFacet & FACET_MAXEXCLUSIVE) != 0) {
               if ((allowedFacet & FACET_MAXEXCLUSIVE) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"maxExclusive"});
               } else {
                   try {
                       fMaxExclusive = getActualValue(facets.maxExclusive, context, fTempInfo);
  @@ -550,14 +540,14 @@
                       if ((fixedFacet & FACET_MAXEXCLUSIVE) != 0)
                           fFixedFacet |= FACET_MAXEXCLUSIVE;
                   } catch (InvalidDatatypeValueException ide) {
  -                    reportError("maxExclusive value '"+facets.maxExclusive+"' is invalid");
  +                    reportError("FacetValueFromBase", new Object[]{facets.maxExclusive, "maxExclusive"});
                   }
               }
           }
           // minExclusive
           if ((presentFacet & FACET_MINEXCLUSIVE) != 0) {
               if ((allowedFacet & FACET_MINEXCLUSIVE) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"minExclusive"});
               } else {
                   try {
                       fMinExclusive = getActualValue(facets.minExclusive, context, fTempInfo);
  @@ -565,14 +555,14 @@
                       if ((fixedFacet & FACET_MINEXCLUSIVE) != 0)
                           fFixedFacet |= FACET_MINEXCLUSIVE;
                   } catch (InvalidDatatypeValueException ide) {
  -                    reportError("minExclusive value '"+facets.minExclusive+"' is invalid");
  +                    reportError("FacetValueFromBase", new Object[]{facets.minExclusive, "minExclusive"});
                   }
               }
           }
           // minInclusive
           if ((presentFacet & FACET_MININCLUSIVE) != 0) {
               if ((allowedFacet & FACET_MININCLUSIVE) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"minInclusive"});
               } else {
                   try {
                       fMinInclusive = getActualValue(facets.minInclusive, context, fTempInfo);
  @@ -580,36 +570,30 @@
                       if ((fixedFacet & FACET_MININCLUSIVE) != 0)
                           fFixedFacet |= FACET_MININCLUSIVE;
                   } catch (InvalidDatatypeValueException ide) {
  -                    reportError("minInclusive value '"+facets.minInclusive+"' is invalid");
  +                    reportError("FacetValueFromBase", new Object[]{facets.minInclusive, "minInclusive"});
                   }
               }
           }
           // totalDigits
           if ((presentFacet & FACET_TOTALDIGITS) != 0) {
               if ((allowedFacet & FACET_TOTALDIGITS) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"totalDigits"});
               } else {
                   fTotalDigits = facets.totalDigits;
                   fFacetsDefined |= FACET_TOTALDIGITS;
                   if ((fixedFacet & FACET_TOTALDIGITS) != 0)
                       fFixedFacet |= FACET_TOTALDIGITS;
  -                // check 4.3.11.c0 must: totalDigits > 0
  -                if (fTotalDigits <= 0)
  -                    reportError("totalDigits value '"+facets.totalDigits+"' must be a positiveInteger");
               }
           }
           // fractionDigits
           if ((presentFacet & FACET_FRACTIONDIGITS) != 0) {
               if ((allowedFacet & FACET_FRACTIONDIGITS) == 0) {
  -                reportError("non-supported facet");
  +                reportError("cos-applicable-facets", new Object[]{"fractionDigits"});
               } else {
                   fFractionDigits = facets.fractionDigits;
                   fFacetsDefined |= FACET_FRACTIONDIGITS;
                   if ((fixedFacet & FACET_FRACTIONDIGITS) != 0)
                       fFixedFacet |= FACET_FRACTIONDIGITS;
  -                // check 4.3.12.c0 must: fractionDigits >= 0
  -                if (fFractionDigits < 0)
  -                    reportError("fractionDigits value '"+facets.fractionDigits+"' must be a positiveInteger");
               }
           }
   
  @@ -623,11 +607,9 @@
   
               // check 4.3.1.c1 error: length & (maxLength | minLength)
               if((fFacetsDefined & FACET_LENGTH) != 0 ){
  -              if( (fFacetsDefined & FACET_MINLENGTH) != 0 ){
  -                reportError("it is an error for both length and min length to be present" );
  -              }
  -              else if((fFacetsDefined & FACET_MAXLENGTH) != 0 ){
  -                reportError("it is an error for both length and max length to be present" );
  +              if ((fFacetsDefined & FACET_MINLENGTH) != 0 ||
  +                  (fFacetsDefined & FACET_MAXLENGTH) != 0 ) {
  +                  reportError("length-minLength-maxLength", null);
                 }
               }
   
  @@ -635,82 +617,71 @@
               if(((fFacetsDefined & FACET_MINLENGTH ) != 0 ) && ((fFacetsDefined & FACET_MAXLENGTH) != 0))
               {
                 if(fMinLength > fMaxLength)
  -                reportError("value of minLength = " + fMinLength + "must  be less than value of maxLength = "+ fMaxLength);
  +                reportError("minLength-less-than-equal-to-maxLength", new Object[]{Integer.toString(fMinLength), Integer.toString(fMaxLength)});
               }
   
               // check 4.3.8.c1 error: maxInclusive + maxExclusive
               if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
  -                reportError( "It is an error for both maxInclusive and maxExclusive to be specified for the same datatype" );
  +                reportError( "maxInclusive-maxExclusive", null);
               }
   
               // check 4.3.9.c1 error: minInclusive + minExclusive
               if (((fFacetsDefined & FACET_MINEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
  -                reportError("It is an error for both minInclusive and minExclusive to be specified for the same datatype" );
  +                reportError("minInclusive-minExclusive", null);
               }
   
               // check 4.3.7.c1 must: minInclusive <= maxInclusive
               if (((fFacetsDefined &  FACET_MAXINCLUSIVE) != 0) && ((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
                 result = fDVs[fValidationDV].compare(fMinInclusive, fMaxInclusive);
                 if (result != -1 && result != 0)
  -                reportError("minInclusive value ='" + getStringValue(fMinInclusive) + "'must be <= maxInclusive value ='" +
  -                    getStringValue(fMaxInclusive) + "'. " );
  +                reportError("minInclusive-less-than-equal-to-maxInclusive", new Object[]{getStringValue(fMinInclusive), getStringValue(fMaxInclusive)});
               }
   
               // check 4.3.8.c2 must: minExclusive <= maxExclusive ??? minExclusive < maxExclusive
               if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
                 result = fDVs[fValidationDV].compare(fMinExclusive, fMaxExclusive);
                 if (result != -1 && result != 0)
  -                reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be <= maxExclusive value ='" +
  -                                                        getStringValue(fMaxExclusive) + "'. " );
  +                reportError( "minExclusive-less-than-equal-to-maxExclusive", new Object[]{getStringValue(fMinExclusive), getStringValue(fMaxExclusive)});
               }
   
               // check 4.3.9.c2 must: minExclusive < maxInclusive
               if (((fFacetsDefined & FACET_MAXINCLUSIVE) != 0) && ((fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
                 if (fDVs[fValidationDV].compare(fMinExclusive, fMaxInclusive) != -1)
  -                reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be < maxInclusive value ='" +
  -                                                                     getStringValue(fMaxInclusive) + "'. " );
  +                reportError( "minExclusive-less-than-maxInclusive", new Object[]{getStringValue(fMinExclusive), getStringValue(fMaxInclusive)});
               }
   
               // check 4.3.10.c1 must: minInclusive < maxExclusive
               if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) && ((fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
                 if (fDVs[fValidationDV].compare(fMinInclusive, fMaxExclusive) != -1)
  -                reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be < maxExclusive value ='" +
  -                                                                     getStringValue(fMaxExclusive) + "'. " );
  +                reportError( "minInclusive-less-than-maxExclusive", new Object[]{getStringValue(fMinInclusive), getStringValue(fMaxExclusive)});
               }
   
               // check 4.3.12.c1 must: fractionDigits <= totalDigits
               if (((fFacetsDefined & FACET_FRACTIONDIGITS) != 0) &&
                   ((fFacetsDefined & FACET_TOTALDIGITS) != 0)) {
                   if (fFractionDigits > fTotalDigits)
  -                    reportError( "fractionDigits value ='" + this.fFractionDigits + "' must be <= totalDigits value ='" +
  -                                                             this.fTotalDigits + "'. " );
  +                    reportError( "fractionDigits-totalDigits", new Object[]{Integer.toString(fFractionDigits), Integer.toString(fTotalDigits)});
               }
   
               // step 3: check facets against base
               // check 4.3.1.c1 error: length & (fBase.maxLength | fBase.minLength)
               if ( ((fFacetsDefined & FACET_LENGTH ) != 0 ) ) {
  -
  -                if ( ((fBase.fFacetsDefined & FACET_MAXLENGTH ) != 0 ) ) {
  -                    reportError("It is an error for both length and maxLength to be members of facets" );
  -                }
  -                else if ( ((fBase.fFacetsDefined & FACET_MINLENGTH ) != 0 ) ) {
  -                    reportError("It is an error for both length and minLength to be members of facets" );
  +                if ((fBase.fFacetsDefined & FACET_MAXLENGTH ) != 0 ||
  +                    (fBase.fFacetsDefined & FACET_MINLENGTH ) != 0 ) {
  +                    reportError("length-minLength-maxLength", null);
                   }
                   else if ( (fBase.fFacetsDefined & FACET_LENGTH) != 0 ) {
                       // check 4.3.1.c2 error: length != fBase.length
                       if ( fLength != fBase.fLength )
  -                        reportError( "Value of length = '" + fLength +
  -                                                                 "' must be = the value of fBase.length = '" + fBase.fLength + "'");
  +                        reportError( "length-valid-restriction", new Object[]{Integer.toString(fLength), Integer.toString(fBase.fLength)});
                   }
               }
   
               // check 4.3.1.c1 error: fBase.length & (maxLength | minLength)
               if ( ((fBase.fFacetsDefined & FACET_LENGTH ) != 0 ) ) {
  -                if ( ((fFacetsDefined & FACET_MAXLENGTH ) != 0 ) ) {
  -                    reportError("It is an error for both length and maxLength to be members of facets" );
  -                }
  -                else if ( ((fFacetsDefined & FACET_MINLENGTH ) != 0 ) ) {
  -                    reportError("It is an error for both length and minLength to be members of facets" );
  +                if ((fFacetsDefined & FACET_MAXLENGTH ) != 0 ||
  +                    (fFacetsDefined & FACET_MINLENGTH ) != 0 ) {
  +                    reportError("length-minLength-maxLength", null);
                   }
               }
   
  @@ -718,32 +689,26 @@
               if ( ((fFacetsDefined & FACET_MINLENGTH ) != 0 ) ) {
                   if ( (fBase.fFacetsDefined & FACET_MAXLENGTH ) != 0 ) {
                       if ( fMinLength > fBase.fMaxLength ) {
  -                        reportError( "Value of minLength = '" + fMinLength +
  -                                                                 "' must be <= the value of maxLength = '" + fMaxLength + "'");
  +                        reportError("minLength-less-than-equal-to-maxLength", new Object[]{Integer.toString(fMinLength), Integer.toString(fBase.fMaxLength)});
                       }
                   }
                   else if ( (fBase.fFacetsDefined & FACET_MINLENGTH) != 0 ) {
                       if ( (fBase.fFixedFacet & FACET_MINLENGTH) != 0 && fMinLength != fBase.fMinLength ) {
  -                        reportError( "minLength value = '" + fMinLength +
  -                                                                 "' must be equal to fBase.minLength value = '" +
  -                                                                 fBase.fMinLength + "' with attribute {fixed} = true" );
  +                        reportError( "FixedFacetValue", new Object[]{"minLength", Integer.toString(fMinLength), Integer.toString(fBase.fMinLength)});
                       }
   
                       // check 4.3.2.c2 error: minLength < fBase.minLength
                       if ( fMinLength < fBase.fMinLength ) {
  -                        reportError( "Value of minLength = '" + fMinLength +
  -                                                                 "' must be >= the value of fBase.minLength = '" + fBase.fMinLength + "'");
  +                        reportError( "minLength-valid-restriction", new Object[]{Integer.toString(fMinLength), Integer.toString(fBase.fMinLength)});
                       }
                   }
               }
   
   
               // check 4.3.2.c1 must: maxLength < fBase.minLength
  -            if ( ((fFacetsDefined & FACET_MAXLENGTH ) != 0 ) && ((fBase.fFacetsDefined & FACET_MINLENGTH ) != 0 ))
  -            {
  +            if ( ((fFacetsDefined & FACET_MAXLENGTH ) != 0 ) && ((fBase.fFacetsDefined & FACET_MINLENGTH ) != 0 )) {
                   if ( fMaxLength < fBase.fMinLength) {
  -                    reportError( "Value of maxLength = '" + fMaxLength +
  -                                                             "' must be >= the value of fBase.minLength = '" + fBase.fMinLength + "'");
  +                    reportError("minLength-less-than-equal-to-maxLength", new Object[]{Integer.toString(fBase.fMinLength), Integer.toString(fMaxLength)});
                   }
               }
   
  @@ -751,13 +716,10 @@
               if ( (fFacetsDefined & FACET_MAXLENGTH) != 0 ) {
                   if ( (fBase.fFacetsDefined & FACET_MAXLENGTH) != 0 ){
                       if(( (fBase.fFixedFacet & FACET_MAXLENGTH) != 0 )&& fMaxLength != fBase.fMaxLength ) {
  -                        reportError( "maxLength value = '" + fMaxLength +
  -                                                             "' must be equal to fBase.maxLength value = '" +
  -                                                             fBase.fMaxLength + "' with attribute {fixed} = true" );
  +                        reportError( "FixedFacetValue", new Object[]{"maxLength", Integer.toString(fMaxLength), Integer.toString(fBase.fMaxLength)});
                       }
                       if ( fMaxLength > fBase.fMaxLength ) {
  -                        reportError( "Value of maxLength = '" + fMaxLength +
  -                                                                 "' must be <= the value of fBase.maxLength = '" + fBase.fMaxLength + "'");
  +                        reportError( "maxLength-valid-restriction", new Object[]{Integer.toString(fMaxLength), Integer.toString(fBase.fMaxLength)});
                       }
                   }
               }
  @@ -772,35 +734,28 @@
               if (((fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
                   if (((fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
                       result = fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMaxInclusive);
  -
                       if ((fBase.fFixedFacet & FACET_MAXINCLUSIVE) != 0 && result != 0) {
  -                            reportError( "maxInclusive value = '" + getStringValue(fMaxInclusive) +
  -                                                                 "' must be equal to fBase.maxInclusive value = '" +
  -                                                                 getStringValue(fBase.fMaxInclusive) + "' with attribute {fixed} = true" );
  +                        reportError( "FixedFacetValue", new Object[]{"maxInclusive", getStringValue(fMaxInclusive), getStringValue(fBase.fMaxInclusive)});
                       }
                       if (result != -1 && result != 0) {
  -                        reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be <= fBase.maxInclusive value ='" +
  -                                                                 getStringValue(fBase.fMaxInclusive) + "'" );
  +                        reportError( "maxInclusive-valid-restriction.1", new Object[]{getStringValue(fMaxInclusive), getStringValue(fBase.fMaxInclusive)});
                       }
                   }
                   if (((fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) &&
                       fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMaxExclusive) != -1){
  -                        reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be < fBase.maxExclusive value ='" +
  -                                                           getStringValue(fBase.fMaxExclusive) + "'" );
  +                        reportError( "maxInclusive-valid-restriction.1", new Object[]{getStringValue(fMaxInclusive), getStringValue(fBase.fMaxExclusive)});
                   }
   
                   if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0)) {
                       result = fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMinInclusive);
                       if (result != 1 && result != 0) {
  -                        reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be >= fBase.minInclusive value ='" +
  -                                                                 getStringValue(fBase.fMinInclusive) + "'" );
  +                        reportError( "maxInclusive-valid-restriction.1", new Object[]{getStringValue(fMaxInclusive), getStringValue(fBase.fMinInclusive)});
                       }
                   }
   
                   if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) &&
                       fDVs[fValidationDV].compare(fMaxInclusive, fBase.fMinExclusive ) != 1)
  -                    reportError( "maxInclusive value ='" + getStringValue(fMaxInclusive) + "' must be > fBase.minExclusive value ='" +
  -                                                           getStringValue(fBase.fMinExclusive) + "'" );
  +                    reportError( "maxInclusive-valid-restriction.1", new Object[]{getStringValue(fMaxInclusive), getStringValue(fBase.fMinExclusive)});
               }
   
               // check 4.3.8.c3 error:
  @@ -811,55 +766,43 @@
               if (((fFacetsDefined & FACET_MAXEXCLUSIVE) != 0)) {
                   if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0)) {
                       result= fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMaxExclusive);
  -
                       if ((fBase.fFixedFacet & FACET_MAXEXCLUSIVE) != 0 &&  result != 0) {
  -                        reportError( "maxExclusive value = '" + getStringValue(fMaxExclusive) +
  -                                                                 "' must be equal to fBase.maxExclusive value = '" +
  -                                                                 getStringValue(fBase.fMaxExclusive) + "' with attribute {fixed} = true" );
  +                        reportError( "FixedFacetValue", new Object[]{"maxExclusive", getStringValue(fMaxExclusive), getStringValue(fBase.fMaxExclusive)});
                       }
                       if (result != -1 && result != 0) {
  -                        reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be < fBase.maxExclusive value ='" +
  -                                                                 getStringValue(fBase.fMaxExclusive) + "'" );
  +                        reportError( "maxExclusive-valid-restriction.1", new Object[]{getStringValue(fMaxExclusive), getStringValue(fBase.fMaxExclusive)});
                       }
                   }
   
                   if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
                       result= fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMaxInclusive);
                       if (result != -1 && result != 0) {
  -                        reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be <= fBase.maxInclusive value ='" +
  -                                                                 getStringValue(fBase.fMaxInclusive) + "'" );
  +                        reportError( "maxExclusive-valid-restriction.2", new Object[]{getStringValue(fMaxExclusive), getStringValue(fBase.fMaxInclusive)});
                       }
                   }
   
                   if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) &&
                       fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMinExclusive ) != 1)
  -                    reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be > fBase.minExclusive value ='" +
  -                                                             getStringValue(fBase.fMinExclusive) + "'" );
  +                    reportError( "maxExclusive-valid-restriction.3", new Object[]{getStringValue(fMaxExclusive), getStringValue(fBase.fMinExclusive)});
   
                   if ((( fBase.fFacetsDefined & FACET_MININCLUSIVE) != 0) &&
                       fDVs[fValidationDV].compare(fMaxExclusive, fBase.fMinInclusive) != 1)
  -                    reportError( "maxExclusive value ='" + getStringValue(fMaxExclusive) + "' must be > fBase.minInclusive value ='" +
  -                                                             getStringValue(fBase.fMinInclusive) + "'" );
  +                    reportError( "maxExclusive-valid-restriction.4", new Object[]{getStringValue(fMaxExclusive), getStringValue(fBase.fMinInclusive)});
               }
   
               // check 4.3.9.c3 error:
               // minExclusive < fBase.minExclusive
  -            // maxInclusive > fBase.maxInclusive
  -            // minInclusive < fBase.minInclusive
  -            // maxExclusive >= fBase.maxExclusive
  +            // minExclusive > fBase.maxInclusive
  +            // minExclusive < fBase.minInclusive
  +            // minExclusive >= fBase.maxExclusive
               if (((fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
                   if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0)) {
  -
                       result= fDVs[fValidationDV].compare(fMinExclusive, fBase.fMinExclusive);
  -                    if ((fBase.fFixedFacet & FACET_MINEXCLUSIVE) != 0 &&
  -                        result != 0) {
  -                        reportError( "minExclusive value = '" + getStringValue(fMinExclusive) +
  -                                                                 "' must be equal to fBase.minExclusive value = '" +
  -                                                                 getStringValue(fBase.fMinExclusive) + "' with attribute {fixed} = true" );
  +                    if ((fBase.fFixedFacet & FACET_MINEXCLUSIVE) != 0 && result != 0) {
  +                        reportError( "FixedFacetValue", new Object[]{"minExclusive", getStringValue(fMinExclusive), getStringValue(fBase.fMinExclusive)});
                       }
                       if (result != 1 && result != 0) {
  -                        reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be >= fBase.minExclusive value ='" +
  -                                                                 getStringValue(fBase.fMinExclusive) + "'" );
  +                        reportError( "minExclusive-valid-restriction.1", new Object[]{getStringValue(fMinExclusive), getStringValue(fBase.fMinExclusive)});
                       }
                   }
   
  @@ -867,8 +810,7 @@
                       result=fDVs[fValidationDV].compare(fMinExclusive, fBase.fMaxInclusive);
   
                       if (result != -1 && result != 0) {
  -                        reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be <= fBase.maxInclusive value ='" +
  -                                                               getStringValue(fBase.fMaxInclusive) + "'" );
  +                        reportError( "minExclusive-valid-restriction.2", new Object[]{getStringValue(fMinExclusive), getStringValue(fBase.fMaxInclusive)});
                       }
                   }
   
  @@ -876,15 +818,13 @@
                       result = fDVs[fValidationDV].compare(fMinExclusive, fBase.fMinInclusive);
   
                       if (result != 1 && result != 0) {
  -                        reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be >= fBase.minInclusive value ='" +
  -                                                               getStringValue(fBase.fMinInclusive) + "'" );
  +                        reportError( "minExclusive-valid-restriction.3", new Object[]{getStringValue(fMinExclusive), getStringValue(fBase.fMinInclusive)});
                       }
                   }
   
                   if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) &&
                       fDVs[fValidationDV].compare(fMinExclusive, fBase.fMaxExclusive) != -1)
  -                    reportError( "minExclusive value ='" + getStringValue(fMinExclusive) + "' must be < fBase.maxExclusive value ='" +
  -                                                             getStringValue(fBase.fMaxExclusive) + "'" );
  +                    reportError( "minExclusive-valid-restriction.4", new Object[]{getStringValue(fMinExclusive), getStringValue(fBase.fMaxExclusive)});
               }
   
               // check 4.3.10.c2 error:
  @@ -897,44 +837,34 @@
                       result = fDVs[fValidationDV].compare(fMinInclusive, fBase.fMinInclusive);
   
                       if ((fBase.fFixedFacet & FACET_MININCLUSIVE) != 0 && result != 0) {
  -                        reportError( "minInclusive value = '" + getStringValue(fMinInclusive) +
  -                                                                 "' must be equal to fBase.minInclusive value = '" +
  -                                                                 getStringValue(fBase.fMinInclusive) + "' with attribute {fixed} = true" );
  +                        reportError( "FixedFacetValue", new Object[]{"minInclusive", getStringValue(fMinInclusive), getStringValue(fBase.fMinInclusive)});
                       }
                       if (result != 1 && result != 0) {
  -                        reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be >= fBase.minInclusive value ='" +
  -                                                                 getStringValue(fBase.fMinInclusive) + "'" );
  +                        reportError( "minInclusive-valid-restriction.1", new Object[]{getStringValue(fMinInclusive), getStringValue(fBase.fMinInclusive)});
                       }
                   }
                   if ((( fBase.fFacetsDefined & FACET_MAXINCLUSIVE) != 0)) {
                       result=fDVs[fValidationDV].compare(fMinInclusive, fBase.fMaxInclusive);
                       if (result != -1 && result != 0) {
  -                        reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be <= fBase.maxInclusive value ='" +
  -                                                                 getStringValue(fBase.fMaxInclusive) + "'" );
  +                        reportError( "minInclusive-valid-restriction.2", new Object[]{getStringValue(fMinInclusive), getStringValue(fBase.fMaxInclusive)});
                       }
                   }
                   if ((( fBase.fFacetsDefined & FACET_MINEXCLUSIVE) != 0) &&
                       fDVs[fValidationDV].compare(fMinInclusive, fBase.fMinExclusive ) != 1)
  -                    reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be > fBase.minExclusive value ='" +
  -                                                             getStringValue(fBase.fMinExclusive) + "'" );
  +                    reportError( "minInclusive-valid-restriction.3", new Object[]{getStringValue(fMinInclusive), getStringValue(fBase.fMinExclusive)});
                   if ((( fBase.fFacetsDefined & FACET_MAXEXCLUSIVE) != 0) &&
                       fDVs[fValidationDV].compare(fMinInclusive, fBase.fMaxExclusive) != -1)
  -                    reportError( "minInclusive value ='" + getStringValue(fMinInclusive) + "' must be < fBase.maxExclusive value ='" +
  -                                                             getStringValue(fBase.fMaxExclusive) + "'" );
  +                    reportError( "minInclusive-valid-restriction.4", new Object[]{getStringValue(fMinInclusive), getStringValue(fBase.fMaxExclusive)});
               }
   
               // check 4.3.11.c1 error: totalDigits > fBase.totalDigits
               if (((fFacetsDefined & FACET_TOTALDIGITS) != 0)) {
                   if ((( fBase.fFacetsDefined & FACET_TOTALDIGITS) != 0)) {
  -                    if (fTotalDigits > fBase.fTotalDigits) {
  -                        reportError("totalDigits value = '" + fTotalDigits +
  -                                                                "' must be equal to fBase.totalDigits value = '" +
  -                                                                fBase.fTotalDigits +
  -                                                                "' with attribute {fixed} = true" );
  +                    if ((fBase.fFixedFacet & FACET_TOTALDIGITS) != 0 && fTotalDigits != fBase.fTotalDigits) {
  +                        reportError("FixedFacetValue", new Object[]{"totalDigits", Integer.toString(fTotalDigits), Integer.toString(fBase.fTotalDigits)});
                       }
                       if (fTotalDigits > fBase.fTotalDigits) {
  -                        reportError( "totalDigits value ='" + fTotalDigits + "' must be <= fBase.totalDigits value ='" +
  -                                                                 fBase.fTotalDigits + "'" );
  +                        reportError( "totalDigits-valid-restriction", new Object[]{Integer.toString(fTotalDigits), Integer.toString(fBase.fTotalDigits)});
                       }
                   }
               }
  @@ -943,10 +873,7 @@
               if (((fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) {
                   if ((( fBase.fFacetsDefined & FACET_FRACTIONDIGITS) != 0)) {
                       if ((fBase.fFixedFacet & FACET_FRACTIONDIGITS) != 0 && fFractionDigits != fBase.fFractionDigits) {
  -                        reportError("fractionDigits value = '" + fFractionDigits +
  -                                                                "' must be equal to fBase.fractionDigits value = '" +
  -                                                                fBase.fFractionDigits +
  -                                                                "' with attribute {fixed} = true" );
  +                        reportError("FixedFacetValue", new Object[]{"fractionDigits", Integer.toString(fFractionDigits), Integer.toString( fBase.fFractionDigits)});
                       }
                   }
               }
  @@ -957,16 +884,14 @@
   
               if ( (fFacetsDefined & FACET_WHITESPACE) != 0 && (fBase.fFacetsDefined & FACET_WHITESPACE) != 0 ){
                   if ( (fBase.fFixedFacet & FACET_WHITESPACE) != 0 &&  fWhiteSpace != fBase.fWhiteSpace ) {
  -                    reportError( "whiteSpace value = '" + whiteSpaceValue(fWhiteSpace) +
  -                                 "' must be equal to fBase.whiteSpace value = '" +
  -                                 whiteSpaceValue(fBase.fWhiteSpace) + "' with attribute {fixed} = true" );
  +                    reportError( "FixedFacetValue", new Object[]{"whiteSpace", whiteSpaceValue(fWhiteSpace), whiteSpaceValue(fBase.fWhiteSpace)});
                   }
   
                   if ( (fWhiteSpace == WS_PRESERVE || fWhiteSpace == WS_REPLACE) &&  fBase.fWhiteSpace == WS_COLLAPSE ){
  -                    reportError( "It is an error if whiteSpace = 'preserve' or 'replace' and fBase.whiteSpace = 'collapse'");
  +                    reportError( "whiteSpace-valid-restriction.1", null);
                   }
                   if ( fWhiteSpace == WS_PRESERVE &&  fBase.fWhiteSpace == WS_REPLACE ){
  -                    reportError( "It is an error if whiteSpace = 'preserve' and fBase.whiteSpace = 'replace'");
  +                    reportError( "whiteSpace-valid-restriction.2", null);
                   }
               }
           }//fFacetsDefined != null
  @@ -1111,27 +1036,24 @@
           // maxLength
           if ( (fFacetsDefined & FACET_MAXLENGTH) != 0 ) {
               if ( length > fMaxLength ) {
  -                throw new InvalidDatatypeValueException("Value '"+content+
  -                                                        "' with length '"+length+
  -                                                        "' exceeds maximum length facet of '"+fMaxLength+"'");
  +                throw new InvalidDatatypeValueException("cvc-maxLength-valid",
  +                                                        new Object[]{content, Integer.toString(length), Integer.toString(fMaxLength)});
               }
           }
   
           //minLength
           if ( (fFacetsDefined & FACET_MINLENGTH) != 0 ) {
               if ( length < fMinLength ) {
  -                throw new InvalidDatatypeValueException("Value '"+content+
  -                                                        "' with length '"+length+
  -                                                        "' is less than minimum length facet of '"+fMinLength+"'" );
  +                throw new InvalidDatatypeValueException("cvc-minLength-valid",
  +                                                        new Object[]{content, Integer.toString(length), Integer.toString(fMinLength)});
               }
           }
   
           //length
           if ( (fFacetsDefined & FACET_LENGTH) != 0 ) {
               if ( length != fLength ) {
  -                throw new InvalidDatatypeValueException("Value '"+content+
  -                                                        "' with length '"+length+
  -                                                        "' is not equal to length facet '"+fLength+"'");
  +                throw new InvalidDatatypeValueException("cvc-length-valid",
  +                                                        new Object[]{content, Integer.toString(length), Integer.toString(fLength)});
               }
           }
   
  @@ -1145,8 +1067,8 @@
                   }
               }
               if(!present){
  -                throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.NOT_ENUM_VALUE],
  -                                                        new Object [] {content});
  +                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
  +                                                        new Object [] {content, fEnumeration.toString()});
               }
           }
   
  @@ -1154,11 +1076,8 @@
           if ((fFacetsDefined & FACET_FRACTIONDIGITS) != 0) {
               int scale = fDVs[fValidationDV].getFractionDigits(ob);
               if (scale > fFractionDigits) {
  -                throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.FRACTION_EXCEEDED],
  -                                           new Object[] {
  -                                               "'" + content + "'" + " with fractionDigits = '"+ scale +"'",
  -                                               "'" + fFractionDigits + "'"
  -                                           });
  +                throw new InvalidDatatypeValueException("cvc-fractionDigits-valid",
  +                                                        new Object[] {content, Integer.toString(scale), Integer.toString(fFractionDigits)});
               }
           }
   
  @@ -1166,83 +1085,49 @@
           if ((fFacetsDefined & FACET_TOTALDIGITS)!=0) {
               int totalDigits = fDVs[fValidationDV].getTotalDigits(ob);
               if (totalDigits > fTotalDigits) {
  -                throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.TOTALDIGITS_EXCEEDED],
  -                                           new Object[] {
  -                                               "'" + content + "'" + " with totalDigits = '"+ totalDigits +"'",
  -                                               "'" + fTotalDigits + "'"
  -                                           });
  +                throw new InvalidDatatypeValueException("cvc-totalDigits-valid",
  +                                                        new Object[] {content, Integer.toString(totalDigits), Integer.toString(fTotalDigits)});
               }
           }
   
  -
  -        // REVISIT this part for error reporting
  -
  -        boolean minOk = true;
  -        boolean maxOk = true;
  -        String  upperBound="";
  -
  -        String  lowerBound="";
  -        String  lowerBoundIndicator = "";
  -        String  upperBoundIndicator = "";
           int compare;
   
           //maxinclusive
           if ( (fFacetsDefined & FACET_MAXINCLUSIVE) != 0 ) {
               compare = fDVs[fValidationDV].compare(ob, fMaxInclusive);
  -            maxOk = (compare == -1 || compare == 0);
  -            upperBound   = fMaxInclusive.toString();
  -            if ( upperBound != null ) {
  -                upperBoundIndicator = "<=";
  -            }
  -            else {
  -                upperBound="";
  +            if (compare != -1 && compare != 0) {
  +                throw new InvalidDatatypeValueException("cvc-maxInclusive-valid",
  +                                                        new Object[] {content, fMaxInclusive});
               }
           }
   
           //maxExclusive
           if ( (fFacetsDefined & FACET_MAXEXCLUSIVE) != 0 ) {
  -            compare = fDVs[fValidationDV].compare(ob,  fMaxExclusive );
  -            maxOk = (compare == -1);
  -            upperBound = fMaxExclusive.toString();
  -            if ( upperBound != null ) {
  -                upperBoundIndicator = "<";
  -            }
  -            else {
  -                upperBound = "";
  +            compare = fDVs[fValidationDV].compare(ob, fMaxExclusive );
  +            if (compare != -1) {
  +                throw new InvalidDatatypeValueException("cvc-maxExclusive-valid",
  +                                                        new Object[] {content, fMaxExclusive});
               }
           }
   
           //minInclusive
           if ( (fFacetsDefined & FACET_MININCLUSIVE) != 0 ) {
               compare = fDVs[fValidationDV].compare(ob, fMinInclusive);
  -            minOk = (compare == 1 || compare == 0);
  -            lowerBound = fMinInclusive.toString();
  -            if ( lowerBound != null ) {
  -                lowerBoundIndicator = "<=";
  -            }
  -            else {
  -                lowerBound = "";
  +            if (compare != 1 && compare != 0) {
  +                throw new InvalidDatatypeValueException("cvc-minInclusive-valid",
  +                                                        new Object[] {content, fMinInclusive});
               }
           }
   
           //minExclusive
           if ( (fFacetsDefined & FACET_MINEXCLUSIVE) != 0 ) {
               compare = fDVs[fValidationDV].compare(ob, fMinExclusive);
  -            minOk = (compare == 1);
  -            lowerBound = fMinExclusive.toString();
  -            if ( lowerBound != null ) {
  -                lowerBoundIndicator = "<";
  -            }
  -            else {
  -                lowerBound = "";
  +            if (compare != 1) {
  +                throw new InvalidDatatypeValueException("cvc-minExclusive-valid",
  +                                                        new Object[] {content, fMinExclusive});
               }
           }
   
  -        if ( !(minOk && maxOk) ){
  -            throw new InvalidDatatypeValueException(DatatypeMessageProvider.fgMessageKeys[DatatypeMessageProvider.OUT_OF_BOUNDS],
  -                new Object [] { ob.toString(), lowerBound, upperBound, lowerBoundIndicator, upperBoundIndicator});
  -        }
  -
       }
   
       private void checkExtraRules(ValidationContext context, ValidatedInfo validatedInfo) throws InvalidDatatypeValueException {
  @@ -1306,8 +1191,8 @@
                       seenErr = !XMLChar.isValidNCName(nvalue);
                   }
                   if (seenErr) {
  -                    throw new InvalidDatatypeValueException("Value '"+nvalue+"' is not a valid " +
  -                                                            SPECIAL_TOKEN_STRING[fTokenType]);
  +                    throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1",
  +                                                            new Object[]{nvalue, SPECIAL_TOKEN_STRING[fTokenType]});
                   }
               }
   
  @@ -1316,8 +1201,8 @@
                   for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                       regex = (RegularExpression)fPattern.elementAt(idx);
                       if (!regex.matches(nvalue)){
  -                        throw new InvalidDatatypeValueException("Value '"+content+
  -                                                                "' does not match regular expression facet '" + regex + "'" );
  +                        throw new InvalidDatatypeValueException("cvc-pattern-valid",
  +                                                                new Object[]{content, regex});
                       }
                   }
               }
  @@ -1377,8 +1262,8 @@
                   }
               }
   
  -            String msg  = " content = " + content + " doesnt't match any of the member types " ;
  -            throw new InvalidDatatypeValueException(msg);
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.2",
  +                                                    new Object[]{content, fTypeName});
           }
   
       }//getActualValue()
  @@ -1466,8 +1351,8 @@
           return sb.toString();
       }
   
  -    void reportError(String msg) throws InvalidDatatypeFacetException {
  -        throw new InvalidDatatypeFacetException(msg);
  +    void reportError(String key, Object[] args) throws InvalidDatatypeFacetException {
  +        throw new InvalidDatatypeFacetException(key, args);
       }
   
   
  
  
  
  1.2       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/YearDV.java
  
  Index: YearDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/YearDV.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- YearDV.java	19 Nov 2001 20:13:01 -0000	1.1
  +++ YearDV.java	15 Jan 2002 21:07:54 -0000	1.2
  @@ -66,7 +66,7 @@
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
    *
  - * @version $Id: YearDV.java,v 1.1 2001/11/19 20:13:01 sandygao Exp $
  + * @version $Id: YearDV.java,v 1.2 2002/01/15 21:07:54 sandygao Exp $
    */
   
   public class YearDV extends AbstractDateTimeDV {
  @@ -81,7 +81,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid year");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gYear"});
           }
       }
   
  
  
  
  1.3       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/YearMonthDV.java
  
  Index: YearMonthDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs_new/YearMonthDV.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- YearMonthDV.java	28 Nov 2001 17:54:52 -0000	1.2
  +++ YearMonthDV.java	15 Jan 2002 21:07:54 -0000	1.3
  @@ -66,7 +66,7 @@
    * @author Elena Litani
    * @author Gopal Sharma, SUN Microsystem Inc.
    *
  - * @version $Id: YearMonthDV.java,v 1.2 2001/11/28 17:54:52 sandygao Exp $
  + * @version $Id: YearMonthDV.java,v 1.3 2002/01/15 21:07:54 sandygao Exp $
    */
   public class YearMonthDV extends AbstractDateTimeDV{
   
  @@ -80,7 +80,7 @@
           try{
               return parse(content, null);
           } catch(Exception ex){
  -            throw new InvalidDatatypeValueException("not a valid yearMonth");
  +            throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{content, "gYearMonth"});
           }
       }
   
  
  
  
  1.37      +72 -54    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.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- XMLSchemaMessages.properties	14 Jan 2002 20:55:01 -0000	1.36
  +++ XMLSchemaMessages.properties	15 Jan 2002 21:07:55 -0000	1.37
  @@ -99,11 +99,11 @@
           cvc-complex-type.5.1 = cvc-complex-type.5.1: In element ''{0}'', attribute ''{1}'' is a Wild ID. But there is already a Wild ID ''{2}''.
           cvc-complex-type.5.2 = cvc-complex-type.5.2: In element ''{0}'', attribute ''{1}'' is a Wild ID. But there is already a attribute ''{2}'' from the attribute uses.
           cvc-complex-type.5.3 = cvc-complex-type.5.2: Attribute ''{0}'' is a Wild ID. But there is already a attribute ''{1}'' from the attribute uses.
  -        cvc-datatype-valid.1.1 = cvc-datatype-valid.1.1: error.
  -        cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: error.
  -        cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: error.
  -        cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: error.
  -        cvc-datatype-valid.2 = cvc-datatype-valid.2: error.
  +        cvc-datatype-valid.1.1 = cvc-datatype-valid.1.1: The value ''{0}'' is not pattern valid with respect to type ''{1}''.
  +        cvc-datatype-valid.1.2.1 = cvc-datatype-valid.1.2.1: ''{0}'' is not a valid ''{1}'' value.
  +        cvc-datatype-valid.1.2.2 = cvc-datatype-valid.1.2.2: ''{0}'' is not a valid value of list type ''{1}''.
  +        cvc-datatype-valid.1.2.3 = cvc-datatype-valid.1.2.3: ''{0}'' is not a valid value of union type ''{1}''.
  +        cvc-datatype-valid.2 = cvc-datatype-valid.2: ''{0}'' is not from the value space of type ''{1}''.
           cvc-elt.1 = cvc-elt.1: Cannot find the declaration of element ''{0}''.
           cvc-elt.2 = cvc-elt.2: '{'abstract'}' of the element declaration of ''{0}'' must be false.
           cvc-elt.3.1 = cvc-elt.3.1: Attribute ''{1}'' must not apprear on element ''{0}'', because '{'nillable'}' is false.
  @@ -118,25 +118,25 @@
           cvc-elt.5.2.2.2.1 = cvc-elt.5.2.2.2.1: The value ''{1}'' of element ''{0}'' does not match the fixed value constrinat value ''{2}''.
           cvc-elt.5.2.2.2.2 = cvc-elt.5.2.2.2.2: The value ''{1}'' of element ''{0}'' does not match the value constrinat value ''{2}''.
           cvc-elt = cvc-elt: error.
  -        cvc-enumeration-valid = cvc-enumeration-valid: error.
  +        cvc-enumeration-valid = cvc-enumeration-valid: Value ''{0}'' is not facet-valid with respect to enumeration ''{1}''.
           cvc-facet-valid = cvc-facet-valid: error.
  -        cvc-fractionDigits-valid = cvc-fractionDigits-valid: error.
  +        cvc-fractionDigits-valid = cvc-fractionDigits-valid: Value ''{0}'' with fractionDigits = ''{1}'' is not facet-valid with respect to fractionDigits ''{2}''.
           cvc-id.1 = cvc-id.1: There is no ID/IDREF binding for IDREF ''{0}''.
           cvc-id.2 = cvc-id.2: There are multiple occurrences of ID value ''{0}''.
           cvc-identity-constraint = cvc-identity-constraint: error.
  -        cvc-length-valid = cvc-length-valid: error.
  -        cvc-maxExclusive-valid = cvc-maxExclusive-valid: error.
  -        cvc-maxInclusive-valid = cvc-maxInclusive-valid: error.
  -        cvc-maxLength-valid = cvc-maxLength-valid: error.
  -        cvc-minExclusive-valid = cvc-minExclusive-valid: error.
  -        cvc-minInclusive-valid = cvc-minInclusive-valid: error.
  -        cvc-minLength-valid = cvc-minLength-valid: error.
  +        cvc-length-valid = cvc-length-valid: Value ''{0}'' with length = ''{1}'' is not facet-valid with respect to length ''{2}''.
  +        cvc-maxExclusive-valid = cvc-maxExclusive-valid: Value ''{0}'' is not facet-valid with respect to maxExclusive ''{1}''.
  +        cvc-maxInclusive-valid = cvc-maxInclusive-valid: Value ''{0}'' is not facet-valid with respect to maxInclusive ''{1}''.
  +        cvc-maxLength-valid = cvc-maxLength-valid: Value ''{0}'' with length = ''{1}'' is not facet-valid with respect to maxLength ''{2}''.
  +        cvc-minExclusive-valid = cvc-minExclusive-valid: Value ''{0}'' is not facet-valid with respect to minExclusive ''{1}''.
  +        cvc-minInclusive-valid = cvc-minInclusive-valid: Value ''{0}'' is not facet-valid with respect to minInclusive ''{1}''.
  +        cvc-minLength-valid = cvc-minLength-valid: Value ''{0}'' with length = ''{1}'' is not facet-valid with respect to minLength ''{2}''.
           cvc-model-group = cvc-model-group: error.
           cvc-particle = cvc-particle: error.
  -        cvc-pattern-valid = cvc-pattern-valid: error.
  +        cvc-pattern-valid = cvc-pattern-valid: Value ''{0}'' is not facet-valid with respect to pattern ''{1}''.
           cvc-resolve-instance = cvc-resolve-instance: error.
  -        cvc-simple-type = cvc-simple-type: {0}.
  -        cvc-totalDigits-valid = cvc-totalDigits-valid: error.
  +        cvc-simple-type = cvc-simple-type: error.
  +        cvc-totalDigits-valid = cvc-totalDigits-valid: Value ''{0}'' with totalDigits = ''{1}'' is not facet-valid with respect to totalDigits ''{2}''.
           cvc-type.1 = cvc-type.1: error.
           cvc-type.2 = cvc-type.2: The type definition must not be abstract.
           cvc-type.3.1.1 = cvc-type.3.1.1: [attributes] of element ''{0}'' must be empty, excepting those whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is one of type, nil, schemaLocation or noNamespaceSchemaLocation.
  @@ -187,7 +187,7 @@
           src-model_group_defn = src-model_group_defn: error.
           src-multiple-enumerations = src-multiple-enumerations: error.
           src-multiple-patterns = src-multiple-patterns: error.
  -        src-notation = src-notation: {0}.        
  +        src-notation = src-notation: {0}.
           src-qname = src-qname: error.
           src-redefine.1 = src-redefine.1: the component ''{0}'' occurs in a schema different from that which was redefined.
           src-redefine.5 = src-redefine.5: <simpleType> or <complexType> children of <redefine> elements must have <extension> or <restriction> descendants referring to themselves.
  @@ -220,7 +220,7 @@
           c-fields-xpaths = c-fields-xpaths: error.
           cos-all-limited = cos-all-limited: error.
           cos-all-limited.1.2 = cos-all-limited.1.2:  Error for type ''{0}''.  An all group must comprise the content of the model group.
  -        cos-applicable-facets = cos-applicable-facets: error.
  +        cos-applicable-facets = cos-applicable-facets: Facet ''{0}'' is not allowed by this type.
           cos-aw-intersect = cos-aw-intersect: error.
           cos-aw-union = cos-aw-union: error.
           cos-choice-range = cos-choice-range: error.
  @@ -228,7 +228,7 @@
           cos-ct-extends = cos-ct-extends: error.
           cos-ct-extends.1.1 = cos-ct-extends.1.1: Error for type ''{0}''.  Extension must not be in the final set of the base type.
           cos-ct-extends.1.4.2.2.2.2.1 = cos-ct-extends.1.4.2.2.2.2.1: Error for type ''{0}''.  The content type of a derived type and that of its base must both be mixed or element-only.
  -        cos-element-consistent = cos-element-consistent: Error for type ''{0}''.  Multiple elements with name ''{1}'', with different types, appear in the model group.  
  +        cos-element-consistent = cos-element-consistent: Error for type ''{0}''.  Multiple elements with name ''{1}'', with different types, appear in the model group.
           cos-equiv-class = cos-equiv-class: error.
           cos-equiv-derived-ok-rec = cos-equiv-derived-ok-rec: error.
           cos-group-emptiable = cos-group-emptiable: error.
  @@ -269,58 +269,70 @@
           e-props-correct.2 = e-props-correct.2: Invalid value constraint value ''{1}'' in element ''{0}''.
           e-props-correct.3 = e-props-correct.3: The '{'type definition'}' of element ''{0}'' must be validly derived from the '{'type definition'}' of the substitutionHead ''{1}''.
           e-props-correct.4 = e-props-correct.4: There must not be a '{'value constraint'}' on element ''{0}'', because its '{'type definition'}' or '{'type definition'}'''s '{'content type'}' is or is derived from ID.
  -        fractionDigits-totalDigits = fractionDigits-totalDigits: error.
  -        length-minLength-maxLength = length-minLength-maxLength: error.
  -        length-valid-restriction = length-valid-restriction: error.
  -        maxExclusive-valid-restriction = maxExclusive-valid-restriction: error.
  -        maxInclusive-maxExclusive = maxInclusive-maxExclusive: error.
  -        maxInclusive-valid-restriction = maxInclusive-valid-restriction: error.
  -        maxLength-valid-restriction = maxLength-valid-restriction: error.
  +        fractionDigits-totalDigits = fractionDigits-totalDigits: fractionDigits value = ''{0}'' must be <= totalDigits value = ''{1}''.
  +        length-minLength-maxLength = length-minLength-maxLength: It is an error for both length and either of minLength or maxLength to be specified.
  +        length-valid-restriction = length-valid-restriction: Value of length = ''{0}'' must be = the value of that of the base type ''{1}''.
  +        maxExclusive-valid-restriction.1 = maxExclusive-valid-restriction.1: maxExclusive value =''{0}'' must be <= maxExclusive of the base type ''{1}''.
  +        maxExclusive-valid-restriction.2 = maxExclusive-valid-restriction.2: maxExclusive value =''{0}'' must be <= maxInclusive of the base type ''{1}''.
  +        maxExclusive-valid-restriction.3 = maxExclusive-valid-restriction.3: maxExclusive value =''{0}'' must be > minInclusive of the base type ''{1}''.
  +        maxExclusive-valid-restriction.4 = maxExclusive-valid-restriction.4: maxExclusive value =''{0}'' must be > minExclusive of the base type ''{1}''.
  +        maxInclusive-maxExclusive = maxInclusive-maxExclusive: It is an error for both maxInclusive and maxExclusive to be specified for the same datatype.
  +        maxInclusive-valid-restriction.1 = maxInclusive-valid-restriction.1: maxInclusive value =''{0}'' must be <= maxInclusive of the base type ''{1}''.
  +        maxInclusive-valid-restriction.2 = maxInclusive-valid-restriction.2: maxInclusive value =''{0}'' must be < maxExclusive of the base type ''{1}''.
  +        maxInclusive-valid-restriction.3 = maxInclusive-valid-restriction.3: maxInclusive value =''{0}'' must be >= minInclusive of the base type ''{1}''.
  +        maxInclusive-valid-restriction.4 = maxInclusive-valid-restriction.4: maxInclusive value =''{0}'' must be > minExclusive of the base type ''{1}''.
  +        maxLength-valid-restriction = maxLength-valid-restriction: maxLength value = ''{0}'' must be <= that of the base type ''{1}''.
           mgd-props-correct = mgd-props-correct: error.
           mg-props-correct = mg-props-correct: error.
  -        minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: error.
  -        minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: error.
  -        minExclusive-valid-restriction = minExclusive-valid-restriction: error.
  -        minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: error.
  -        minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: error.
  -        minInclusive-minExclusive = minInclusive-minExclusive: error.
  -        minInclusive-valid-restriction = minInclusive-valid-restriction: error.
  -        minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: error.
  +        minExclusive-less-than-equal-to-maxExclusive = minExclusive-less-than-equal-to-maxExclusive: minExclusive value = ''{0}'' must be <= maxExclusive value = ''{1}''.
  +        minExclusive-less-than-maxInclusive = minExclusive-less-than-maxInclusive: minExclusive value = ''{0}'' must be < maxInclusive value = ''{1}''.
  +        minExclusive-valid-restriction.1 = minExclusive-valid-restriction.1: minExclusive value =''{0}'' must be >= minExclusive of the base type ''{1}''.
  +        minExclusive-valid-restriction.2 = minExclusive-valid-restriction.2: minExclusive value =''{0}'' must be <= maxInclusive of the base type ''{1}''.
  +        minExclusive-valid-restriction.3 = minExclusive-valid-restriction.3: minExclusive value =''{0}'' must be >= minInclusive of the base type ''{1}''.
  +        minExclusive-valid-restriction.4 = minExclusive-valid-restriction.4: minExclusive value =''{0}'' must be < maxExclusive of the base type ''{1}''.
  +        minInclusive-less-than-equal-to-maxInclusive = minInclusive-less-than-equal-to-maxInclusive: minInclusive value = ''{0}'' must be <= maxInclusive value = ''{1}''.
  +        minInclusive-less-than-maxExclusive = minInclusive-less-than-maxExclusive: minInclusive value = ''{0}'' must be < maxExclusive value = ''{1}''.
  +        minInclusive-minExclusive = minInclusive-minExclusive: It is an error for both minInclusive and minExclusive to be specified for the same datatype.
  +        minInclusive-valid-restriction.1 = minInclusive-valid-restriction.1: minInclusive value =''{0}'' must be >= minInclusive of the base type ''{1}''.
  +        minInclusive-valid-restriction.2 = minInclusive-valid-restriction.2: minInclusive value =''{0}'' must be <= maxInclusive of the base type ''{1}''.
  +        minInclusive-valid-restriction.3 = minInclusive-valid-restriction.3: minInclusive value =''{0}'' must be > minExclusive of the base type ''{1}''.
  +        minInclusive-valid-restriction.4 = minInclusive-valid-restriction.4: minInclusive value =''{0}'' must be < maxExclusive of the base type ''{1}''.
  +        minLength-less-than-equal-to-maxLength = minLength-less-than-equal-to-maxLength: value of minLength = ''{0}'' must  be less than value of maxLength = ''{1}''.
           minLength-valid-restriction = minLength-valid-restriction: error.
           no-xmlns = no-xmlns: The '{'name'}' of an attribute declaration must not match ''xmlns''.
           no-xsi = no-xsi: The '{'target namespace'}' of an attribute declaration must not match ''{0}''.
           p-props-correct.2.1 = p-props-correct.2.1: '{'min occurs'}' = ''{1}'' must not be greater than '{'max occurs'}' = ''{2}'' for ''{0}''.
           range-ok = range-ok: error.
           rcase-MapAndSum = rcase-MapAndSum: error.
  -        rcase-MapAndSum.1 = rcase-MapAndSum.1: There is not a complete functional mapping between the particles.  
  +        rcase-MapAndSum.1 = rcase-MapAndSum.1: There is not a complete functional mapping between the particles.
           rcase-MapAndSum.2 = rcase-MapAndSum.2: Group''s occurrence range is not a valid restriction of base group''s occurrence range.
           rcase-NameAndTypeOK = rcase-NameAndTypeOK: error.
           rcase-NameAndTypeOK.1 = rcase-NameAndTypeOK.1: Elements have names and target namespaces which are not the same:  Element ''{0}'' in namespace ''{1}'' and element ''{2}'' in namespace ''{3}''.
           rcase-NameAndTypeOK.2 = rcase-NameAndTypeOK.2: Base particle''s nillable is true, or the restricted particle''s nillable is false.  Element is ''{0}''.
  -        rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: The occurrence range is not a valid restriction of the base''s range.   Element is ''{0}''. 
  -        rcase-NameAndTypeOK.4 = rcase-NameAndTypeOK.4: Element ''{0}'' is either not fixed, or not fixed with the same value as that in the base. 
  -        rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: Identity constraints for element ''{0}'' are not a subset of those in base. 
  -        rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: The disallowed substitutions for element ''{0}'' are not a superset of those in the base. 
  +        rcase-NameAndTypeOK.3 = rcase-NameAndTypeOK.3: The occurrence range is not a valid restriction of the base''s range.   Element is ''{0}''.
  +        rcase-NameAndTypeOK.4 = rcase-NameAndTypeOK.4: Element ''{0}'' is either not fixed, or not fixed with the same value as that in the base.
  +        rcase-NameAndTypeOK.5 = rcase-NameAndTypeOK.5: Identity constraints for element ''{0}'' are not a subset of those in base.
  +        rcase-NameAndTypeOK.6 = rcase-NameAndTypeOK.6: The disallowed substitutions for element ''{0}'' are not a superset of those in the base.
           rcase-NameAndTypeOK.7 = rcase-NameAndTypeOK.7: Element ''{0}'' has a type which does not derive from the type of the base element.
           rcase-NSCompat = rcase-NSCompat: error.
  -        rcase-NSCompat.1 = rcase-NSCompat.2: Element ''{0}'' has a namespace ''{1}'' which is not allowed by the wildcard in the base. 
  -        rcase-NSCompat.2 = rcase-NSCompat.2: The occurrence range for element ''{0}'' is not a valid restriction of base's wildcard occurrence range. 
  +        rcase-NSCompat.1 = rcase-NSCompat.2: Element ''{0}'' has a namespace ''{1}'' which is not allowed by the wildcard in the base.
  +        rcase-NSCompat.2 = rcase-NSCompat.2: The occurrence range for element ''{0}'' is not a valid restriction of base's wildcard occurrence range.
           rcase-NSRecurseCheckCardinality = rcase-NSRecurseCheckCardinality: error.
  -        rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: Group''s occurrence range is not a valid restriction of base wildcard''s range.  
  -        rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: There is not a complete functional mapping between the particles.   
  +        rcase-NSRecurseCheckCardinality.1 = rcase-NSRecurseCheckCardinality.1: Group''s occurrence range is not a valid restriction of base wildcard''s range.
  +        rcase-NSRecurseCheckCardinality.2 = rcase-NSRecurseCheckCardinality.2: There is not a complete functional mapping between the particles.
           rcase-NSSubset = rcase-NSSubset: error.
  -        rcase-NSSubset.1 = rcase-NSSubset.1: Wildcard is not a subset of corresponding wildcard in base. 
  +        rcase-NSSubset.1 = rcase-NSSubset.1: Wildcard is not a subset of corresponding wildcard in base.
           rcase-NSSubset.2 = rcase-NSSubset.2: Wildcard''s occurrence range is not a valid restriction of that in the base.
           rcase-Recurse = rcase-Recurse: error.
  -        rcase-Recurse.1 = rcase-Recurse.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range. 
  -        rcase-Recurse.2 = rcase-Recurse.2: There is not a complete functional mapping between the particles.  
  +        rcase-Recurse.1 = rcase-Recurse.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range.
  +        rcase-Recurse.2 = rcase-Recurse.2: There is not a complete functional mapping between the particles.
           rcase-RecurseAsIfGroup = rcase-RecurseAsIfGroup: error.
           rcase-RecurseLax = rcase-RecurseLax: error.
  -        rcase-RecurseLax.1 = rcase-RecurseLax.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range. 
  -        rcase-RecurseLax.2 = rcase-RecurseLax.2: There is not a complete functional mapping between the particles.  
  +        rcase-RecurseLax.1 = rcase-RecurseLax.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range.
  +        rcase-RecurseLax.2 = rcase-RecurseLax.2: There is not a complete functional mapping between the particles.
           rcase-RecurseUnordered = rcase-RecurseUnordered: error.
  -        rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range. 
  -        rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: There is not a complete functional mapping between the particles.  
  +        rcase-RecurseUnordered.1 = rcase-RecurseUnordered.1: Group''s occurrence range is not a valid restriction of base group''s occurrence range.
  +        rcase-RecurseUnordered.2 = rcase-RecurseUnordered.2: There is not a complete functional mapping between the particles.
           sch-props-correct.1 = sch-props-correct.1: schema components of type ''{0}'' cannot occur after declarations or are not permitted as children of a <schema> element.
           sch-props-correct.2 = sch-props-correct.2: a schema cannot contain two global components with the same name; this one contains two occurrences of ''{0}''.
           st-props-correct.1 = st-props-correct.1: error.
  @@ -329,12 +341,18 @@
           st-props-correct.4.1 = st-props-correct.4.1: The type definition is not a valid restriction with repect to the base type ''{0}''.
           st-props-correct.4.2.1 = st-props-correct.4.2.1: {final} of the {base type definition} contains list.
           st-props-correct.4.2.2 = st-props-correct.4.2.2: {final} of the {base type definition} contains union.
  -        totalDigits-valid-restriction = totalDigits-valid-restriction: error.
  -        whiteSpace-valid-restriction = whiteSpace-valid-restriction: error.
  +        totalDigits-valid-restriction = totalDigits-valid-restriction: totalDigits value = ''{0}'' must be <= that of the base type ''{1}''.
  +        whiteSpace-valid-restriction.1 = whiteSpace-valid-restriction.1: It is an error if whiteSpace = ''preserve'' or ''replace'' and fBase.whiteSpace = ''collapse''.
  +        whiteSpace-valid-restriction.2 = whiteSpace-valid-restriction.2: It is an error if whiteSpace = ''preserve'' and fBase.whiteSpace = ''replace''.
           w-props-correct = w-props-correct: error.
   
  +# codes not defined by the spec
       ValidationRoot = Validation Root Valid (ID/IDREF) (�3.3.4): validation was not successful.
  -
  +    FixedFacetValue = FixedFacetValue: ''{0}'' value = ''{1}'' must be equal to that of the base type ''{2}'' when {fixed} = true.
  +    InvalidRegex = Pattern value ''{0}'' is not a valid regular expression: ''{1}''.
  +    FacetValueFromBase = Value ''{0}'' of facet ''{1}'' must from the value space of the base type.
  +    UndeclaredPrefix = Cannot resolve ''{0}'' as a QName: the prefix ''{1}'' is not declared.
  +    UndeclaredEntity = Entity ''{0}'' is not declared.
   
   # SimpleTypes
      ListUnionRestrictionError = List | Union | Restriction content is invalid for type ''{0}''
  
  
  
  1.3       +1 -6      xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaException.java
  
  Index: XMLSchemaException.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaException.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XMLSchemaException.java	13 Nov 2001 20:32:32 -0000	1.2
  +++ XMLSchemaException.java	15 Jan 2002 21:07:55 -0000	1.3
  @@ -61,14 +61,9 @@
    *
    * @author Elena Litani, IBM
    *
  - * @version $Id: XMLSchemaException.java,v 1.2 2001/11/13 20:32:32 sandygao Exp $
  + * @version $Id: XMLSchemaException.java,v 1.3 2002/01/15 21:07:55 sandygao Exp $
    */
   public class XMLSchemaException extends Exception {
  -
  -    // this one is like reportGenericSchemaError: remove it later
  -    public XMLSchemaException(String msg) {
  -        this("general", new Object[]{msg});
  -    }
   
       // store a datatype error: error code plus the arguments
       String key;
  
  
  
  1.5       +24 -18    xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java
  
  Index: XSAttributeChecker.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSAttributeChecker.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XSAttributeChecker.java	10 Jan 2002 17:11:28 -0000	1.4
  +++ XSAttributeChecker.java	15 Jan 2002 21:07:55 -0000	1.5
  @@ -101,7 +101,7 @@
    * - use symbol table instead of many hashtables
    *
    * @author Sandy Gao, IBM
  - * @version $Id: XSAttributeChecker.java,v 1.4 2002/01/10 17:11:28 sandygao Exp $
  + * @version $Id: XSAttributeChecker.java,v 1.5 2002/01/15 21:07:55 sandygao Exp $
    */
   
   public class XSAttributeChecker {
  @@ -1154,7 +1154,7 @@
                   }
               } catch (InvalidDatatypeValueException ide) {
                   reportSchemaError ("s4s-att-invalid-value",
  -                                   new Object[] {elName, attrName, ide.getLocalizedMessage()});
  +                                   new Object[] {elName, attrName, ide.getKey()});
                   if (oneAttr.dfltValue != null)
                       //attrValues.put(attrName, oneAttr.dfltValue);
                       attrValues[oneAttr.valueIndex] = oneAttr.dfltValue;
  @@ -1224,17 +1224,17 @@
                          value.equals(SchemaSymbols.ATTVAL_TRUE_1)) {
                   retValue = Boolean.TRUE;
               } else {
  -                throw new InvalidDatatypeValueException("the value '"+value+"' is not a valid boolean");
  +                throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{value, "boolean"});
               }
               break;
           case DT_NONNEGINT:
               try {
                   retValue = fXIntPool.getXInt(Integer.parseInt(value));
               } catch (NumberFormatException e) {
  -                throw new InvalidDatatypeValueException("the value '"+value+"' is not a valid nonNegativeInteger");
  +                throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{value, "nonNegativeInteger"});
               }
               if (((XInt)retValue).intValue() < 0)
  -                throw new InvalidDatatypeValueException("the value '"+value+"' is not a valid nonNegativeInteger");
  +                throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.1", new Object[]{value, "nonNegativeInteger"});
               break;
           case DT_BLOCK:
               // block = (#all | List of (substitution | extension | restriction | list | union))
  @@ -1265,7 +1265,7 @@
                           choice |= SchemaSymbols.RESTRICTION;
                       }
                       else {
  -                        throw new InvalidDatatypeValueException("the value '"+value+"' must match (#all | List of (substitution | extension | restriction | list | union))");
  +                        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (substitution | extension | restriction | list | union))"});
                       }
                   }
               }
  @@ -1304,7 +1304,7 @@
                           choice |= SchemaSymbols.RESTRICTION;
                       }
                       else {
  -                        throw new InvalidDatatypeValueException("the value '"+value+"' must match (#all | List of (extension | restriction))");
  +                        throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | List of (extension | restriction))"});
                       }
                   }
               }
  @@ -1334,7 +1334,7 @@
                   choice = SchemaSymbols.RESTRICTION;
               }
               else {
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must match (#all | (list | union | restriction))");
  +                throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(#all | (list | union | restriction))"});
               }
               retValue = fXIntPool.getXInt(choice);
               break;
  @@ -1345,7 +1345,8 @@
               else if (value.equals (SchemaSymbols.ATTVAL_UNQUALIFIED))
                   retValue = INT_UNQUALIFIED;
               else
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must match (qualified | unqualified)");
  +                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
  +                                                        new Object[]{value, "(qualified | unqualified)"});
               break;
           case DT_MAXOCCURS:
               // maxOccurs = (nonNegativeInteger | unbounded)
  @@ -1355,7 +1356,7 @@
                   try {
                       retValue = validate(attr, value, DT_NONNEGINT, schemaDoc);
                   } catch (NumberFormatException e) {
  -                    throw new InvalidDatatypeValueException("the value '"+value+"' must match (nonNegativeInteger | unbounded)");
  +                    throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "(nonNegativeInteger | unbounded)"});
                   }
               }
               break;
  @@ -1364,7 +1365,8 @@
               if (value.equals("1"))
                   retValue = fXIntPool.getXInt(1);
               else
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must be '1'");
  +                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
  +                                                        new Object[]{value, "(1)"});
               break;
           case DT_MEMBERTYPES:
               // memberTypes = List of QName
  @@ -1382,7 +1384,7 @@
                   retValue = memberType;
               }
               catch (InvalidDatatypeValueException ide) {
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must match (List of QName)");
  +                throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.2", new Object[]{value, "(List of QName)"});
               }
               break;
           case DT_MINOCCURS1:
  @@ -1392,7 +1394,8 @@
               else if (value.equals("1"))
                   retValue = fXIntPool.getXInt(1);
               else
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must be '0' or '1'");
  +                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
  +                                                        new Object[]{value, "(0 | 1)"});
               break;
           case DT_NAMESPACE:
               // namespace = ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )
  @@ -1445,7 +1448,7 @@
                           }
                       }
                   } catch (InvalidDatatypeValueException ide) {
  -                    throw new InvalidDatatypeValueException("the value '"+value+"' must match ((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )");
  +                    throw new InvalidDatatypeValueException("cvc-datatype-valid.1.2.3", new Object[]{value, "((##any | ##other) | List of (anyURI | (##targetNamespace | ##local)) )"});
                   }
   
                   // resize the array, so there is no empty entry
  @@ -1468,7 +1471,8 @@
               else if (value.equals (SchemaSymbols.ATTVAL_SKIP))
                   retValue = INT_ANY_SKIP;
               else
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must match (lax | skip | strict)");
  +                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
  +                                                        new Object[]{value, "(lax | skip | strict)"});
               break;
           case DT_PUBLIC:
               // public = A public identifier, per ISO 8879
  @@ -1484,7 +1488,8 @@
               else if (value.equals (SchemaSymbols.ATTVAL_PROHIBITED))
                   retValue = INT_USE_PROHIBITED;
               else
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must match (optional | prohibited | required)");
  +                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
  +                                                        new Object[]{value, "(optional | prohibited | required)"});
               break;
           case DT_WHITESPACE:
               // value = preserve | replace | collapse
  @@ -1495,7 +1500,8 @@
               else if (value.equals (SchemaSymbols.ATTVAL_COLLAPSE))
                   retValue = INT_WS_COLLAPSE;
               else
  -                throw new InvalidDatatypeValueException("the value '"+value+"' must match (preserve | replace | collapse)");
  +                throw new InvalidDatatypeValueException("cvc-enumeration-valid",
  +                                                        new Object[]{value, "(preserve | replace | collapse)"});
               break;
           }
   
  @@ -1546,7 +1552,7 @@
                       dv.validate((String)values.elementAt(i+1), null, null);
                   } catch(InvalidDatatypeValueException ide) {
                       reportSchemaError ("s4s-att-invalid-value",
  -                                       new Object[] {elName, attrName, ide.getLocalizedMessage()});
  +                                       new Object[] {elName, attrName, ide.getKey()});
                   }
               }
           }
  
  
  
  1.7       +5 -6      xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java
  
  Index: XSDAbstractTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDAbstractTraverser.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XSDAbstractTraverser.java	14 Jan 2002 20:55:01 -0000	1.6
  +++ XSDAbstractTraverser.java	15 Jan 2002 21:07:55 -0000	1.7
  @@ -93,7 +93,7 @@
    * @author Rahul Srivastava, Sun Microsystems Inc.
    * @author Neeraj Bajaj, Sun Microsystems Inc.
    *
  - * @version $Id: XSDAbstractTraverser.java,v 1.6 2002/01/14 20:55:01 elena Exp $
  + * @version $Id: XSDAbstractTraverser.java,v 1.7 2002/01/15 21:07:55 sandygao Exp $
    */
   abstract class XSDAbstractTraverser {
   
  @@ -221,7 +221,7 @@
                               reportSchemaError("declaration-not-found", new Object [] {"notation", temp.localpart});
                           }
                       }catch(InvalidDatatypeValueException ex){
  -                        reportSchemaError("cvc-simple-type", new Object[]{ ex.getMessage()});
  +                        reportSchemaError(ex.getKey(), ex.getArgs());
                       }
                       // restore to the normal namespace context
                       schemaDoc.fValidationContext.setNamespaceSupport(schemaDoc.fNamespaceSupport);
  @@ -239,8 +239,7 @@
                            child = DOMUtil.getNextSiblingElement(child);
                        }
                        if (child !=null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
  -                         Object[] args = new Object [] {"Enumeration facet has more than one annotation."};
  -                         reportSchemaError("cvc-simple-type", args);
  +                         reportSchemaError("s4s-elt-must-match", new Object[]{"enumeration", "(annotation?)"});
                        }
                  }
               }
  @@ -264,7 +263,7 @@
                            }
                            if (child !=null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
                                 Object[] args = new Object [] {"Pattern facet has more than one annotation."};
  -                              reportSchemaError("cvc-simple-type", args);
  +                             reportSchemaError("s4s-elt-must-match", new Object[]{"pattern", "(annotation?)"});
                            }
                      }
                   }
  @@ -357,7 +356,7 @@
                           child = DOMUtil.getNextSiblingElement(child);
                       }
                       if (child !=null && DOMUtil.getLocalName(child).equals(SchemaSymbols.ELT_ANNOTATION)) {
  -                        reportSchemaError("cvc-simple-type", new Object[]{facet+" facet has more than one annotation."});                        
  +                        reportSchemaError("s4s-elt-must-match", new Object[]{facet, "(annotation?)"});
                       }
                   }
               }
  
  
  
  1.9       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java
  
  Index: XSDComplexTypeTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDComplexTypeTraverser.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSDComplexTypeTraverser.java	10 Jan 2002 18:59:21 -0000	1.8
  +++ XSDComplexTypeTraverser.java	15 Jan 2002 21:07:55 -0000	1.9
  @@ -92,7 +92,7 @@
    *            ((group | all | choice | sequence)?,
    *            ((attribute | attributeGroup)*, anyAttribute?))))
    * </complexType>
  - * @version $Id: XSDComplexTypeTraverser.java,v 1.8 2002/01/10 18:59:21 sandygao Exp $
  + * @version $Id: XSDComplexTypeTraverser.java,v 1.9 2002/01/15 21:07:55 sandygao Exp $
    */
   
   class  XSDComplexTypeTraverser extends XSDAbstractParticleTraverser {
  @@ -460,7 +460,7 @@
                   fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
                   typeInfo.fXSSimpleType.applyFacets(facetData, presentFacets, fixedFacets, fValidationState);
               }catch(InvalidDatatypeFacetException ex){
  -                reportGenericSchemaError(ex.getLocalizedMessage());
  +                reportSchemaError(ex.getKey(), ex.getArgs());
               }
   
               // -----------------------------------------------------------------------
  
  
  
  1.8       +2 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java
  
  Index: XSDSimpleTypeTraverser.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDSimpleTypeTraverser.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSDSimpleTypeTraverser.java	14 Jan 2002 20:55:01 -0000	1.7
  +++ XSDSimpleTypeTraverser.java	15 Jan 2002 21:07:55 -0000	1.8
  @@ -116,7 +116,7 @@
    *
    * @author Elena Litani, IBM
    * @author Neeraj Bajaj, Sun Microsystems, Inc.
  - * @version $Id: XSDSimpleTypeTraverser.java,v 1.7 2002/01/14 20:55:01 elena Exp $
  + * @version $Id: XSDSimpleTypeTraverser.java,v 1.8 2002/01/15 21:07:55 sandygao Exp $
    */
   class XSDSimpleTypeTraverser extends XSDAbstractTraverser {
   
  @@ -479,7 +479,7 @@
                   fValidationState.setNamespaceSupport(schemaDoc.fNamespaceSupport);
                   newDecl.applyFacets(facetData , presentFacets , fixedFacets, fValidationState);
               } catch (InvalidDatatypeFacetException ex) {
  -                reportSchemaError("cvc-simple-type", new Object[]{"facet error when creating type '" + qualifiedName + "': " + ex.getLocalizedMessage()} );
  +                reportSchemaError(ex.getKey(), ex.getArgs());
               }
           }
           else { //union
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org