286N/A/*
286N/A * reserved comment block
286N/A * DO NOT REMOVE OR ALTER!
286N/A */
286N/A/*
286N/A * Copyright 1999-2004 The Apache Software Foundation.
286N/A *
286N/A * Licensed under the Apache License, Version 2.0 (the "License");
286N/A * you may not use this file except in compliance with the License.
286N/A * You may obtain a copy of the License at
286N/A *
286N/A * http://www.apache.org/licenses/LICENSE-2.0
286N/A *
286N/A * Unless required by applicable law or agreed to in writing, software
286N/A * distributed under the License is distributed on an "AS IS" BASIS,
286N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
286N/A * See the License for the specific language governing permissions and
286N/A * limitations under the License.
286N/A */
286N/A
286N/A
286N/Apackage com.sun.org.apache.xml.internal.serialize;
286N/A
286N/A
286N/Aimport java.io.OutputStream;
286N/Aimport java.io.Writer;
286N/A
286N/A
286N/A/**
286N/A * Implements an XHTML serializer supporting both DOM and SAX
286N/A * pretty serializing. For usage instructions see either {@link
286N/A * Serializer} or {@link BaseMarkupSerializer}.
286N/A *
286N/A * @deprecated This class was deprecated in Xerces 2.6.2. It is
286N/A * recommended that new applications use JAXP's Transformation API
286N/A * for XML (TrAX) for serializing XHTML. See the Xerces documentation
286N/A * for more information.
286N/A * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
286N/A * @see Serializer
286N/A */
286N/Apublic class XHTMLSerializer
286N/A extends HTMLSerializer
286N/A{
286N/A
286N/A
286N/A /**
286N/A * Constructs a new serializer. The serializer cannot be used without
286N/A * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
286N/A * first.
286N/A */
286N/A public XHTMLSerializer()
286N/A {
286N/A super( true, new OutputFormat( Method.XHTML, null, false ) );
286N/A }
286N/A
286N/A
286N/A /**
286N/A * Constructs a new serializer. The serializer cannot be used without
286N/A * calling {@link #setOutputCharStream} or {@link #setOutputByteStream}
286N/A * first.
286N/A */
286N/A public XHTMLSerializer( OutputFormat format )
286N/A {
286N/A super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
286N/A }
286N/A
286N/A
286N/A /**
286N/A * Constructs a new serializer that writes to the specified writer
286N/A * using the specified output format. If <tt>format</tt> is null,
286N/A * will use a default output format.
286N/A *
286N/A * @param writer The writer to use
286N/A * @param format The output format to use, null for the default
286N/A */
286N/A public XHTMLSerializer( Writer writer, OutputFormat format )
286N/A {
286N/A super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
286N/A setOutputCharStream( writer );
286N/A }
286N/A
286N/A
286N/A /**
286N/A * Constructs a new serializer that writes to the specified output
286N/A * stream using the specified output format. If <tt>format</tt>
286N/A * is null, will use a default output format.
286N/A *
286N/A * @param output The output stream to use
286N/A * @param format The output format to use, null for the default
286N/A */
286N/A public XHTMLSerializer( OutputStream output, OutputFormat format )
286N/A {
286N/A super( true, format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
286N/A setOutputByteStream( output );
286N/A }
286N/A
286N/A
286N/A public void setOutputFormat( OutputFormat format )
286N/A {
286N/A super.setOutputFormat( format != null ? format : new OutputFormat( Method.XHTML, null, false ) );
286N/A }
286N/A
286N/A
286N/A}