blob: 6bbeae48e775b258eed3b4b9d3c38dd5cbd8a111 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_18) on Sun Apr 01 21:18:05 PDT 2012 -->
<TITLE>
Redirect
</TITLE>
<META NAME="keywords" CONTENT="org.apache.xalan.lib.Redirect class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Redirect";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Redirect.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xalan/lib/PipeDocument.html" title="class in org.apache.xalan.lib"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xalan/lib/SecuritySupport.html" title="class in org.apache.xalan.lib"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xalan/lib/Redirect.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Redirect.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.xalan.lib</FONT>
<BR>
Class Redirect</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.xalan.lib.Redirect</B>
</PRE>
<HR>
<DL>
<DT><PRE>public class <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.124"><B>Redirect</B></A><DT>extends java.lang.Object</DL>
</PRE>
<P>
Implements three extension elements to allow an XSLT transformation to
redirect its output to multiple output files.
It is accessed by specifying a namespace URI as follows:
<pre>
xmlns:redirect="http://xml.apache.org/xalan/redirect"
</pre>
<p>You can either just use redirect:write, in which case the file will be
opened and immediately closed after the write, or you can bracket the
write calls by redirect:open and redirect:close, in which case the
file will be kept open for multiple writes until the close call is
encountered. Calls can be nested.
<p>Calls can take a 'file' attribute
and/or a 'select' attribute in order to get the filename. If a select
attribute is encountered, it will evaluate that expression for a string
that indicates the filename. If the string evaluates to empty, it will
attempt to use the 'file' attribute as a default. Filenames can be relative
or absolute. If they are relative, the base directory will be the same as
the base directory for the output document. This is obtained by calling
getOutputTarget() on the TransformerImpl. You can set this base directory
by calling TransformerImpl.setOutputTarget() or it is automatically set
when using the two argument form of transform() or transformNode().
<p>Calls to redirect:write and redirect:open also take an optional
attribute append="true|yes", which will attempt to simply append
to an existing file instead of always opening a new file. The
default behavior of always overwriting the file still happens
if you do not specify append.
<p><b>Note:</b> this may give unexpected results when using xml
or html output methods, since this is <b>not</b> coordinated
with the serializers - hence, you may get extra xml decls in
the middle of your file after appending to it.
<p>Example:</p>
<PRE>
&lt;?xml version="1.0"?>
&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:redirect="http://xml.apache.org/xalan/redirect"
extension-element-prefixes="redirect">
&lt;xsl:template match="/">
&lt;out>
default output.
&lt;/out>
&lt;redirect:open file="doc3.out"/>
&lt;redirect:write file="doc3.out">
&lt;out>
&lt;redirect:write file="doc1.out">
&lt;out>
doc1 output.
&lt;redirect:write file="doc3.out">
Some text to doc3
&lt;/redirect:write>
&lt;/out>
&lt;/redirect:write>
&lt;redirect:write file="doc2.out">
&lt;out>
doc2 output.
&lt;redirect:write file="doc3.out">
Some more text to doc3
&lt;redirect:write select="doc/foo">
text for doc4
&lt;/redirect:write>
&lt;/redirect:write>
&lt;/out>
&lt;/redirect:write>
&lt;/out>
&lt;/redirect:write>
&lt;redirect:close file="doc3.out"/>
&lt;/xsl:template>
&lt;/xsl:stylesheet>
</PRE>
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="../../../../../../extensions.html#ex-redirect" target="_top">Example with Redirect extension</a></DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#DEFAULT_APPEND_OPEN">DEFAULT_APPEND_OPEN</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default append mode for bare open calls.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#DEFAULT_APPEND_WRITE">DEFAULT_APPEND_WRITE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default append mode for bare write calls.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#m_formatterListeners">m_formatterListeners</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List of formatter listeners indexed by filename.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.util.Hashtable</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#m_outputStreams">m_outputStreams</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;List of output streams indexed by filename.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#Redirect()">Redirect</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#close(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)">close</A></B>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Close the given file and remove it from the formatter listener's table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../org/apache/xml/serializer/SerializationHandler.html" title="interface in org.apache.xml.serializer">SerializationHandler</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#createSerializationHandler(org.apache.xalan.transformer.TransformerImpl, java.io.FileOutputStream, java.io.File, org.apache.xalan.templates.OutputProperties)">createSerializationHandler</A></B>(<A HREF="../../../../org/apache/xalan/transformer/TransformerImpl.html" title="class in org.apache.xalan.transformer">TransformerImpl</A>&nbsp;transformer,
java.io.FileOutputStream&nbsp;ostream,
java.io.File&nbsp;file,
<A HREF="../../../../org/apache/xalan/templates/OutputProperties.html" title="class in org.apache.xalan.templates">OutputProperties</A>&nbsp;format)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A class that extends this one could over-ride this public method and receive
a callback for the creation of the serializer used in the redirection.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#endRedirection(org.apache.xalan.transformer.TransformerImpl)">endRedirection</A></B>(<A HREF="../../../../org/apache/xalan/transformer/TransformerImpl.html" title="class in org.apache.xalan.transformer">TransformerImpl</A>&nbsp;transf)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A class that extends this class can over-ride this public method and receive
a callback that redirection to the ContentHandler specified in the startRedirection()
call has ended</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#getFilename(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)">getFilename</A></B>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the filename from the 'select' or the 'file' attribute.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;org.xml.sax.ContentHandler</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#makeFormatterListener(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall, java.lang.String, boolean, boolean, boolean)">makeFormatterListener</A></B>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem,
java.lang.String&nbsp;fileName,
boolean&nbsp;shouldPutInTable,
boolean&nbsp;mkdirs,
boolean&nbsp;append)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new ContentHandler, based on attributes of the current ContentHandler.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#open(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)">open</A></B>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Open the given file and put it in the XML, HTML, or Text formatter listener's table.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#startRedirection(org.apache.xalan.transformer.TransformerImpl, org.xml.sax.ContentHandler)">startRedirection</A></B>(<A HREF="../../../../org/apache/xalan/transformer/TransformerImpl.html" title="class in org.apache.xalan.transformer">TransformerImpl</A>&nbsp;transf,
org.xml.sax.ContentHandler&nbsp;formatter)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A class that extends this class can over-ride this public method and recieve
a callback that redirection is about to start</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#urlToFileName(java.lang.String)">urlToFileName</A></B>(java.lang.String&nbsp;base)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/xalan/lib/Redirect.html#write(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)">write</A></B>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Write the evalutation of the element children to the given file.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="m_formatterListeners"><!-- --></A><H3>
m_formatterListeners</H3>
<PRE>
protected java.util.Hashtable <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.129"><B>m_formatterListeners</B></A></PRE>
<DL>
<DD>List of formatter listeners indexed by filename.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="m_outputStreams"><!-- --></A><H3>
m_outputStreams</H3>
<PRE>
protected java.util.Hashtable <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.134"><B>m_outputStreams</B></A></PRE>
<DL>
<DD>List of output streams indexed by filename.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="DEFAULT_APPEND_OPEN"><!-- --></A><H3>
DEFAULT_APPEND_OPEN</H3>
<PRE>
public static final boolean <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.140"><B>DEFAULT_APPEND_OPEN</B></A></PRE>
<DL>
<DD>Default append mode for bare open calls.
False for backwards compatibility (I think).
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xalan.lib.Redirect.DEFAULT_APPEND_OPEN">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="DEFAULT_APPEND_WRITE"><!-- --></A><H3>
DEFAULT_APPEND_WRITE</H3>
<PRE>
public static final boolean <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.146"><B>DEFAULT_APPEND_WRITE</B></A></PRE>
<DL>
<DD>Default append mode for bare write calls.
False for backwards compatibility.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.xalan.lib.Redirect.DEFAULT_APPEND_WRITE">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="Redirect()"><!-- --></A><H3>
Redirect</H3>
<PRE>
public <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.124"><B>Redirect</B></A>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="open(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)"><!-- --></A><H3>
open</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.151"><B>open</B></A>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)
throws java.net.MalformedURLException,
java.io.FileNotFoundException,
java.io.IOException,
javax.xml.transform.TransformerException</PRE>
<DL>
<DD>Open the given file and put it in the XML, HTML, or Text formatter listener's table.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.net.MalformedURLException</CODE>
<DD><CODE>java.io.FileNotFoundException</CODE>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>javax.xml.transform.TransformerException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="write(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)"><!-- --></A><H3>
write</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.180"><B>write</B></A>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)
throws java.net.MalformedURLException,
java.io.FileNotFoundException,
java.io.IOException,
javax.xml.transform.TransformerException</PRE>
<DL>
<DD>Write the evalutation of the element children to the given file. Then close the file
unless it was opened with the open extension element and is in the formatter listener's table.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.net.MalformedURLException</CODE>
<DD><CODE>java.io.FileNotFoundException</CODE>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>javax.xml.transform.TransformerException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="close(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)"><!-- --></A><H3>
close</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.246"><B>close</B></A>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)
throws java.net.MalformedURLException,
java.io.FileNotFoundException,
java.io.IOException,
javax.xml.transform.TransformerException</PRE>
<DL>
<DD>Close the given file and remove it from the formatter listener's table.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.net.MalformedURLException</CODE>
<DD><CODE>java.io.FileNotFoundException</CODE>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>javax.xml.transform.TransformerException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="getFilename(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)"><!-- --></A><H3>
getFilename</H3>
<PRE>
private java.lang.String <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.278"><B>getFilename</B></A>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem)
throws java.net.MalformedURLException,
java.io.FileNotFoundException,
java.io.IOException,
javax.xml.transform.TransformerException</PRE>
<DL>
<DD>Get the filename from the 'select' or the 'file' attribute.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.net.MalformedURLException</CODE>
<DD><CODE>java.io.FileNotFoundException</CODE>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>javax.xml.transform.TransformerException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="urlToFileName(java.lang.String)"><!-- --></A><H3>
urlToFileName</H3>
<PRE>
private java.lang.String <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.321"><B>urlToFileName</B></A>(java.lang.String&nbsp;base)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="makeFormatterListener(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall, java.lang.String, boolean, boolean, boolean)"><!-- --></A><H3>
makeFormatterListener</H3>
<PRE>
private org.xml.sax.ContentHandler <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.352"><B>makeFormatterListener</B></A>(<A HREF="../../../../org/apache/xalan/extensions/XSLProcessorContext.html" title="class in org.apache.xalan.extensions">XSLProcessorContext</A>&nbsp;context,
<A HREF="../../../../org/apache/xalan/templates/ElemExtensionCall.html" title="class in org.apache.xalan.templates">ElemExtensionCall</A>&nbsp;elem,
java.lang.String&nbsp;fileName,
boolean&nbsp;shouldPutInTable,
boolean&nbsp;mkdirs,
boolean&nbsp;append)
throws java.net.MalformedURLException,
java.io.FileNotFoundException,
java.io.IOException,
javax.xml.transform.TransformerException</PRE>
<DL>
<DD>Create a new ContentHandler, based on attributes of the current ContentHandler.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.net.MalformedURLException</CODE>
<DD><CODE>java.io.FileNotFoundException</CODE>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>javax.xml.transform.TransformerException</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="startRedirection(org.apache.xalan.transformer.TransformerImpl, org.xml.sax.ContentHandler)"><!-- --></A><H3>
startRedirection</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.448"><B>startRedirection</B></A>(<A HREF="../../../../org/apache/xalan/transformer/TransformerImpl.html" title="class in org.apache.xalan.transformer">TransformerImpl</A>&nbsp;transf,
org.xml.sax.ContentHandler&nbsp;formatter)</PRE>
<DL>
<DD>A class that extends this class can over-ride this public method and recieve
a callback that redirection is about to start
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>transf</CODE> - The transformer.<DD><CODE>formatter</CODE> - The handler that receives the redirected output</DL>
</DD>
</DL>
<HR>
<A NAME="endRedirection(org.apache.xalan.transformer.TransformerImpl)"><!-- --></A><H3>
endRedirection</H3>
<PRE>
public void <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.459"><B>endRedirection</B></A>(<A HREF="../../../../org/apache/xalan/transformer/TransformerImpl.html" title="class in org.apache.xalan.transformer">TransformerImpl</A>&nbsp;transf)</PRE>
<DL>
<DD>A class that extends this class can over-ride this public method and receive
a callback that redirection to the ContentHandler specified in the startRedirection()
call has ended
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>transf</CODE> - The transformer.</DL>
</DD>
</DL>
<HR>
<A NAME="createSerializationHandler(org.apache.xalan.transformer.TransformerImpl, java.io.FileOutputStream, java.io.File, org.apache.xalan.templates.OutputProperties)"><!-- --></A><H3>
createSerializationHandler</H3>
<PRE>
public <A HREF="../../../../org/apache/xml/serializer/SerializationHandler.html" title="interface in org.apache.xml.serializer">SerializationHandler</A> <A HREF="../../../../src-html/org/apache/xalan/lib/Redirect.html#line.476"><B>createSerializationHandler</B></A>(<A HREF="../../../../org/apache/xalan/transformer/TransformerImpl.html" title="class in org.apache.xalan.transformer">TransformerImpl</A>&nbsp;transformer,
java.io.FileOutputStream&nbsp;ostream,
java.io.File&nbsp;file,
<A HREF="../../../../org/apache/xalan/templates/OutputProperties.html" title="class in org.apache.xalan.templates">OutputProperties</A>&nbsp;format)
throws java.io.IOException,
javax.xml.transform.TransformerException</PRE>
<DL>
<DD>A class that extends this one could over-ride this public method and receive
a callback for the creation of the serializer used in the redirection.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>transformer</CODE> - The transformer<DD><CODE>ostream</CODE> - The output stream that the serializer wraps<DD><CODE>file</CODE> - The file associated with the ostream<DD><CODE>format</CODE> - The format parameter used to create the serializer
<DT><B>Returns:</B><DD>the serializer that the redirection will go to.
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE>
<DD><CODE>javax.xml.transform.TransformerException</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Redirect.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../org/apache/xalan/lib/PipeDocument.html" title="class in org.apache.xalan.lib"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/xalan/lib/SecuritySupport.html" title="class in org.apache.xalan.lib"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/xalan/lib/Redirect.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="Redirect.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>