changeset 503:ec38586b8bf3

Merge
author chegar
date Mon, 17 Jun 2013 11:18:50 +0100
parents f8f257062d53 0142ef23f1b4
children 1c5e3ae28f81
files
diffstat 6 files changed, 36 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Mon Jun 10 09:51:09 2013 +0100
+++ b/.hgtags	Mon Jun 17 11:18:50 2013 +0100
@@ -214,3 +214,5 @@
 668acc0e1034bc1bec6d02be92e0dd4a63d0667e jdk8-b90
 e3065fb07877c7e96e8b93416fe2ab9a4c9eb2a5 jdk8-b91
 1ab5d8d6eab81e65c6c3cf21739474cd67a0e7cf jdk8-b92
+d583a491d63c49eeda4869525048075da1cb596e jdk8-b93
+c84658e1740df64931005a9bc4c8ecef38eb47c3 jdk8-b94
--- a/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java	Mon Jun 10 09:51:09 2013 +0100
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Parser.java	Mon Jun 17 11:18:50 2013 +0100
@@ -52,6 +52,7 @@
 import org.xml.sax.InputSource;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
+import org.xml.sax.SAXNotRecognizedException;
 import org.xml.sax.SAXParseException;
 import org.xml.sax.XMLReader;
 import org.xml.sax.helpers.AttributesImpl;
@@ -476,8 +477,15 @@
                 factory.setNamespaceAware(true);
             }
             final SAXParser parser = factory.newSAXParser();
-            parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
-                    _xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
+            try {
+                parser.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
+                        _xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
+            } catch (SAXNotRecognizedException e) {
+                ErrorMsg err = new ErrorMsg(ErrorMsg.WARNING_MSG,
+                        parser.getClass().getName() + ": " + e.getMessage());
+                reportError(WARNING, err);
+            }
+
             final XMLReader reader = parser.getXMLReader();
             return(parse(reader, input));
         }
--- a/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Mon Jun 10 09:51:09 2013 +0100
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Mon Jun 17 11:18:50 2013 +0100
@@ -955,6 +955,9 @@
             if (Double.isNaN(d) || Double.isInfinite(d))
                 return(Double.toString(d));
 
+            //Convert -0.0 to +0.0 other values remains the same
+            d = d + 0.0;
+
             // Use the XPath formatter to ignore locales
             StringBuffer result = threadLocalStringBuffer.get();
             result.setLength(0);
--- a/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java	Mon Jun 10 09:51:09 2013 +0100
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java	Mon Jun 17 11:18:50 2013 +0100
@@ -105,8 +105,6 @@
                     if (reader == null) {
                        try {
                            reader= XMLReaderFactory.createXMLReader();
-                           reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
-                                   xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
                        } catch (Exception e ) {
                            try {
 
@@ -138,6 +136,14 @@
                     reader.setFeature
                         ("http://xml.org/sax/features/namespace-prefixes",false);
 
+                    try {
+                        reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
+                                   xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
+                    } catch (SAXNotRecognizedException e) {
+                        System.err.println("Warning:  " + reader.getClass().getName() + ": "
+                                + e.getMessage());
+                    }
+
                     xsltc.setXMLReader(reader);
                 }catch (SAXNotRecognizedException snre ) {
                   throw new TransformerConfigurationException
--- a/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java	Mon Jun 10 09:51:09 2013 +0100
+++ b/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java	Mon Jun 17 11:18:50 2013 +0100
@@ -675,8 +675,6 @@
                     spf.setNamespaceAware(true);
                     try {
                         reader = spf.newSAXParser().getXMLReader();
-                           reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
-                                   fComponentManager.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
                         // If this is a Xerces SAX parser, set the security manager if there is one
                         if (reader instanceof com.sun.org.apache.xerces.internal.parsers.SAXParser) {
                            SecurityManager securityManager = (SecurityManager) fComponentManager.getProperty(SECURITY_MANAGER);
@@ -687,8 +685,13 @@
                                // Ignore the exception if the security manager cannot be set.
                                catch (SAXException exc) {}
                            }
-                           reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
-                                   fComponentManager.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
+                           try {
+                               reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD,
+                                      fComponentManager.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD));
+                           } catch (SAXException exc) {
+                               System.err.println("Warning: " + reader.getClass().getName() + ": " +
+                                      exc.getMessage());
+                           }
                         }
                     } catch( Exception e ) {
                         // this is impossible, but better safe than sorry
--- a/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java	Mon Jun 10 09:51:09 2013 +0100
+++ b/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java	Mon Jun 17 11:18:50 2013 +0100
@@ -136,11 +136,16 @@
                 try {
                     reader.setFeature(NAMESPACES_FEATURE, true);
                     reader.setFeature(NAMESPACE_PREFIXES_FEATURE, false);
-                    reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD);
                 } catch (SAXException se) {
                     // Try to carry on if we've got a parser that
                     // doesn't know about namespace prefixes.
                 }
+                try {
+                    reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, _accessExternalDTD);
+                } catch (SAXException se) {
+                    System.err.println("Warning:  " + reader.getClass().getName() + ": "
+                                + se.getMessage());
+                }
             } catch (ParserConfigurationException ex) {
                 throw new SAXException(ex);
             } catch (FactoryConfigurationError ex1) {