< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/Util.java

Print this page

        

*** 27,47 **** import java.io.InputStream; import java.io.Reader; import javax.xml.XMLConstants; import javax.xml.parsers.ParserConfigurationException; - import javax.xml.parsers.SAXParser; import javax.xml.parsers.SAXParserFactory; import javax.xml.stream.XMLEventReader; import javax.xml.stream.XMLStreamReader; import javax.xml.transform.Source; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.sax.SAXSource; - import javax.xml.transform.stax.StAXResult; import javax.xml.transform.stax.StAXSource; import javax.xml.transform.stream.StreamSource; import com.sun.org.apache.xalan.internal.utils.FactoryImpl; import com.sun.org.apache.xalan.internal.utils.XMLSecurityManager; --- 27,45 ----
*** 109,120 **** reader= XMLReaderFactory.createXMLReader(); try { reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xsltc.isSecureProcessing()); } catch (SAXNotRecognizedException e) { ! System.err.println("Warning: " + reader.getClass().getName() + ": " ! + e.getMessage()); } } catch (Exception e ) { try { //Incase there is an exception thrown --- 107,118 ---- reader= XMLReaderFactory.createXMLReader(); try { reader.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, xsltc.isSecureProcessing()); } catch (SAXNotRecognizedException e) { ! XMLSecurityManager.printWarning(reader.getClass().getName(), ! XMLConstants.FEATURE_SECURE_PROCESSING, e); } } catch (Exception e ) { try { //Incase there is an exception thrown
*** 147,175 **** 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()); } try { XMLSecurityManager securityManager = (XMLSecurityManager)xsltc.getProperty(XalanConstants.SECURITY_MANAGER); if (securityManager != null) { for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { ! reader.setProperty(limit.apiProperty(), securityManager.getLimitValueAsString(limit)); } if (securityManager.printEntityCountInfo()) { reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); } } } catch (SAXException se) { ! System.err.println("Warning: " + reader.getClass().getName() + ": " ! + se.getMessage()); } xsltc.setXMLReader(reader); }catch (SAXNotRecognizedException snre ) { throw new TransformerConfigurationException ("SAXNotRecognizedException ",snre); --- 145,175 ---- try { reader.setProperty(XMLConstants.ACCESS_EXTERNAL_DTD, xsltc.getProperty(XMLConstants.ACCESS_EXTERNAL_DTD)); } catch (SAXNotRecognizedException e) { ! XMLSecurityManager.printWarning(reader.getClass().getName(), ! XMLConstants.ACCESS_EXTERNAL_DTD, e); } + String lastProperty = ""; try { XMLSecurityManager securityManager = (XMLSecurityManager)xsltc.getProperty(XalanConstants.SECURITY_MANAGER); if (securityManager != null) { for (XMLSecurityManager.Limit limit : XMLSecurityManager.Limit.values()) { ! lastProperty = limit.apiProperty(); ! reader.setProperty(lastProperty, securityManager.getLimitValueAsString(limit)); } if (securityManager.printEntityCountInfo()) { + lastProperty = XalanConstants.JDK_ENTITY_COUNT_INFO; reader.setProperty(XalanConstants.JDK_ENTITY_COUNT_INFO, XalanConstants.JDK_YES); } } } catch (SAXException se) { ! XMLSecurityManager.printWarning(reader.getClass().getName(), lastProperty, se); } xsltc.setXMLReader(reader); }catch (SAXNotRecognizedException snre ) { throw new TransformerConfigurationException ("SAXNotRecognizedException ",snre);
< prev index next >