18#if !defined(XALANFORMATTERWRITER_HEADER_GUARD_1357924680)
19#define XALANFORMATTERWRITER_HEADER_GUARD_1357924680
26#include <xercesc/sax/SAXException.hpp>
40using xercesc::MemoryManager;
51 template <
class WriterType>
61 m_newlineStringLength(0)
74 assert(m_newlineString != 0);
76 m_newlineStringLength =
length(m_newlineString);
82 assert(m_newlineString != 0 &&
length(m_newlineString) == m_newlineStringLength);
84 m_writer.write(m_newlineString, m_newlineStringLength);
102 template<
class WriterType>
105 typedef typename WriterType::value_type value_type;
118 for (
size_type i = 0 ; i < count ; i++ )
120 m_writer.write(value_type(XalanUnicode::charSpace));
146 result = m_stream->canTranscodeTo(theChar);
161 MemoryManager& theMemoryManager) :
224 return 0xD800u <= theChar && theChar <= 0xDBFFu ? true :
false;
230 return 0xDC00u <= theChar && theChar <= 0xDFFFu ? true :
false;
233 static XalanUnicodeChar
235 XalanDOMChar theHighSurrogate,
236 XalanDOMChar theLowSurrogate,
237 MemoryManager& theManager)
246 return ((theHighSurrogate - 0xD800u) << 10) + theLowSurrogate - 0xDC00u + 0x00010000u;
252 MemoryManager& theManager)
259 XalanMessages::InvalidScalar_1Param,
262 using xercesc::SAXException;
264 throw SAXException(theMessage.
c_str(), &theManager);
270 MemoryManager& theManager)
287 MemoryManager& theManager)
302 XalanMessages::InvalidSurrogatePair_2Param,
307 using xercesc::SAXException;
309 throw SAXException(theMessage.
c_str(),&theManager);
347 m_stringBuffer.push_back(XalanDOMChar(XalanUnicode::charAmpersand));
348 m_stringBuffer.push_back(XalanDOMChar(XalanUnicode::charNumberSign));
352 m_stringBuffer.push_back(XalanDOMChar(XalanUnicode::charSemicolon));
#define XALAN_CPP_NAMESPACE
virtual XalanOutputStream * getStream()
Get the stream associated with the writer...
const XalanDOMChar * c_str() const
static XalanDOMString & getMessage(XalanDOMString &theResultMessage, XalanMessages::Codes msgToLoad, const char *repText1, const char *repText2=0, const char *repText3=0, const char *repText4=0)
static const XalanDOMChar * defaultNewlineString()
const XalanDOMString & getOutputEncoding() const
Get the output encoding for the stream.
virtual const XalanDOMChar * getNewlineString() const
Get the string which is appropriate for inserting a line feed in the stream.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
NumberToDOMString(double theValue, XalanDOMString &theResult)
Converts a double value into a XalanDOMString.
NumberToHexDOMString(XMLUInt64 theValue, XalanDOMString &theResult)
Converts an 64-bit unsigned int value into a XalanDOMString.