MCPcopy Create free account
hub / github.com/GateNLP/gate-core / doState4

Method doState4

src/main/java/gate/sgml/Sgml2Xml.java:206–226  ·  view source on GitHub ↗

We read the name of the element and we prepare for '>' or attributes '>' -> state 1 any char !- white space -> state 5

(char currChar)

Source from the content-addressed store, hash-verified

204 * any char !- white space -> state 5
205 */
206 private void doState4(char currChar){
207 if ( '>' == currChar ){
208 // this is also the pos where to insert '/' for empty elements in this case
209 closePos = m_cursor -1 ;
210
211 // we put the element into stack
212 // we think in this point that the element is empty...
213 performFinalAction(elemName, closePos);
214
215 // go to state 1
216 m_currState = 1;
217 }
218 if (( '>' != currChar ) && !isWhiteSpace(currChar)){
219 // we just read the first char from the attrib name or attrib value..
220 // go to state 5
221 m_currState = 5;
222
223 // remember the position where starts the attrib or the value of an attrib
224 attrStart = m_cursor - 1;
225 }
226 } // doState4
227
228 /**
229 * '=' -> state 6

Callers 1

convertMethod · 0.95

Calls 2

performFinalActionMethod · 0.95
isWhiteSpaceMethod · 0.95

Tested by

no test coverage detected