112 this.entityResolver = entityResolver; |
112 this.entityResolver = entityResolver; |
113 this.errorReceiver = errReceiver; |
113 this.errorReceiver = errReceiver; |
114 this.logic = logic; |
114 this.logic = logic; |
115 try { |
115 try { |
116 // secure xml processing can be switched off if input requires it |
116 // secure xml processing can be switched off if input requires it |
117 boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; |
117 boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity; |
118 DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled); |
118 DocumentBuilderFactory dbf = XmlUtil.newDocumentBuilderFactory(secureProcessingEnabled); |
119 dbf.setNamespaceAware(true); |
119 dbf.setNamespaceAware(true); |
120 this.documentBuilder = dbf.newDocumentBuilder(); |
120 this.documentBuilder = dbf.newDocumentBuilder(); |
121 |
121 |
122 this.parserFactory = XmlUtil.newSAXParserFactory(secureProcessingEnabled); |
122 this.parserFactory = XmlUtil.newSAXParserFactory(secureProcessingEnabled); |
363 */ |
363 */ |
364 public void dump(OutputStream out) throws IOException { |
364 public void dump(OutputStream out) throws IOException { |
365 try { |
365 try { |
366 // create identity transformer |
366 // create identity transformer |
367 // secure xml processing can be switched off if input requires it |
367 // secure xml processing can be switched off if input requires it |
368 boolean secureProcessingEnabled = options == null || !options.disableSecureXmlProcessing; |
368 boolean secureProcessingEnabled = options == null || !options.disableXmlSecurity; |
369 TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled); |
369 TransformerFactory tf = XmlUtil.newTransformerFactory(secureProcessingEnabled); |
370 Transformer it = tf.newTransformer(); |
370 Transformer it = tf.newTransformer(); |
371 |
371 |
372 for (Map.Entry<String, Document> e : core.entrySet()) { |
372 for (Map.Entry<String, Document> e : core.entrySet()) { |
373 out.write(("---<< " + e.getKey() + '\n').getBytes()); |
373 out.write(("---<< " + e.getKey() + '\n').getBytes()); |