1 /* 2 * Copyright (c) 2015, 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 22 package com.sun.org.apache.xml.internal.serialize; 23 24 25 import java.util.Map; 26 27 28 /** 29 * Holds the state of the currently serialized element. 30 * 31 * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a> 32 * @see BaseMarkupSerializer 33 * 34 * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation 35 * is replaced by that of Xalan. Main class 36 * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced 37 * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. 38 */ 39 public class ElementState 40 { 41 42 43 /** 44 * The element's raw tag name (local or prefix:local). 45 */ 46 public String rawName; 47 48 49 /** 50 * The element's local tag name. 51 */ 52 public String localName; 53 54 55 /** 56 * The element's namespace URI. 57 */ 58 public String namespaceURI; 59 60 61 /** 62 * True if element is space preserving. 63 */ 64 public boolean preserveSpace; 65 66 67 /** 68 * True if element is empty. Turns false immediately 69 * after serializing the first contents of the element. 70 */ 71 public boolean empty; 72 73 74 /** 75 * True if the last serialized node was an element node. 76 */ 77 public boolean afterElement; 78 79 80 /** 81 * True if the last serialized node was a comment node. 82 */ 83 public boolean afterComment; 84 85 86 /** 87 * True if textual content of current element should be 88 * serialized as CDATA section. 89 */ 90 public boolean doCData; 91 92 93 /** 94 * True if textual content of current element should be 95 * serialized as raw characters (unescaped). 96 */ 97 public boolean unescaped; 98 99 100 /** 101 * True while inside CData and printing text as CData. 102 */ 103 public boolean inCData; 104 105 106 /** 107 * Association between namespace URIs (keys) and prefixes (values). 108 */ 109 public Map<String, String> prefixes; 110 111 112 }