The two code changes are listed below:


XMLLocator2 extends XMLLocator {

      public int getCharacterOffset();
}



public class XMLParseException ... {

      ...
      int fOffset;

      public XMLParseException(XMLLocator locator) {
            ...
            fOffset = locator instanceof
XMLLocator2?((XMLLocator2)locator).getCharacterOffset():-1;
      }

      public int getCharacterOffset() {

            return fOffset;
      }
      ...
}



Ankit Pasricha
XML Parser Development
IBM Toronto Lab
8200 Warden Avenue, Ontario L6G 1C7
Phone: (905) 413 4941


                                                                           
             Andy Clark                                                    
             <[EMAIL PROTECTED]                                             
             et>                                                        To 
                                       [EMAIL PROTECTED]         
             08/25/2004 06:49                                           cc 
             PM                                                            
                                                                   Subject 
                                       Re: [XNI CHANGE PROPOSAL]           
             Please respond to         XMLParseException changes and       
             [EMAIL PROTECTED]         creation of XMLLocator2             
                apache.org                                                 
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Ankit Pasricha wrote:
> 1) As an extension of the org.apache.xerces.xni.XMLLocator interface,
>  XMLLocator2 interface was created to expose character offset
> information (i.e. the character location in the stream being read).
> Since this interface extends an XNI interface, I would like it to
> live in the org.apache.xerces.xni package as well.
>
> 2) In order to propagate the offset information available (due to the
> above change), I also want to change the XMLParseException class (in
> org.apache.xerces.xni.parser package) to contain offset information.
>
> I would like to know if there are any comments about these changes as
> well as any problems/issues that you see.

I'd like to see the exact changes you are proposing. In general,
adding methods is alright while removing or changing them is not.
However, even if it's only an addition, I would like to see the
proposed changes to make sure that they stay consistent with the
existing API.

--
Andy Clark * [EMAIL PROTECTED]

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




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

Reply via email to