public void cleanup() { parser.cleanup(); } }
protected Writer parse(Source source, Result result, ExecutionContext executionContext) throws SAXException, IOException { Writer writer = getWriter(result, executionContext); ContentDeliveryConfig deliveryConfig = executionContext.getDeliveryConfig(); XMLReader saxReader = getXMLReader(executionContext); saxHandler = new SAXHandler(getExecContext(), writer); saxReader = createXMLReader(); NamespaceMappings.setNamespaceDeclarationStack(namespaceDeclarationStack, executionContext); attachNamespaceDeclarationStack(saxReader, executionContext); attachXMLReader(saxReader, executionContext); configureReader(saxReader, saxHandler, executionContext, source); if(executionContext != null) { if(saxReader instanceof HierarchyChangeReader) { ((HierarchyChangeReader)saxReader).setHierarchyChangeListener(new XMLReaderHierarchyChangeListener(executionContext)); saxReader.parse(createInputSource(source, executionContext.getContentEncoding())); } else { saxReader.parse(createInputSource(source, Charset.defaultCharset().name())); if(saxReader != null) { try { detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
public SmooksSAXFilter(ExecutionContext executionContext) { this.executionContext = executionContext; closeSource = ParameterAccessor.getBoolParameter(Filter.CLOSE_SOURCE, true, executionContext.getDeliveryConfig()); closeResult = ParameterAccessor.getBoolParameter(Filter.CLOSE_RESULT, true, executionContext.getDeliveryConfig()); parser = new SAXParser(executionContext); }
protected Writer parse(Source source, Result result, ExecutionContext executionContext) throws SAXException, IOException { Writer writer = getWriter(result, executionContext); ContentDeliveryConfig deliveryConfig = executionContext.getDeliveryConfig(); XMLReader saxReader = getXMLReader(executionContext); saxHandler = new SAXHandler(getExecContext(), writer); saxReader = createXMLReader(); NamespaceMappings.setNamespaceDeclarationStack(namespaceDeclarationStack, executionContext); attachNamespaceDeclarationStack(saxReader, executionContext); attachXMLReader(saxReader, executionContext); configureReader(saxReader, saxHandler, executionContext, source); if(executionContext != null) { if(saxReader instanceof HierarchyChangeReader) { ((HierarchyChangeReader)saxReader).setHierarchyChangeListener(new XMLReaderHierarchyChangeListener(executionContext)); saxReader.parse(createInputSource(source, executionContext.getContentEncoding())); } else { saxReader.parse(createInputSource(source, Charset.defaultCharset().name())); if(saxReader != null) { try { detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
public SmooksSAXFilter(ExecutionContext executionContext) { this.executionContext = executionContext; closeSource = ParameterAccessor.getBoolParameter(Filter.CLOSE_SOURCE, true, executionContext.getDeliveryConfig()); closeResult = ParameterAccessor.getBoolParameter(Filter.CLOSE_RESULT, true, executionContext.getDeliveryConfig()); parser = new SAXParser(executionContext); }
protected Writer parse(Source source, Result result, ExecutionContext executionContext) throws SAXException, IOException { Writer writer = getWriter(result, executionContext); ContentDeliveryConfig deliveryConfig = executionContext.getDeliveryConfig(); XMLReader saxReader = getXMLReader(executionContext); saxHandler = new SAXHandler(getExecContext(), writer); saxReader = createXMLReader(); NamespaceMappings.setNamespaceDeclarationStack(namespaceDeclarationStack, executionContext); attachNamespaceDeclarationStack(saxReader, executionContext); attachXMLReader(saxReader, executionContext); configureReader(saxReader, saxHandler, executionContext, source); if(executionContext != null) { if(saxReader instanceof HierarchyChangeReader) { ((HierarchyChangeReader)saxReader).setHierarchyChangeListener(new XMLReaderHierarchyChangeListener(executionContext)); saxReader.parse(createInputSource(source, executionContext.getContentEncoding())); } else { saxReader.parse(createInputSource(source, Charset.defaultCharset().name())); if(saxReader != null) { try { detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
public SmooksSAXFilter(ExecutionContext executionContext) { this.executionContext = executionContext; closeSource = ParameterAccessor.getBoolParameter(Filter.CLOSE_SOURCE, true, executionContext.getDeliveryConfig()); closeResult = ParameterAccessor.getBoolParameter(Filter.CLOSE_RESULT, true, executionContext.getDeliveryConfig()); parser = new SAXParser(executionContext); }
public void cleanup() { parser.cleanup(); } }
protected Writer parse(Source source, Result result, ExecutionContext executionContext) throws SAXException, IOException { Writer writer = getWriter(result, executionContext); ContentDeliveryConfig deliveryConfig = executionContext.getDeliveryConfig(); XMLReader saxReader = getXMLReader(executionContext); saxHandler = new SAXHandler(getExecContext(), writer); saxReader = createXMLReader(); NamespaceMappings.setNamespaceDeclarationStack(namespaceDeclarationStack, executionContext); attachNamespaceDeclarationStack(saxReader, executionContext); attachXMLReader(saxReader, executionContext); configureReader(saxReader, saxHandler, executionContext, source); if(executionContext != null) { if(saxReader instanceof HierarchyChangeReader) { ((HierarchyChangeReader)saxReader).setHierarchyChangeListener(new XMLReaderHierarchyChangeListener(executionContext)); saxReader.parse(createInputSource(source, executionContext.getContentEncoding())); } else { saxReader.parse(createInputSource(source, Charset.defaultCharset().name())); if(saxReader != null) { try { detachXMLReader(executionContext); } finally { deliveryConfig.returnXMLReader(saxReader);
public SmooksSAXFilter(ExecutionContext executionContext) { this.executionContext = executionContext; closeSource = ParameterAccessor.getBoolParameter(Filter.CLOSE_SOURCE, true, executionContext.getDeliveryConfig()); closeResult = ParameterAccessor.getBoolParameter(Filter.CLOSE_RESULT, true, executionContext.getDeliveryConfig()); parser = new SAXParser(executionContext); }
public void cleanup() { parser.cleanup(); } }
public void cleanup() { parser.cleanup(); } }