On 1/17/07, Adam Lally <[EMAIL PROTECTED]> wrote:

On 1/17/07, Lev Kozakov <[EMAIL PROTECTED]> wrote:
> Actually, we need to check both the Java version (java.version) and its
> vendor (java.vendor), since IBM Java 1.4.x works fine with XML BOM.
There is
> no problem to skip the test, but real PEAR installation may fail, if one
of
> the descriptors contains BOM. The best solution, probably, is removing
BOM
> from XML descriptors when running under Sun's JVM 1.4.x, but this goes
far
> beyond the PEAR installation.

Users can also install the Xerces parser, and then PEAR installation
would work.  We could document this limitation and workaround.


I agree - documenting the limitation and workaround (using Xerces) is a good
idea.

To make the PEAR installation (and all the
> tests) work with all Java versions, I propose complete removal of XML
> validation call (isValidXmlFile) from the 'detectXmlFileEncoding'
method.
> This is the call that leads to failures in Sun's Java 1.4.x with XML
files
> containing BOM.
>

Hmmm... if we remove the isValidXmlFile call what will happen when the
user tries to later run their component?  Will it fail to parse the
descriptor at that time due to the BOM?

In any case, if we think there's value in this validation I'm
reluctant to completely remove it just to support an older JRE.

-Adam


The 'isValidXmlFile' is used in PEAR installation to make sure the XML file
that requires 'adjustment/localization' is a valid XML file. Without this
checking the identification of XML file encoding may return incorrect
results. This method uses SAX parser to validate the input file. If this
method fails, UIMA XMLParser is likely to fail as well.

-- Lev

Reply via email to