1 16 19 package org.apache.xml.serializer; 20 21 50 class ElemContext 51 { 52 54 57 final int m_currentElemDepth; 58 59 60 ElemDesc m_elementDesc = null; 61 62 65 String m_elementLocalName = null; 66 67 70 String m_elementName = null; 71 72 75 String m_elementURI = null; 76 77 81 boolean m_isCdataSection; 82 83 86 boolean m_isRaw = false; 87 88 100 private ElemContext m_next; 101 102 103 final ElemContext m_prev; 104 105 109 boolean m_startTagOpen = false; 110 111 115 ElemContext() 116 { 117 m_prev = this; 119 m_currentElemDepth = 0; 121 } 122 123 133 private ElemContext(final ElemContext previous) 134 { 135 m_prev = previous; 136 m_currentElemDepth = previous.m_currentElemDepth + 1; 137 } 138 139 143 final ElemContext pop() 144 { 145 149 return this.m_prev; 150 } 151 152 159 final ElemContext push() 160 { 161 ElemContext frame = this.m_next; 162 if (frame == null) 163 { 164 167 frame = new ElemContext(this); 168 this.m_next = frame; 169 } 170 176 frame.m_startTagOpen = true; 177 return frame; 178 } 179 180 190 final ElemContext push( 191 final String uri, 192 final String localName, 193 final String qName) 194 { 195 ElemContext frame = this.m_next; 196 if (frame == null) 197 { 198 201 frame = new ElemContext(this); 202 this.m_next = frame; 203 } 204 205 frame.m_elementName = qName; 207 frame.m_elementLocalName = localName; 208 frame.m_elementURI = uri; 209 frame.m_isCdataSection = false; 210 frame.m_startTagOpen = true; 211 212 return frame; 215 } 216 } 217 | Popular Tags |