18 #if !defined(FORMATTERTOXML_HEADER_GUARD_1357924680)
19 #define FORMATTERTOXML_HEADER_GUARD_1357924680
52 class XalanOutputStream;
65 eDefaultIndentAmount = 0
92 bool doIndent =
false,
93 int indent = eDefaultIndentAmount,
100 eFormat format = OUTPUT_METHOD_XML,
101 bool fBufferData =
true,
106 MemoryManager& theManager,
109 bool doIndent =
false,
110 int indent = eDefaultIndentAmount,
117 eFormat format = OUTPUT_METHOD_XML,
118 bool fBufferData =
true);
126 return m_stringBuffer.getMemoryManager();
132 setDocumentLocator(
const Locator*
const locator);
142 const XMLCh*
const name,
146 endElement(
const XMLCh*
const name);
150 const XMLCh*
const chars,
155 const XMLCh*
const chars,
159 entityReference(
const XMLCh*
const name);
163 const XMLCh*
const chars,
167 processingInstruction(
168 const XMLCh*
const target,
169 const XMLCh*
const data);
176 comment(
const XMLCh*
const data);
180 const XMLCh*
const ch,
187 getDoctypeSystem()
const;
190 getDoctypePublic()
const;
196 getMediaType()
const;
216 return m_shouldWriteXMLHeader;
222 m_shouldWriteXMLHeader = b;
240 return m_escapeCData;
298 const XalanDOMChar[],
316 assert(m_accumNameCharFunction != 0);
318 (this->*m_accumNameCharFunction)(ch);
329 assert(m_accumContentCharFunction != 0);
331 (this->*m_accumContentCharFunction)(ch);
347 assert(m_accumNameStringFunction != 0);
349 (this->*m_accumNameStringFunction)(chars);
361 assert(m_accumContentStringFunction != 0);
363 (this->*m_accumContentStringFunction)(chars);
379 const XalanDOMChar chars[],
383 assert(m_accumNameArrayFunction != 0);
385 (this->*m_accumNameArrayFunction)(chars, start,
length);
397 const XalanDOMChar chars[],
401 assert(m_accumContentArrayFunction != 0);
403 (this->*m_accumContentArrayFunction)(chars, start,
length);
418 assert(m_accumNameDOMStringFunction != 0);
420 (this->*m_accumNameDOMStringFunction)(str);
431 assert(m_accumContentDOMStringFunction != 0);
433 (this->*m_accumContentDOMStringFunction)(str);
443 const XalanDOMChar chars[],
484 openElementForChildren();
487 childNodesWereAdded();
492 return m_doIndent && (!m_ispreserve && !m_isprevtext);
517 writeNormalizedChars(
518 const XalanDOMChar ch[],
529 writeNumberedEntityReference(XalanUnicodeChar theNumber);
539 const XalanDOMChar* theString,
547 accumCommentData(
const XalanDOMChar* data);
556 throwInvalidUTF16SurrogateException(
558 MemoryManager& theManager);
568 throwInvalidUTF16SurrogateException(
571 MemoryManager& theManager);
581 throwInvalidCharacterException(
583 MemoryManager& theManager);
588 return (ch & 0xFC00) == 0xD800 ? true :
false;
599 XalanDOMChar m_attrCharsMap[SPECIALSSIZE];
601 XalanDOMChar m_charsMap[SPECIALSSIZE];
715 accumNameAsByte(XalanDOMChar ch);
726 accumNameAsByteDirect(XalanDOMChar ch);
736 accumContentAsByte(XalanDOMChar ch);
746 accumContentAsByteDirect(XalanDOMChar ch);
757 accumNameAsChar(XalanDOMChar ch);
768 accumNameAsCharDirect(XalanDOMChar ch);
776 accumContentAsChar(XalanDOMChar ch);
784 accumContentAsCharDirect(XalanDOMChar ch);
794 accumCharUTF(XalanDOMChar ch);
804 accumCharUTFDirect(XalanDOMChar ch);
815 accumNameString(
const XalanDOMChar* chars);
825 accumStringUTF(
const XalanDOMChar* chars);
835 accumStringUTFDirect(
const XalanDOMChar* chars);
845 accumContentString(
const XalanDOMChar* chars);
858 const XalanDOMChar chars[],
873 const XalanDOMChar chars[],
888 const XalanDOMChar chars[],
903 const XalanDOMChar chars[],
953 outputDocTypeDecl(
const XalanDOMChar* name);
962 const XalanDOMChar* name,
963 const XalanDOMChar* value);
978 accumNormalizedPIData(
979 const XalanDOMChar* theData,
987 bool m_bytesEqualChars;
994 bool m_spaceBeforeClose;
1028 static const XalanDOMChar s_doctypeHeaderStartString[];
1030 static const size_type s_doctypeHeaderStartStringLength;
1035 static const XalanDOMChar s_doctypeHeaderPublicString[];
1037 static const size_type s_doctypeHeaderPublicStringLength;
1042 static const XalanDOMChar s_doctypeHeaderSystemString[];
1044 static const size_type s_doctypeHeaderSystemStringLength;
1049 static const XalanDOMChar s_xmlHeaderStartString[];
1051 static const size_type s_xmlHeaderStartStringLength;
1056 static const XalanDOMChar s_xmlHeaderEncodingString[];
1058 static const size_type s_xmlHeaderEncodingStringLength;
1063 static const XalanDOMChar s_xmlHeaderStandaloneString[];
1065 static const size_type s_xmlHeaderStandaloneStringLength;
1070 static const XalanDOMChar s_xmlHeaderEndString[];
1072 static const size_type s_xmlHeaderEndStringLength;
1077 static const XalanDOMChar s_defaultVersionString[];
1079 static const size_type s_defaultVersionStringLength;
1084 static const XalanDOMChar s_xhtmlDocTypeString[];
1086 static const size_type s_xhtmlDocTypeStringLength;
1091 static const XalanDOMChar s_dtdCDATACloseString[];
1093 static const size_type s_dtdCDATACloseStringLength;
1113 AccumCharFunctionType m_accumNameCharFunction;
1119 AccumStringFunctionType m_accumNameStringFunction;
1125 AccumDOMStringFunctionType m_accumNameDOMStringFunction;
1131 AccumArrayFunctionType m_accumNameArrayFunction;
1137 AccumCharFunctionType m_accumContentCharFunction;
1143 AccumStringFunctionType m_accumContentStringFunction;
1149 AccumDOMStringFunctionType m_accumContentDOMStringFunction;
1155 AccumArrayFunctionType m_accumContentArrayFunction;
1160 FlushFunctionType m_flushFunction;
1165 const XalanDOMChar* m_newlineString;
1181 #endif // FORMATTERTOXML_HEADER_GUARD_1357924680