< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java

Print this page


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
   3  * @LastModified: Oct 2017
   4  */
   5 /*
   6  * Licensed to the Apache Software Foundation (ASF) under one or more
   7  * contributor license agreements.  See the NOTICE file distributed with
   8  * this work for additional information regarding copyright ownership.
   9  * The ASF licenses this file to You under the Apache License, Version 2.0
  10  * (the "License"); you may not use this file except in compliance with
  11  * the License.  You may obtain a copy of the License at
  12  *
  13  *      http://www.apache.org/licenses/LICENSE-2.0
  14  *
  15  * Unless required by applicable law or agreed to in writing, software
  16  * distributed under the License is distributed on an "AS IS" BASIS,
  17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18  * See the License for the specific language governing permissions and
  19  * limitations under the License.
  20  */
  21 
  22 package com.sun.org.apache.xalan.internal.xsltc.runtime.output;
  23 


  32 
  33 import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM;
  34 import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXEventWriter;
  35 import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXStreamWriter;
  36 
  37 import com.sun.org.apache.xml.internal.serializer.ToHTMLSAXHandler;
  38 import com.sun.org.apache.xml.internal.serializer.ToHTMLStream;
  39 import com.sun.org.apache.xml.internal.serializer.ToTextSAXHandler;
  40 import com.sun.org.apache.xml.internal.serializer.ToTextStream;
  41 import com.sun.org.apache.xml.internal.serializer.ToUnknownStream;
  42 import com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler;
  43 import com.sun.org.apache.xml.internal.serializer.ToXMLStream;
  44 import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
  45 import org.w3c.dom.Node;
  46 
  47 import org.xml.sax.ContentHandler;
  48 import org.xml.sax.ext.LexicalHandler;
  49 
  50 /**
  51  * @author Santiago Pericas-Geertsen

  52  */
  53 public class TransletOutputHandlerFactory {
  54 
  55     public static final int STREAM = 0;
  56     public static final int SAX    = 1;
  57     public static final int DOM    = 2;
  58     public static final int STAX   = 3;
  59 
  60     private String _encoding                        = "utf-8";
  61     private String _method                          = null;
  62     private int    _outputType                      = STREAM;
  63     private OutputStream _ostream                   = System.out;
  64     private Writer _writer                          = null;
  65     private Node _node                              = null;
  66     private Node   _nextSibling                     = null;
  67     private XMLEventWriter _xmlStAXEventWriter      = null;
  68     private XMLStreamWriter _xmlStAXStreamWriter    = null;
  69     private int _indentNumber                       = -1;
  70     private ContentHandler _handler                 = null;
  71     private LexicalHandler _lexHandler              = null;


   1 /*
   2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.

   3  */
   4 /*
   5  * Licensed to the Apache Software Foundation (ASF) under one or more
   6  * contributor license agreements.  See the NOTICE file distributed with
   7  * this work for additional information regarding copyright ownership.
   8  * The ASF licenses this file to You under the Apache License, Version 2.0
   9  * (the "License"); you may not use this file except in compliance with
  10  * the License.  You may obtain a copy of the License at
  11  *
  12  *      http://www.apache.org/licenses/LICENSE-2.0
  13  *
  14  * Unless required by applicable law or agreed to in writing, software
  15  * distributed under the License is distributed on an "AS IS" BASIS,
  16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xalan.internal.xsltc.runtime.output;
  22 


  31 
  32 import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2DOM;
  33 import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXEventWriter;
  34 import com.sun.org.apache.xalan.internal.xsltc.trax.SAX2StAXStreamWriter;
  35 
  36 import com.sun.org.apache.xml.internal.serializer.ToHTMLSAXHandler;
  37 import com.sun.org.apache.xml.internal.serializer.ToHTMLStream;
  38 import com.sun.org.apache.xml.internal.serializer.ToTextSAXHandler;
  39 import com.sun.org.apache.xml.internal.serializer.ToTextStream;
  40 import com.sun.org.apache.xml.internal.serializer.ToUnknownStream;
  41 import com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler;
  42 import com.sun.org.apache.xml.internal.serializer.ToXMLStream;
  43 import com.sun.org.apache.xml.internal.serializer.SerializationHandler;
  44 import org.w3c.dom.Node;
  45 
  46 import org.xml.sax.ContentHandler;
  47 import org.xml.sax.ext.LexicalHandler;
  48 
  49 /**
  50  * @author Santiago Pericas-Geertsen
  51  * @LastModified: Oct 2017
  52  */
  53 public class TransletOutputHandlerFactory {
  54 
  55     public static final int STREAM = 0;
  56     public static final int SAX    = 1;
  57     public static final int DOM    = 2;
  58     public static final int STAX   = 3;
  59 
  60     private String _encoding                        = "utf-8";
  61     private String _method                          = null;
  62     private int    _outputType                      = STREAM;
  63     private OutputStream _ostream                   = System.out;
  64     private Writer _writer                          = null;
  65     private Node _node                              = null;
  66     private Node   _nextSibling                     = null;
  67     private XMLEventWriter _xmlStAXEventWriter      = null;
  68     private XMLStreamWriter _xmlStAXStreamWriter    = null;
  69     private int _indentNumber                       = -1;
  70     private ContentHandler _handler                 = null;
  71     private LexicalHandler _lexHandler              = null;


< prev index next >