18 #if !defined(XALANIDENTWRITER_HEADER_GUARD_1357924680)
19 #define XALANIDENTWRITER_HEADER_GUARD_1357924680
35 class WhiteSpaceWriter,
48 m_whiteSpaceWriter(writer),
49 m_newLineWriter(writer),
52 m_startNewLine(false),
55 m_preserves(writer.getMemoryManager(), 5)
57 assert( m_indent != -1);
82 if(m_startNewLine ==
true)
87 m_whiteSpaceWriter(m_currentIndent);
95 m_currentIndent += m_indent;
101 assert( m_currentIndent >= m_indent);
103 m_currentIndent -= m_indent;
109 m_startNewLine = value;
124 m_isprevtext = value;
130 m_ispreserve = value;
136 if ( m_preserves.empty() )
138 m_ispreserve =
false;
142 m_ispreserve = m_preserves.back();
144 m_preserves.pop_back();
151 m_preserves.push_back(m_ispreserve);
158 return (!m_ispreserve && !m_isprevtext);
166 WhiteSpaceWriter m_whiteSpaceWriter;
168 NewLineWriter m_newLineWriter;
201 BoolStackType m_preserves;
208 #endif // XALANIDENTWRITER_HEADER_GUARD_1357924680