You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/08/11 22:53:06 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/validators/datatype IDREFDatatypeValidator.java

jeffreyr    00/08/11 13:53:06

  Modified:    java/src/org/apache/xerces/validators/datatype
                        IDREFDatatypeValidator.java
  Log:
  Fixed minor, major code passed when encountering invalid IDREF
  
  Revision  Changes    Path
  1.7       +7 -2      xml-xerces/java/src/org/apache/xerces/validators/datatype/IDREFDatatypeValidator.java
  
  Index: IDREFDatatypeValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/datatype/IDREFDatatypeValidator.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- IDREFDatatypeValidator.java	2000/08/11 02:12:01	1.6
  +++ IDREFDatatypeValidator.java	2000/08/11 20:53:05	1.7
  @@ -73,7 +73,7 @@
    * standalone code as well as plugins to the validator architecture.
    * 
    * @author Jeffrey Rodriguez-
  - * @version $Id: IDREFDatatypeValidator.java,v 1.6 2000/08/11 02:12:01 jeffreyr Exp $
  + * @version $Id: IDREFDatatypeValidator.java,v 1.7 2000/08/11 20:53:05 jeffreyr Exp $
    */
   public class IDREFDatatypeValidator extends AbstractDatatypeValidator {
       private DatatypeValidator fBaseValidator    = null;
  @@ -141,7 +141,12 @@
                   } else if ( message.getDatatypeState() == IDREFDatatypeValidator.IDREF_STORE ) {
                       this.fTableOfId = (Hashtable) message.getDatatypeObject();
                       if (!XMLCharacterProperties.validName(content)) {//Check if is valid key
  -                        throw new InvalidDatatypeValueException( "IDREF is not valid" );//Need Message
  +
  +                        InvalidDatatypeValueException error = new InvalidDatatypeValueException( "IDREF is not valid" );//Need Message
  +
  +                        error.setMajorCode(XMLMessages.MSG_IDREF_INVALID );
  +                        error.setMinorCode(XMLMessages.VC_IDREF);
  +                        throw error;//Need Message
                       }
                       addIdRef( content, state);// We are storing IDs 
                   }