Java Mailing List Archive

http://www.junlu.com/

Subjects
Home
mod jk2 https
Donation of JAXP 1 3 Sources to Apache
R annoyances
RE: Finding out when the aspnet admin worker process has recycled
Favorite Linux Distribution
eigenvalues of a circulant matrix
Apache Install
Reachin apache from outside
Ant should have an ext directory
Warning: Documentroot doesn 't exist
Can this be Done?
RE: Multilanguage Application
RE: Simple Question On setting up Sub Domain site
Lack of independence in anova()
How to close connection instead of sending 403?
winning the case for ANT
Re: adding php
New Ant GUI 'Ant 's Nest '
Narrowing Down A Strange Problem
Ant Task: sshexec
R Graph Gallery : categorization of the graphs
I 've been hacked, I need some help please
RE: Anyone working with DotNetNuke?
RE: Exception Handling Opinion
hex format
RE: IIS stopped working :(
<for > Build Failed:problem
RE: Separation of Objects from Logic
RE: Tracking pages with long request execution time
sending email to multiple destination
Web Site
ant UI
Easy cut & paste from Excel to R?
Win32 Apache Restart
Improving Tasks
HELP! PLEASE!
RE: Adding Controls to a Page
read table
RE: ASPNET account doesn 't exist!
Best way to uninstall Apache2 on red hat
from win to linux how to web page
XMLParseException changes and creation of XMLLocator2
Re Post: rewrite backslash to forward slash
Target or macrodef?
Page display problem XPSP2
Authentication problems
Dynamic Dictionary Data Type?
Newbie unable access my www from outside
off topic question: Latex and R in industries
Conflict between xtable and Hmisc when using Sweave?
Very old problem without any new solution
mod rewrite help
Basic Authentication question
RE: Code Security
calling ant from java program
prevent double signing
Re: Controlling Copy/Paste/Print
Using R to illustrate the Central Limit Theorem
web server slow too much slow
access to user directories
Links
Home
Official R Project Site
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
XMLParseException changes and creation of XMLLocator2

XMLParseException changes and creation of XMLLocator2

2004-08-30       - By Michael Glavassevich
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Hi all,

For the record here's my +1 on Ankit's proposal.

Here's a summary of the changes we've discussed:

1) Add a getCharacterOffset method to XMLLocator which returns the
character offset for the current entity.
2) Add a getVersion method to XMLLocator which returns the XML version of
the current entity.
3) Add a getCharacterOffset method to XMLParseException to expose the
offset from the XMLLocator.

If people are comfortable with these changes, I'll make the updates in
CVS.

Thanks.

Neil Graham/Toronto/IBM@(protected) wrote on 08/27/2004 10:47:25 AM:

>
>
> Hi all,
>
> For my part, I'm +1 on Michael's suggestions and on Ankit's proposal to
> modify XMLLocator.  In fact, I'll admit to a bit of curiosity as to why
> XMLLocator is an interface at all; seems like it's sufficiently simple
and
> generic that it might have been better had it been made a class (or
> abstract class).  Oh well; water under the bridge.
>
> Also, I wonder if it's time to follow the convention we seem to have
> adopted in the manifest file of speaking of XNI as having versions in
our
> documentation.  The manifest file says XNI is at version 1.1, and after
all
> these changes I guess it'll go to 1.2; but I don't believe our
> documentation makes this clear anywhere.
>
> Cheers,
> Neil
> Neil Graham
> Manager, XML Parser Development
> IBM Toronto Lab
> Phone:  905-413-3519, T/L 969-3519
> E-mail:  neilg@(protected)
>
>
>
>
>  
>                       Michael  
>                       Glavassevich/Toront        To:       xerces-j-
> dev@(protected)
>                       o/IBM@(protected)                cc:  
>                                                  Subject:  Re: [XNI
> CHANGE PROPOSAL] XMLParseException changes and creation of
>                       08/26/2004 03:43 PM         XMLLocator2  
>                       Please respond to  
>                       xerces-j-dev  
>  
>  
>
>
>
>
> Hello Andy,
>
> I'm pretty sure Ankit proposed this new interface because XNI's core and
> parser packages were supposedly declared to be gold in the 2.3.0
release.
> Of course 2.4.0 then immediately modified XMLLocator for exposing
> encodings, as well as XMLResourceIdentifier for getting and setting
> namespaces URIs.
>
> As we've been finishing up the work on SAX 2.0.2 and DOM Level 3, it's
> become apparent that XNI on its own doesn't provide all the things these
> APIs require. Fortunately there are slots for Augmentations, so it's
been
> possible though cumbersome to do things like reporting skipped entities
[1]
> and whether an attribute was declared or not in the DTD (both SAX and
DOM
> need this) even though the XMLDocumentHandler and XMLAttributes
interfaces
> don't natively support these things. SAX's EntityResolver2 is probably a
> good example of something that doesn't fit well in the current
framework.
> For instance, one of the parameters on the new resolveEntity method is
the
> name of the entity being resolved. You cannot get that information from
an
> XMLResourceIdentifier so I created a new interface in the impl package
[2].
> This just doesn't feel like a good home for it though. The request to
add
> getCharacterOffset() to XMLLocator is for providing the UTF-16 offset to
> DOM Level 3's DOMLocator.
>
> While we're on the topic of changing XMLLocator, what about adding
> getVersion()? Yes, I'm aware this was brought up before but now Xerces
is
> actually going to be implementing SAX2 Extensions 1.1. It would also be
> nice if we could finalize the grammar interfaces
> (org.apache.xerces.xni.grammars). I think they're pretty stable now.
>
> Thanks.
>
> [1]
> http://xml.apache.org/xerces2-
>
j/javadocs/api/org/xml/sax/ContentHandler.html#skippedEntity(java.lang.String Source code of java.lang.String)
>
> [2]
> http://cvs.apache.org/viewcvs.cgi/xml-
>
xerces/java/src/org/apache/xerces/impl/XMLEntityDescription.java?view=markup
>
> [3]
> http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.
> html#Interfaces-DOMLocator
>
>
> Andy Clark <andy@(protected)> wrote on 08/26/2004 02:17:00 PM:
>
> > Ankit Pasricha wrote:
> > > The two code changes are listed below:
> > >
> > > XMLLocator2 extends XMLLocator {
> > >
> > >       public int getCharacterOffset();
> > > }
> >
> > Why are you extending the interface instead of just adding the
> > method to the existing interface?
> >
> > I know I'd have to update some of my XNI tools to add the method
> > but that XMLLocator2 just sticks out like a sore thumb. Especially
> > since it's the only interface that uses this naming convention. And
> > it's not the approach we've used in the past to update XNI interfaces
> > -- previously, we just changed the original interface.
> >
> > This type of change is a lot more graceful than when we went from
> > start/endPrefixMapping to passing a namespace context object to the
> > startDocument method...
> >
> > --
> > Andy Clark * andyc@(protected)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-j-dev-unsubscribe@(protected)
> > For additional commands, e-mail: xerces-j-dev-help@(protected)
> >
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@(protected)
> E-mail: mrglavas@(protected)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@(protected)
> For additional commands, e-mail: xerces-j-dev-help@(protected)
>

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@(protected)
E-mail: mrglavas@(protected)


<br><font size=2><tt>Hi all, </tt></font>
<br>
<br><font size=2><tt>For the record here's my +1 on Ankit's proposal.</tt><
/font>
<br>
<br><font size=2><tt>Here's a summary of the changes we've discussed:</tt><
/font>
<br>
<br><font size=2><tt>1) Add a getCharacterOffset method to XMLLocator which
returns the character offset for the current entity.</tt></font>
<br><font size=2><tt>2) Add a getVersion method to XMLLocator which returns
the XML version of the current entity.</tt></font>
<br><font size=2><tt>3) Add a getCharacterOffset method to XMLParseException
to expose the offset from the XMLLocator.</tt></font>
<br>
<br><font size=2><tt>If people are comfortable with these changes, I'll
make the updates in CVS.</tt></font>
<br>
<br><font size=2><tt>Thanks.</tt></font>
<br>
<br><font size=2><tt>Neil Graham/Toronto/IBM@(protected) wrote on 08/27/2004
10:47:25 AM:<br>
<br>
&gt;<br>
&gt; <br>
&gt; Hi all,<br>
&gt; <br>
&gt; For my part, I'm +1 on Michael's suggestions and on Ankit's proposal
to<br>
&gt; modify XMLLocator. &nbsp;In fact, I'll admit to a bit of curiosity
as to why<br>
&gt; XMLLocator is an interface at all; seems like it's sufficiently simple
and<br>
&gt; generic that it might have been better had it been made a class (or<br>
&gt; abstract class). &nbsp;Oh well; water under the bridge.<br>
&gt; <br>
&gt; Also, I wonder if it's time to follow the convention we seem to have<br>
&gt; adopted in the manifest file of speaking of XNI as having versions
in our<br>
&gt; documentation. &nbsp;The manifest file says XNI is at version 1.1,
and after all<br>
&gt; these changes I guess it'll go to 1.2; but I don't believe our<br>
&gt; documentation makes this clear anywhere.<br>
&gt; <br>
&gt; Cheers,<br>
&gt; Neil<br>
&gt; Neil Graham<br>
&gt; Manager, XML Parser Development<br>
&gt; IBM Toronto Lab<br>
&gt; Phone: &nbsp;905-413-3519, T/L 969-3519<br>
&gt; E-mail: &nbsp;neilg@(protected)<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; Michael &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; Glavassevich/Toront &nbsp; &nbsp; &nbsp; &nbsp;To: &nbsp; &nbsp;
&nbsp; xerces-j-<br>
&gt; dev@(protected) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; o/IBM@(protected) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cc:
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp;Subject: &nbsp;Re: [XNI <br>
&gt; CHANGE PROPOSAL] XMLParseException changes and creation of &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; 08/26/2004 03:43 PM &nbsp; &nbsp; &nbsp; &nbsp; XMLLocator2 &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; Please respond to &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; xerces-j-dev &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; <br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; Hello Andy,<br>
&gt; <br>
&gt; I'm pretty sure Ankit proposed this new interface because XNI's core
and<br>
&gt; parser packages were supposedly declared to be gold in the 2.3.0 release.
<br>
&gt; Of course 2.4.0 then immediately modified XMLLocator for exposing<br>
&gt; encodings, as well as XMLResourceIdentifier for getting and setting<br>
&gt; namespaces URIs.<br>
&gt; <br>
&gt; As we've been finishing up the work on SAX 2.0.2 and DOM Level 3,
it's<br>
&gt; become apparent that XNI on its own doesn't provide all the things
these<br>
&gt; APIs require. Fortunately there are slots for Augmentations, so it's
been<br>
&gt; possible though cumbersome to do things like reporting skipped entities
[1]<br>
&gt; and whether an attribute was declared or not in the DTD (both SAX
and DOM<br>
&gt; need this) even though the XMLDocumentHandler and XMLAttributes interfaces
<br>
&gt; don't natively support these things. SAX's EntityResolver2 is probably
a<br>
&gt; good example of something that doesn't fit well in the current framework.
<br>
&gt; For instance, one of the parameters on the new resolveEntity method
is the<br>
&gt; name of the entity being resolved. You cannot get that information
from an<br>
&gt; XMLResourceIdentifier so I created a new interface in the impl package
[2].<br>
&gt; This just doesn't feel like a good home for it though. The request
to add<br>
&gt; getCharacterOffset() to XMLLocator is for providing the UTF-16 offset
to<br>
&gt; DOM Level 3's DOMLocator.<br>
&gt; <br>
&gt; While we're on the topic of changing XMLLocator, what about adding<br>
&gt; getVersion()? Yes, I'm aware this was brought up before but now Xerces
is<br>
&gt; actually going to be implementing SAX2 Extensions 1.1. It would also
be<br>
&gt; nice if we could finalize the grammar interfaces<br>
&gt; (org.apache.xerces.xni.grammars). I think they're pretty stable now.<br>
&gt; <br>
&gt; Thanks.<br>
&gt; <br>
&gt; [1]<br>
&gt; http://xml.apache.org/xerces2-<br>
&gt; j/javadocs/api/org/xml/sax/ContentHandler.html#skippedEntity(java.lang
.String)<br>
&gt; <br>
&gt; [2]<br>
&gt; http://cvs.apache.org/viewcvs.cgi/xml-<br>
&gt; xerces/java/src/org/apache/xerces/impl/XMLEntityDescription.java?view
=markup<br>
&gt; <br>
&gt; [3]<br>
&gt; http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.<br>
&gt; html#Interfaces-DOMLocator<br>
&gt; <br>
&gt; <br>
&gt; Andy Clark &lt;andy@(protected)&gt; wrote on 08/26/2004 02:17:00
PM:<br>
&gt; <br>
&gt; &gt; Ankit Pasricha wrote:<br>
&gt; &gt; &gt; The two code changes are listed below:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; XMLLocator2 extends XMLLocator {<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &nbsp; &nbsp; &nbsp; public int getCharacterOffset();<br>
&gt; &gt; &gt; }<br>
&gt; &gt;<br>
&gt; &gt; Why are you extending the interface instead of just adding the<br>
&gt; &gt; method to the existing interface?<br>
&gt; &gt;<br>
&gt; &gt; I know I'd have to update some of my XNI tools to add the method<br>
&gt; &gt; but that XMLLocator2 just sticks out like a sore thumb. Especially<br>
&gt; &gt; since it's the only interface that uses this naming convention.
And<br>
&gt; &gt; it's not the approach we've used in the past to update XNI interfaces
<br>
&gt; &gt; -- previously, we just changed the original interface.<br>
&gt; &gt;<br>
&gt; &gt; This type of change is a lot more graceful than when we went
from<br>
&gt; &gt; start/endPrefixMapping to passing a namespace context object
to the<br>
&gt; &gt; startDocument method...<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; Andy Clark * andyc@(protected)<br>
&gt; &gt;<br>
&gt; &gt; ---------------------------------------------------------------------
<br>
&gt; &gt; To unsubscribe, e-mail: xerces-j-dev-unsubscribe@(protected)<br>
&gt; &gt; For additional commands, e-mail: xerces-j-dev-help@(protected)<br>
&gt; &gt;<br>
&gt; <br>
&gt; Michael Glavassevich<br>
&gt; XML Parser Development<br>
&gt; IBM Toronto Lab<br>
&gt; E-mail: mrglavas@(protected)<br>
&gt; E-mail: mrglavas@(protected)<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; ---------------------------------------------------------------------<br>
&gt; To unsubscribe, e-mail: xerces-j-dev-unsubscribe@(protected)<br>
&gt; For additional commands, e-mail: xerces-j-dev-help@(protected)<br>
&gt; </tt></font>
<br>
<br><font size=2><tt>Michael Glavassevich<br>
XML Parser Development<br>
IBM Toronto Lab<br>
E-mail: mrglavas@(protected)</tt></font>
<br><font size=2><tt>E-mail: mrglavas@(protected)<br>
</tt></font>

©2008 junlu.com - Jax Systems, LLC, U.S.A.