xml-xmlbeans-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eric...@apache.org
Subject cvs commit: xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2 DomImpl.java
Date Tue, 16 Mar 2004 22:58:46 GMT
ericvas     2004/03/16 14:58:46

  Modified:    v2/src/newstore2/org/apache/xmlbeans/impl/newstore2
                        DomImpl.java
  Log:
  Fixed createProcInst in DOM
  
  Revision  Changes    Path
  1.25      +9 -3      xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/DomImpl.java
  
  Index: DomImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xmlbeans/v2/src/newstore2/org/apache/xmlbeans/impl/newstore2/DomImpl.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- DomImpl.java	16 Mar 2004 21:57:42 -0000	1.24
  +++ DomImpl.java	16 Mar 2004 22:58:46 -0000	1.25
  @@ -352,8 +352,14 @@
       
       private static void validateName ( String name )
       {
  -        if (name != null && name.length() > 0 && !XMLChar.isValidName(
name ))
  -            throw new InvalidCharacterError();
  +        if (name == null)
  +            throw new IllegalArgumentException( "Target is null" );
  +            
  +        if (name.length() == 0)
  +            throw new IllegalArgumentException( "Target is empty" );
  +            
  +        if (!XMLChar.isValidName( name ))
  +            throw new InvalidCharacterError( "Target has an invalid character" );
       }
       
       private static void validateNcName ( String name )
  @@ -792,7 +798,7 @@
           validateName( target );
           
           if (Locale.beginsWithXml( target ) && target.length() == 3)
  -            throw new NamespaceErr( "Invalid target - is 'xml'" );
  +            throw new InvalidCharacterError( "Invalid target - is 'xml'" );
           
           Locale l = d.locale();
   
  
  
  

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


Mime
View raw message