< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.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 package com.sun.org.apache.xml.internal.serialize;
  22 
  23 import com.sun.org.apache.xerces.internal.dom.AbortException;


  58 import org.w3c.dom.ls.LSException;
  59 import org.w3c.dom.ls.LSOutput;
  60 import org.w3c.dom.ls.LSSerializer;
  61 import org.w3c.dom.ls.LSSerializerFilter;
  62 
  63 /**
  64  * EXPERIMENTAL: Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer by
  65  * delegating serialization calls to <CODE>XMLSerializer</CODE>. LSSerializer
  66  * provides an API for serializing (writing) a DOM document out in an XML
  67  * document. The XML data is written to an output stream. During serialization
  68  * of XML data, namespace fixup is done when possible as defined in DOM Level 3
  69  * Core, Appendix B.
  70  *
  71  * @author Elena Litani, IBM
  72  * @author Gopal Sharma, Sun Microsystems
  73  * @author Arun Yadav, Sun Microsystems
  74  * @author Sunitha Reddy, Sun Microsystems
  75  *
  76  * @deprecated As of JDK 9, Xerces 2.9.0, replaced by
  77  * {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}


  78  */
  79 @Deprecated
  80 public class DOMSerializerImpl implements LSSerializer, DOMConfiguration {
  81 
  82     // TODO: When DOM Level 3 goes to REC replace method calls using
  83     // reflection for: getXmlEncoding, getInputEncoding and getXmlEncoding
  84     // with regular static calls on the Document object.
  85     // data
  86     // serializer
  87     private XMLSerializer serializer;
  88 
  89     // XML 1.1 serializer
  90     private XML11Serializer xml11Serializer;
  91 
  92     //Recognized parameters
  93     private DOMStringList fRecognizedParameters;
  94 
  95     /**
  96      * REVISIT: Currently we handle 3 different configurations, would be nice
  97      * just have one configuration that has different recognized parameters


   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 package com.sun.org.apache.xml.internal.serialize;
  21 
  22 import com.sun.org.apache.xerces.internal.dom.AbortException;


  57 import org.w3c.dom.ls.LSException;
  58 import org.w3c.dom.ls.LSOutput;
  59 import org.w3c.dom.ls.LSSerializer;
  60 import org.w3c.dom.ls.LSSerializerFilter;
  61 
  62 /**
  63  * EXPERIMENTAL: Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer by
  64  * delegating serialization calls to <CODE>XMLSerializer</CODE>. LSSerializer
  65  * provides an API for serializing (writing) a DOM document out in an XML
  66  * document. The XML data is written to an output stream. During serialization
  67  * of XML data, namespace fixup is done when possible as defined in DOM Level 3
  68  * Core, Appendix B.
  69  *
  70  * @author Elena Litani, IBM
  71  * @author Gopal Sharma, Sun Microsystems
  72  * @author Arun Yadav, Sun Microsystems
  73  * @author Sunitha Reddy, Sun Microsystems
  74  *
  75  * @deprecated As of JDK 9, Xerces 2.9.0, replaced by
  76  * {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}
  77  *
  78  * @LastModified: Oct 2017
  79  */
  80 @Deprecated
  81 public class DOMSerializerImpl implements LSSerializer, DOMConfiguration {
  82 
  83     // TODO: When DOM Level 3 goes to REC replace method calls using
  84     // reflection for: getXmlEncoding, getInputEncoding and getXmlEncoding
  85     // with regular static calls on the Document object.
  86     // data
  87     // serializer
  88     private XMLSerializer serializer;
  89 
  90     // XML 1.1 serializer
  91     private XML11Serializer xml11Serializer;
  92 
  93     //Recognized parameters
  94     private DOMStringList fRecognizedParameters;
  95 
  96     /**
  97      * REVISIT: Currently we handle 3 different configurations, would be nice
  98      * just have one configuration that has different recognized parameters


< prev index next >