logo       

Re: [XNI CHANGE PROPOSAL] XMLParseException changes and creation of XMLLoca: msg#00036

text.xml.xerces-j.devel

Subject: Re: [XNI CHANGE PROPOSAL] XMLParseException changes and creation of XMLLocator2





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
<andy@xxxxxxxxxxx
et> To
xerces-j-dev@xxxxxxxxxxxxxx
08/25/2004 06:49 cc
PM
Subject
Re: [XNI CHANGE PROPOSAL]
Please respond to XMLParseException changes and
xerces-j-dev@xml. 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 * andyc@xxxxxxxxxx

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xxxxxxxxxxxxxx
For additional commands, e-mail: xerces-j-dev-help@xxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise