Package org.apache.xalan.lib
Class PipeDocument
- java.lang.Object
-
- org.apache.xalan.lib.PipeDocument
-
public class PipeDocument extends java.lang.Object
PipeDocument is a Xalan extension element to set stylesheet params and pipes an XML document through a series of 1 or more stylesheets. PipeDocument is invoked from a stylesheet as thepipeDocument extension element
. It is accessed by specifying a namespace URI as follows:xmlns:pipe="http://xml.apache.org/xalan/PipeDocument"
- Author:
- Donald Leslie
-
-
Constructor Summary
Constructors Constructor Description PipeDocument()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
pipeDocument(XSLProcessorContext context, ElemExtensionCall elem)
Extension element for piping an XML document through a series of 1 or more transformations.void
usePipe(java.util.Vector vTHandler, java.lang.String source, java.lang.String target)
Uses a Vector of TransformerHandlers to pipe XML input document through a series of 1 or more transformations.
-
-
-
Method Detail
-
pipeDocument
public void pipeDocument(XSLProcessorContext context, ElemExtensionCall elem) throws javax.xml.transform.TransformerException, javax.xml.transform.TransformerConfigurationException, org.xml.sax.SAXException, java.io.IOException, java.io.FileNotFoundException
Extension element for piping an XML document through a series of 1 or more transformations.Common usage pattern: A stylesheet transforms a listing of documents to be transformed into a TOC. For each document in the listing calls the pipeDocument extension element to pipe that document through a series of 1 or more stylesheets to the desired output document. Syntax: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pipe="http://xml.apache.org/xalan/PipeDocument" extension-element-prefixes="pipe"> ... <pipe:pipeDocument source="source.xml" target="target.xml"> <stylesheet href="ss1.xsl"> <param name="param1" value="value1"/> </stylesheet> <stylesheet href="ss2.xsl"> <param name="param1" value="value1"/> <param name="param2" value="value2"/> </stylesheet> <stylesheet href="ss1.xsl"/> </pipe:pipeDocument> Notes:
- The base URI for the source attribute is the XML "listing" document.
- The target attribute is taken as is (base is the current user directory).
- The stylsheet containg the extension element is the base URI for the stylesheet hrefs.
- Throws:
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
org.xml.sax.SAXException
java.io.IOException
java.io.FileNotFoundException
-
usePipe
public void usePipe(java.util.Vector vTHandler, java.lang.String source, java.lang.String target) throws javax.xml.transform.TransformerException, javax.xml.transform.TransformerConfigurationException, java.io.FileNotFoundException, java.io.IOException, org.xml.sax.SAXException, org.xml.sax.SAXNotRecognizedException
Uses a Vector of TransformerHandlers to pipe XML input document through a series of 1 or more transformations. Called bypipeDocument(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)
.- Parameters:
vTHandler
- Vector of Transformation Handlers (1 per stylesheet).source
- absolute URI to XML inputtarget
- absolute path to transformation output.- Throws:
javax.xml.transform.TransformerException
javax.xml.transform.TransformerConfigurationException
java.io.FileNotFoundException
java.io.IOException
org.xml.sax.SAXException
org.xml.sax.SAXNotRecognizedException
-
-