📄 transformer.html
字号:
<DD>Set the output properties for the transformation. These properties will override properties set in the Templates with xsl:output. <p>If argument to this function is null, any properties previously set are removed, and the value will revert to the value defined in the templates object.</p> <p>Pass a qualified property key name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.</p> <p>For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>oformat</CODE> - A set of output properties that will be used to override any of the same properties in affect for the transformation.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if any of the argument keys are not recognized and are not namespace qualified.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/transform/OutputKeys.html" title="class in javax.xml.transform"><CODE>OutputKeys</CODE></A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util"><CODE>Properties</CODE></A></DL></DD></DL><HR><A NAME="getOutputProperties()"><!-- --></A><H3>getOutputProperties</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A> <B>getOutputProperties</B>()</PRE><DL><DD>Get a copy of the output properties for the transformation. <p>The properties returned should contain properties set by the user, and properties set by the stylesheet, and these properties are "defaulted" by default properties specified by <a href="http://www.w3.org/TR/xslt#output">section 16 of the XSL Transformations (XSLT) W3C Recommendation</a>. The properties that were specifically set by the user or the stylesheet should be in the base Properties list, while the XSLT default properties that were not specifically set should be the default Properties list. Thus, getOutputProperties().getProperty(String key) will obtain any property in that was set by <A HREF="../../../javax/xml/transform/Transformer.html#setOutputProperty(java.lang.String, java.lang.String)"><CODE>setOutputProperty(java.lang.String, java.lang.String)</CODE></A>, <A HREF="../../../javax/xml/transform/Transformer.html#setOutputProperties(java.util.Properties)"><CODE>setOutputProperties(java.util.Properties)</CODE></A>, in the stylesheet, <em>or</em> the default properties, while getOutputProperties().get(String key) will only retrieve properties that were explicitly set by <A HREF="../../../javax/xml/transform/Transformer.html#setOutputProperty(java.lang.String, java.lang.String)"><CODE>setOutputProperty(java.lang.String, java.lang.String)</CODE></A>, <A HREF="../../../javax/xml/transform/Transformer.html#setOutputProperties(java.util.Properties)"><CODE>setOutputProperties(java.util.Properties)</CODE></A>, or in the stylesheet.</p> <p>Note that mutation of the Properties object returned will not effect the properties that the transformation contains.</p> <p>If any of the argument keys are not recognized and are not namespace qualified, the property will be ignored. In other words the behaviour is not orthogonal with setOutputProperties.</p><P><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/xml/transform/OutputKeys.html" title="class in javax.xml.transform"><CODE>OutputKeys</CODE></A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Properties.html" title="class or interface in java.util"><CODE>Properties</CODE></A></DL></DD></DL><HR><A NAME="setOutputProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>setOutputProperty</H3><PRE>public abstract void <B>setOutputProperty</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> value) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Set an output property that will be in effect for the transformation. <p>Pass a qualified property name as a two-part string, the namespace URI enclosed in curly braces ({}), followed by the local name. If the name has a null URL, the String only contain the local name. An application can safely check for a non-null URI by testing to see if the first character of the name is a '{' character.</p> <p>For example, if a URI and local name were obtained from an element defined with <xyz:foo xmlns:xyz="http://xyz.foo.com/yada/baz.html"/>, then the qualified name would be "{http://xyz.foo.com/yada/baz.html}foo". Note that no prefix is used.</p> <p>The Properties object that was passed to <A HREF="../../../javax/xml/transform/Transformer.html#setOutputProperties(java.util.Properties)"><CODE>setOutputProperties(java.util.Properties)</CODE></A> won't be effected by calling this method.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A non-null String that specifies an output property name, which may be namespace qualified.<DD><CODE>value</CODE> - The non-null string value of the output property.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - If the property is not supported, and is not qualified with a namespace.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/transform/OutputKeys.html" title="class in javax.xml.transform"><CODE>OutputKeys</CODE></A></DL></DD></DL><HR><A NAME="getOutputProperty(java.lang.String)"><!-- --></A><H3>getOutputProperty</H3><PRE>public abstract <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getOutputProperty</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Get an output property that is in effect for the transformation. The property specified may be a property that was set with setOutputProperty, or it may be a property specified in the stylesheet.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - A non-null String that specifies an output property name, which may be namespace qualified.<DT><B>Returns:</B><DD>The string value of the output property, or null if no property was found.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - If the property is not supported.<DT><B>See Also:</B><DD><A HREF="../../../javax/xml/transform/OutputKeys.html" title="class in javax.xml.transform"><CODE>OutputKeys</CODE></A></DL></DD></DL><HR><A NAME="setErrorListener(javax.xml.transform.ErrorListener)"><!-- --></A><H3>setErrorListener</H3><PRE>public abstract void <B>setErrorListener</B>(<A HREF="../../../javax/xml/transform/ErrorListener.html" title="interface in javax.xml.transform">ErrorListener</A> listener) throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE><DL><DD>Set the error event listener in effect for the transformation.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The new error listener.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if listener is null.</DL></DD></DL><HR><A NAME="getErrorListener()"><!-- --></A><H3>getErrorListener</H3><PRE>public abstract <A HREF="../../../javax/xml/transform/ErrorListener.html" title="interface in javax.xml.transform">ErrorListener</A> <B>getErrorListener</B>()</PRE><DL><DD>Get the error event handler in effect for the transformation.<P><DD><DL><DT><B>Returns:</B><DD>The current error handler, which should never be null.</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=3 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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/xml/transform/OutputKeys.html" title="class in javax.xml.transform"><B>PREV CLASS</B></A> <A HREF="../../../javax/xml/transform/TransformerFactory.html" title="class in javax.xml.transform"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="Transformer.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -