Michael Glavassevich | 10 Sep 2007 01:39
Picon

Fw: Apachecon early bird registration deadline


FYI...

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

Rich Bowen <rbowen <at> apache.org> wrote on 09/06/2007 08:33:30 PM:

> Dear PMC members,
>
> The participation of the PMCs and the participants in the various
> Apache projects is needed to make ApacheCon a success. We count on
> you to promote the conference on your project websites, and on your
> project mailing lists. If the following message can be sent to your
> project user mailing lists, it will give visibility to our conference
> in the group of people most likely to come to, and benefit from, this
> conference. Please help us out and forward this message on to those
> lists, and put the banners on your website.
>
> In particular, if there is a training session about your project,
> please consider mentioning it on your user mailing list, and
> encouraging the speaker to post a little blurb about it to the list.
>
> Thanks.
>
> ------------------------------------------------------------------------
> -----
(Continue reading)

Francesco Lazzarino | 13 Sep 2007 23:33
Picon

xsd:dateTime validation

I found a difference between the validation of xsd:dateTime in java5 and
java6.

I'm posting here because java[56] uses Xerces internally, if this is out 
of line/scope just let me know. 

Example:

An attribute of type dateTime with its value set to: '2007-06-18 T09:42:00Z'.
Notice the space before the T, which according to w3 is invalid.

Java5 parses with no validation errors.

Java6 parses with this:
cvc-datatype-valid.1.2.1: '2007-06-18 T09:42:00Z' is not a valid value
for 'dateTime'.

Is this a validation option I can switch on in Java5 or is it a bug
that is fixed in the newer Xerces (Thus java6)?

What versions of Xerces are used in Java5 and Java6 respectively? I
might be able to just use a newer Xerces directly instead of upgrade Java.

-franco

--
Francesco Lazzarino
Digital Archive Programmer
Florida Center for Library Automation
http://daitss.fcla.edu
(Continue reading)

Michael Glavassevich | 13 Sep 2007 23:55
Picon

Re: xsd:dateTime validation

Hi Francesco,

I think this particular bug was fixed in Xerces-J 2.7.1 though have no idea
how that relates to what Sun shipped in Java 5 & 6. They have their own
forks of the codebase (maintained outside of Apache) which are based off
releases that are several years old now and apparently have at least few
bugs which no Xerces release has ever had. We're not involved in their
development.

Thanks.

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

Francesco Lazzarino <flaz <at> ufl.edu> wrote on 09/13/2007 05:33:18 PM:

> I found a difference between the validation of xsd:dateTime in java5 and
> java6.
>
> I'm posting here because java[56] uses Xerces internally, if this is out
> of line/scope just let me know.
>
> Example:
>
> An attribute of type dateTime with its value set to: '2007-06-18
T09:42:00Z'.
> Notice the space before the T, which according to w3 is invalid.
(Continue reading)

Michael Glavassevich | 15 Sep 2007 07:38
Picon

[ANNOUNCEMENT]: Xerces-J 2.9.1 now available


Hi everyone,

The Xerces-J team is pleased to announce that version 2.9.1 of Xerces-J is
now available. This release fixes several bugs which were present in
Xerces-J 2.9.0. It also includes a few minor enhancements and performance
improvements.

Specifically, the changes introduced in this release are:

* Added support for creating UIEvents and MouseEvents through the DOM Level
2 Events API. [Michael Glavassevich]

* Improved the reporting of character conversion errors. The
CharConversionException which triggered the fatal error is now available
from SAXException.getException(). [Michael Glavassevich]

* Reduced the performance penalty for using an EOFException internally to
signal to the scanner that the end of the document has been reached. The
exception is now cached, avoiding the expensive fillInStackTrace() on
creation. [Michael Glavassevich]

* Improved the performance of the XMLGregorianCalendar implementation.
[Michael Glavassevich]

* Implemented improvements in the processing of large minOccurs/maxOccurs
on element/wildcard particles which once caused OutOfMemoryErrors to occur
during validation. Note that an OutOfMemoryError may still occur if the
minOccurs/maxOccurs are nested or appear on a sequence or choice model
group. [Michael Glavassevich]
(Continue reading)

Jing Yang | 17 Sep 2007 22:26

HTTP OUTGOING CACHING

www.w3.org  block my accessing  due to re-questing files too often.  

I found  one   importing schema was  <xsd:import  namespace="http://www.w3.org/XML/1998/namespace"  schemaLocation="http://www.w3.org/2001/xml.xsd"/>

 

Does XSLoader provide the mechanism to avoid  repeated loading  schema during high capacity volume process ?

How to work with this issue ? The Xerces  is 2_9_0. The code is as below:

 

System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom.DOMXSImplementationSourceImpl");

DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();

XSImplementation impl = (XSImplementation) registry.getDOMImplementation("XS-Loader");

XSLoader schemaLoader = impl.createXSLoader(null);

DOMConfiguration config = schemaLoader.getConfig();

// set error handler

config.setParameter("error-handler", this);

// set validation feature

config.setParameter("validate", Boolean.TRUE);

//    parse document

XSModel model = schemaLoader.loadURI(schemaURL);

Francesco Lazzarino | 17 Sep 2007 23:04
Picon

Re: HTTP OUTGOING CACHING

you can use an alternate EntityResolver.

for an example check out:
http://daitss.fcla.edu/browser/xmlvalidator/trunk

it can be checked out via:

svn co http://daitss.fcla.edu/repos/xmlvalidator/trunk/

its a validator that can use a filesystem based cache with temporal
expiration. its straightforwardd code. no external jars.

and if you want to use the code, its GPL.

-franco

On Mon, Sep 17, 2007 at 04:26:28PM -0400, Jing Yang wrote:
> www.w3.org  block my accessing  due to re-questing files too often.  
> 
> I found  one   importing schema was  <xsd:import
> namespace="http://www.w3.org/XML/1998/namespace"
> schemaLocation="http://www.w3.org/2001/xml.xsd"/>
> 
>  
> 
> Does XSLoader provide the mechanism to avoid  repeated loading  schema
> during high capacity volume process ?
> 
> How to work with this issue ? The Xerces  is 2_9_0. The code is as below: 
> 
>  
> 
> System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom
> .DOMXSImplementationSourceImpl");
> 
> DOMImplementationRegistry registry =
> DOMImplementationRegistry.newInstance();
> 
> XSImplementation impl = (XSImplementation)
> registry.getDOMImplementation("XS-Loader");
> 
> XSLoader schemaLoader = impl.createXSLoader(null);
> 
> DOMConfiguration config = schemaLoader.getConfig();
> 
> // set error handler
> 
> config.setParameter("error-handler", this);
> 
> // set validation feature
> 
> config.setParameter("validate", Boolean.TRUE);
> 
> //    parse document
> 
> XSModel model = schemaLoader.loadURI(schemaURL);
> 

--

-- 
Francesco Lazzarino
Digital Archive Programmer
Florida Center for Library Automation
http://daitss.fcla.edu
Michael Glavassevich | 17 Sep 2007 23:22
Picon

Re: HTTP OUTGOING CACHING

Specifically you need to register [1] an LSResourceResolver [2].

XSLoader schemaLoader = impl.createXSLoader(null);
DOMConfiguration config = schemaLoader.getConfig();
...
LSResourceResolver resolver = ...;
config.setParameter("resource-resolver", resolver);
...

[1]
http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#Interface-Loader
[2]
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSResourceResolver.html

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

Francesco Lazzarino <flaz <at> ufl.edu> wrote on 09/17/2007 05:04:23 PM:

> you can use an alternate EntityResolver.
>
> for an example check out:
> http://daitss.fcla.edu/browser/xmlvalidator/trunk
>
> it can be checked out via:
>
> svn co http://daitss.fcla.edu/repos/xmlvalidator/trunk/
>
> its a validator that can use a filesystem based cache with temporal
> expiration. its straightforwardd code. no external jars.
>
> and if you want to use the code, its GPL.
>
> -franco
>
> On Mon, Sep 17, 2007 at 04:26:28PM -0400, Jing Yang wrote:
> > www.w3.org  block my accessing  due to re-questing files too often.
> >
> > I found  one   importing schema was  <xsd:import
> > namespace="http://www.w3.org/XML/1998/namespace"
> > schemaLocation="http://www.w3.org/2001/xml.xsd"/>
> >
> >
> >
> > Does XSLoader provide the mechanism to avoid  repeated loading  schema
> > during high capacity volume process ?
> >
> > How to work with this issue ? The Xerces  is 2_9_0. The code is as
below:
> >
> >
> >
> >
System.setProperty(DOMImplementationRegistry.PROPERTY,"org.apache.xerces.dom

> > .DOMXSImplementationSourceImpl");
> >
> > DOMImplementationRegistry registry =
> > DOMImplementationRegistry.newInstance();
> >
> > XSImplementation impl = (XSImplementation)
> > registry.getDOMImplementation("XS-Loader");
> >
> > XSLoader schemaLoader = impl.createXSLoader(null);
> >
> > DOMConfiguration config = schemaLoader.getConfig();
> >
> > // set error handler
> >
> > config.setParameter("error-handler", this);
> >
> > // set validation feature
> >
> > config.setParameter("validate", Boolean.TRUE);
> >
> > //    parse document
> >
> > XSModel model = schemaLoader.loadURI(schemaURL);
> >
>
> --
> Francesco Lazzarino
> Digital Archive Programmer
> Florida Center for Library Automation
> http://daitss.fcla.edu
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe <at> xerces.apache.org
> For additional commands, e-mail: j-users-help <at> xerces.apache.org
Stuart Norton | 19 Sep 2007 22:57
Favicon

XInclude and entities

I have a question about how Xerces handles text entities when they are defined in both the parent and child of XInclusion.  Are text entities supposed to be expanded before or after XIncludes are inserted in the result infoset?  

 

Based on a local experiment with Xerxes-J 2.9.0, it appears that text entities are expanded before XIncludes are inserted.  But according to the recommendation at http://www.w3.org/TR/xinclude/:

“The included items will all appear in the result infoset. This includes unexpanded entity reference information items if they are present.”

I read this to mean that entity reference information items (e.g. text entities) are not expanded until after they are included in the result document (but I could be wrong).

 

I would really appreciate it if someone could explain what the expected behavior is.

 

In case it helps to clarify my question, I have attached three XML files in a zip file.  parent-xinclude-entity-text.xml uses xinclude to include child-xinclude-entity-text, and they both define and use their own version of &text-entity; (‘PARENT’ in the parent file and ‘CHILD’ in the child file).  After parsing, the result is parent-xinclude-entity-text-out.xml, and you see that the text entity was expanded to ‘PARENT’ in the content from the parent file, and to ‘CHILD’ in the content from the child file.  My expectation was that it should have been expanded to ‘PARENT’ in both cases, because the parent’s entity definition is included first and it overrides the child’s.

 

Thank you in advance!

 

Stuart Norton

Document Engineering

Juniper Networks, Inc.

 

Attachment (xinclude-entity-test.zip): application/x-zip-compressed, 936 bytes
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe <at> xerces.apache.org
For additional commands, e-mail: j-users-help <at> xerces.apache.org
Michael Glavassevich | 20 Sep 2007 05:09
Picon

Re: XInclude and entities

Hi Stuart,

"Stuart Norton" <snorton <at> juniper.net> wrote on 09/19/2007 04:57:18 PM:

> I have a question about how Xerces handles text entities when they
> are defined in both the parent and child of XInclusion.  Are text
> entities supposed to be expanded before or after XIncludes are
> inserted in the result infoset?

XML parsers are required [1] to do this expansion. Conceptually this
happens pre-source infoset.

> Based on a local experiment with Xerxes-J 2.9.0, it appears that
> text entities are expanded before XIncludes are inserted.  But
> according to the recommendation at http://www.w3.org/TR/xinclude/:
> ?The included items will all appear in the result infoset. This includes
> unexpanded entity reference information items if they are present.?
> I read this to mean that entity reference information items (e.g.
> text entities) are not expanded until after they are included in the
> result document (but I could be wrong).

That's not what that means.

An "unexpanded entity reference" is a term defined in the XML Information
Set [2] Recommendation. These information items represent external parsed
entities (e.g. <!ENTITY foo SYSTEM "http://xerces.apache.org/bar">) that
weren't expanded by the parser. Non-validating ones [3] in particular may
do this. Xerces expands all of them by default. XInclude processing plays
no part in that. If there was an unexpanded entity reference in the source
infoset, it's still unexpanded if it's included in the result infoset.

> I would really appreciate it if someone could explain what the
> expected behavior is.
>
> In case it helps to clarify my question, I have attached three XML
> files in a zip file.  parent-xinclude-entity-text.xml uses xinclude
> to include child-xinclude-entity-text, and they both define and use
> their own version of &text-entity; (?PARENT? in the parent file and
> ?CHILD? in the child file).  After parsing, the result is parent-
> xinclude-entity-text-out.xml, and you see that the text entity was
> expanded to ?PARENT? in the content from the parent file, and to
> ?CHILD? in the content from the child file.  My expectation was that
> it should have been expanded to ?PARENT? in both cases, because the
> parent?s entity definition is included first and it overrides the
child?s.
>
> Thank you in advance!
>
> Stuart Norton
> Document Engineering
> Juniper Networks, Inc.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe <at> xerces.apache.org
> For additional commands, e-mail: j-users-help <at> xerces.apache.org

Thanks.

[1] http://www.w3.org/TR/2006/REC-xml-20060816/#entproc
[2] http://www.w3.org/TR/2004/REC-xml-infoset-20040204/#infoitem.rse
[3] http://www.w3.org/TR/REC-xml/#include-if-valid

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas <at> ca.ibm.com
E-mail: mrglavas <at> apache.org
Anthony N. Frasso | 24 Sep 2007 21:34
Picon
Favicon

Building a Project with Ant using Xerces and JDK 1.4.2

Hi all, and thanks in advance for your help.

I'm having some difficulty understanding how to build a project I'm working on.
 I'm using Xerces v. 2.9.1, JDK 1.4.2, and Ant 1.6.5.

As I understand it, I can either place the Xerces jar files in the default
endorsed directory ($JAVA_HOME$/lib/endorsed), or I can place them in a
separate directory and set it to be the endorsed directory using a system
property.

However, while I can see how to set a system property using the java command
(or task), I don't see how to set a system property using the javac compiler. 
Am I missing something?  Is there an alternate way to set a system property
prior to running javac?

Thanks again for your help.

Best Regards,
Anthony Frasso

      ____________________________________________________________________________________
Luggage? GPS? Comic books? 
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz

Gmane