You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xml-commons-dev@xerces.apache.org by Neeraj Bajaj <Ne...@Sun.COM> on 2005/06/06 11:22:42 UTC

Re: Remaining work for JAXP 1.3 APIs


Michael Glavassevich wrote:

> A 
>diff [4] between the latest copies on the main branch and tck-jaxp-1_2_0 
>shows some other differences, most notably how the jaxp.properties file is 
>cached. The code on the main branch will read and cache the 
>jaxp.properties file once whereas on the tck-jaxp-1_2_0 branch it will 
>reload it if the jaxp.properties file was modified since it was read 
>(which to me appears to be a more desirable behaviour).
>  
>
Former is the correct behavior. As per the spec. jaxp.properties should 
be read only once.
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()

- Neeraj


Possible bugs in SchemaFactoryFinder and XPathFactoryFinder (was: Remaining work for JAXP 1.3 APIs)

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
I was recently looking over the source for SchemaFactoryFinder [1] and 
XPathFactoryFinder [2] and noticed that when processing META-INF/services 
files it calls a method called loadFromProperty() which reads a 
META-INF/services file as if it were a properties file. I had thought 
META-INF/services files are supposed to contain the name of a class, not a 
name/value pair. In SchemaFactory [3] for the META-INF/services file it 
says to look at the "JAR file specification for file format and parsing 
rules". Looking at the JAR file specification [4] it says: "The file 
should contain a newline-separated list of unique concrete provider-class 
names", so this seems to agree with what I thought. It sounds like there's 
a bug here.

Thanks.

[1] 
http://cvs.apache.org/viewcvs.cgi/xml-commons/java/external/src/javax/xml/validation/SchemaFactoryFinder.java?view=markup
[2] 
http://cvs.apache.org/viewcvs.cgi/xml-commons/java/external/src/javax/xml/xpath/XPathFactoryFinder.java?view=markup
[3] 
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/validation/SchemaFactory.html#newInstance(java.lang.String)
[4] 
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Provider%20Configuration%20File

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Michael Glavassevich/Toronto/IBM@IBMCA wrote on 06/06/2005 10:40:17 AM:

> Neeraj Bajaj <Ne...@Sun.COM> wrote on 06/06/2005 05:22:42 AM:
> 
> > 
> > 
> > Michael Glavassevich wrote:
> > 
> > > A 
> > >diff [4] between the latest copies on the main branch and 
> tck-jaxp-1_2_0 
> > >shows some other differences, most notably how the jaxp.properties 
file 
> is 
> > >cached. The code on the main branch will read and cache the 
> > >jaxp.properties file once whereas on the tck-jaxp-1_2_0 branch it 
will 
> > >reload it if the jaxp.properties file was modified since it was read 
> > >(which to me appears to be a more desirable behaviour).
> > > 
> > >
> > Former is the correct behavior. As per the spec. jaxp.properties 
should 
> > be read only once.
> > http://java.sun.com/j2se/1.5.
> > 0/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()
> 
> Interesting. The previous version of the spec didn't have this statement 

> [1] appearently giving implementations the freedom to choose their own 
> caching strategy.
> 
> [1] 
> http://java.sun.com/j2se/1.4.
> 2/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()
> 
> > - Neeraj
> > 
> 
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org

Re: Remaining work for JAXP 1.3 APIs

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Neeraj Bajaj <Ne...@Sun.COM> wrote on 06/06/2005 05:22:42 AM:

> 
> 
> Michael Glavassevich wrote:
> 
> > A 
> >diff [4] between the latest copies on the main branch and 
tck-jaxp-1_2_0 
> >shows some other differences, most notably how the jaxp.properties file 
is 
> >cached. The code on the main branch will read and cache the 
> >jaxp.properties file once whereas on the tck-jaxp-1_2_0 branch it will 
> >reload it if the jaxp.properties file was modified since it was read 
> >(which to me appears to be a more desirable behaviour).
> > 
> >
> Former is the correct behavior. As per the spec. jaxp.properties should 
> be read only once.
> http://java.sun.com/j2se/1.5.
> 0/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()

Interesting. The previous version of the spec didn't have this statement 
[1] appearently giving implementations the freedom to choose their own 
caching strategy.

[1] 
http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()

> - Neeraj
> 

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org