Xalan-C++ API Reference  1.12.0
XalanXMLSerializerBase.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALANXMLSERIALIZERBASE_HEADER_GUARD_1357924680)
19 #define XALANXMLSERIALIZERBASE_HEADER_GUARD_1357924680
20 
21 
22 
23 
24 // Base include file. Must be first.
26 
27 
28 
30 
31 
32 
34 
35 
36 
37 // Base class header file.
39 
40 
41 
42 namespace XALAN_CPP_NAMESPACE {
43 
44 
45 
46 class XalanOutputStream;
47 
48 
49 
50 using xercesc::MemoryManager;
51 
52 
53 
54 /**
55  * XalanXMLSerializerBase serves as a base class for XML serializers based on
56  * FormatterListener events.
57  */
59 {
60 public:
61 
62  /**
63  * Perform static initialization. See class XMLSupportInit.
64  */
65  static void
66  initialize(MemoryManager& theManager);
67 
68  /**
69  * Perform static shut down. See class XMLSupportInit.
70  */
71  static void
72  terminate();
73 
74 
75  /**
76  * Constructor
77  *
78  * @param theManager The MemoryManager instance to use for any memory
79  * allocations
80  * @param doctypeSystem system identifier to be used in the document
81  * type declaration
82  * @param doctypePublic public identifier to be used in the document
83  * type declaration
84  * @param xmlDecl true if the XSLT processor should output an XML
85  * declaration
86  * @param theStandalone The string the XSLT processor should output for
87  * the standalone document declaration
88  */
90  MemoryManager& theManager,
91  eXMLVersion theXMLVersion,
92  const XalanDOMString& theEncoding,
93  const XalanDOMString& theDoctypeSystem,
94  const XalanDOMString& theDoctypePublic,
95  bool xmlDecl,
96  const XalanDOMString& theStandalone);
97 
98  virtual
100 
101  MemoryManager&
103  {
104  return m_elemStack.getMemoryManager();
105  }
106 
107 
108  // These methods are inherited from FormatterListener ...
109 
110  virtual void
111  setDocumentLocator(const Locator* const locator);
112 
113  virtual void
114  startDocument();
115 
116  virtual void
117  startElement(
118  const XMLCh* const name,
119  AttributeList& attrs) = 0;
120 
121  virtual void
122  endElement(const XMLCh* const name) = 0;
123 
124  virtual void
125  characters(
126  const XMLCh* const chars,
127  const size_type length);
128 
129  virtual void
130  charactersRaw(
131  const XMLCh* const chars,
132  const size_type length) = 0;
133 
134  virtual void
135  entityReference(const XMLCh* const name) = 0;
136 
137  virtual void
138  ignorableWhitespace(
139  const XMLCh* const chars,
140  const size_type length);
141 
142  virtual void
143  processingInstruction(
144  const XMLCh* const target,
145  const XMLCh* const data);
146 
147  virtual void
148  resetDocument();
149 
150  virtual void
151  comment(const XMLCh* const data) = 0;
152 
153  virtual void
154  cdata(
155  const XMLCh* const ch,
156  const size_type length);
157 
158  virtual const XalanDOMString&
159  getDoctypeSystem() const;
160 
161  virtual const XalanDOMString&
162  getDoctypePublic() const;
163 
164  virtual const XalanDOMString&
165  getEncoding() const;
166 
167  const XalanDOMString&
168  getVersion() const
169  {
170  return m_version;
171  }
172 
173  const XalanDOMString&
175  {
176  return m_standalone;
177  }
178 
179  bool
181  {
182  return m_shouldWriteXMLHeader;
183  }
184 
185  void
187  {
188  m_shouldWriteXMLHeader = b;
189  }
190 
192 
193 
195 
197 
198 
200  {
201  public:
202 
203  // Static data members...
204  /**
205  * The string "UTF-8".
206  */
208 
209  /**
210  * The string "<!DOCTYPE ".
211  */
212  static const char s_doctypeHeaderStartString[];
213 
215 
216  /**
217  * The string " PUBLIC \"".
218  */
219  static const char s_doctypeHeaderPublicString[];
220 
222 
223  /**
224  * The string " SYSTEM \"".
225  */
226  static const char s_doctypeHeaderSystemString[];
227 
229 
230  /**
231  * The string "<?xml version=\"".
232  */
233  static const char s_xmlHeaderStartString[];
234 
236 
237  /**
238  * The string "\" encoding=\"".
239  */
240  static const char s_xmlHeaderEncodingString[];
241 
243 
244  /**
245  * The string "\" standalone=\"".
246  */
247  static const char s_xmlHeaderStandaloneString[];
248 
250 
251  /**
252  * The string "\"?>".
253  */
254  static const char s_xmlHeaderEndString[];
255 
257 
258  /**
259  * The string "1.0".
260  */
261  static const char s_defaultVersionString[];
262 
264 
265  /**
266  * The string "-//W3C//DTD XHTML".
267  */
268  static const XalanDOMChar s_xhtmlDocTypeString[];
269 
271 
272  /**
273  * The string "<![CDATA[".
274  */
275  static const char s_cdataOpenString[];
276 
278 
279  /**
280  * The string "]]>".
281  */
282  static const char s_cdataCloseString[];
283 
285 
286  /**
287  * The string "&lt;".
288  */
289  static const char s_lessThanEntityString[];
290 
292 
293  /**
294  * The string "&gt;".
295  */
296  static const char s_greaterThanEntityString[];
297 
299 
300  /**
301  * The string "&amp;".
302  */
303  static const char s_ampersandEntityString[];
304 
306 
307  /**
308  * The string "&quot;".
309  */
310  static const char s_quoteEntityString[];
311 
313  };
314 
316  {
317  public:
318 
319  /**
320  * The string "UTF-16".
321  */
323 
324  /**
325  * The string "<!DOCTYPE ".
326  */
327  static const XalanDOMChar s_doctypeHeaderStartString[];
328 
330 
331  /**
332  * The string " PUBLIC \"".
333  */
334  static const XalanDOMChar s_doctypeHeaderPublicString[];
335 
337 
338  /**
339  * The string " SYSTEM \"".
340  */
341  static const XalanDOMChar s_doctypeHeaderSystemString[];
342 
344 
345  /**
346  * The string "<?xml version=\"".
347  */
348  static const XalanDOMChar s_xmlHeaderStartString[];
349 
351 
352  /**
353  * The string "\" encoding=\"".
354  */
355  static const XalanDOMChar s_xmlHeaderEncodingString[];
356 
358 
359  /**
360  * The string "\" standalone=\"".
361  */
362  static const XalanDOMChar s_xmlHeaderStandaloneString[];
363 
365 
366  /**
367  * The string "\"?>".
368  */
369  static const XalanDOMChar s_xmlHeaderEndString[];
370 
372 
373  /**
374  * The string "1.0".
375  */
376  static const XalanDOMChar s_defaultVersionString[];
377 
379 
380  /**
381  * The string "-//W3C//DTD XHTML".
382  */
383  static const XalanDOMChar s_xhtmlDocTypeString[];
384 
386 
387  /**
388  * The string "<![CDATA[".
389  */
390  static const XalanDOMChar s_cdataOpenString[];
391 
393 
394  /**
395  * The string "]]>".
396  */
397  static const XalanDOMChar s_cdataCloseString[];
398 
400 
401  /**
402  * The string "&lt;".
403  */
404  static const XalanDOMChar s_lessThanEntityString[];
405 
407 
408  /**
409  * The string "&gt;".
410  */
411  static const XalanDOMChar s_greaterThanEntityString[];
412 
414 
415  /**
416  * The string "&amp;".
417  */
418  static const XalanDOMChar s_ampersandEntityString[];
419 
421 
422  /**
423  * The string "&quot;".
424  */
425  static const XalanDOMChar s_quoteEntityString[];
426 
428  };
429 
430  enum
431  {
432  eBufferSize = 512 // The size of the buffer
433  };
434 
436  {
437  public:
438 
439  bool
440  attribute(XalanDOMChar theChar) const
441  {
442  return theChar > s_lastSpecial ?
443  false :
444  s_specialChars[theChar] > eNone;
445  }
446 
447  bool
448  content(XalanDOMChar theChar) const
449  {
450  return theChar > s_lastSpecial ?
451  false :
452  s_specialChars[theChar] > eAttr;
453  }
454 
455  bool
456  range(XalanDOMChar theChar) const
457  {
458  assert(theChar > 0);
459 
460  return theChar > s_lastSpecial;
461  }
462 
463  bool
464  isForbidden(XalanDOMChar theChar) const
465  {
466  return theChar > s_lastSpecial ?
467  false :
468  s_specialChars[theChar] == eForb;
469  }
470 
471  bool
472  isCharRefForbidden(XalanDOMChar theChar) const
473  {
474  return theChar > s_lastSpecial ?
475  false :
476  s_specialChars[theChar] == eForb;
477  }
478 
479 
480  private:
481  static const size_t s_lastSpecial;
482 
483  static const char s_specialChars[];
484  };
485 
486 
487 
489  {
490  public:
491 
492  bool
493  attribute(XalanDOMChar theChar) const
494  {
495  return theChar > s_lastSpecial ?
496  false :
497  s_specialChars[theChar] > eNone;
498  }
499 
500  bool
501  content(XalanDOMChar theChar) const
502  {
503  return theChar > s_lastSpecial ?
504  false :
505  s_specialChars[theChar] > eAttr;
506  }
507 
508  bool
509  range(XalanDOMChar theChar) const
510  {
511  assert(theChar > 0);
512 
513  return theChar > s_lastSpecial;
514  }
515 
516  bool
517  isForbidden(XalanDOMChar theChar) const
518  {
519  return theChar > s_lastSpecial ?
520  false :
521  s_specialChars[theChar] == eForb;
522  }
523 
524  bool
525  isCharRefForbidden(XalanDOMChar theChar) const
526  {
527  return theChar > s_lastSpecial ?
528  false :
529  s_specialChars[theChar] == eCRFb;
530  }
531 
532  private:
533  static const size_t s_lastSpecial;
534 
535  static const char s_specialChars[];
536 
537  };
538 
539 
540 
541 
542  enum
543  {
544  eNone = 0u,
545  eAttr = 1u, // A flag to indicate a value in s_specialChars applies to attributes
546  eBoth = 2u, // A flag to indicate a value in s_specialChars applies to both content and attributes
547  eForb = 4u, // A flag to indicate a forbidden value in s_specialChars
548  // XML1.1 put a requirement to output chars #x1...#x1F and #x7F...#x9F as charRefs only
549  // In the comments , PI and CDATA usage of charRefs is forbidden, so we will report an error in
550  eCRFb = 5u // that case. For the elemets and attributes is should work the same as eBoth
551  };
552 
553 
554 
555 protected:
556 
557  virtual void
558  writeXMLHeader() = 0;
559 
560  virtual void
561  flushBuffer() = 0;
562 
563  virtual void
564  writeDoctypeDecl(const XalanDOMChar* name) = 0;
565 
566  virtual void
567  writeProcessingInstruction(
568  const XMLCh* target,
569  const XMLCh* data) = 0;
570 
571  virtual void
572  writeCharacters(
573  const XMLCh* chars,
574  size_type length) = 0;
575 
576  virtual void
577  writeCDATA(
578  const XMLCh* chars,
579  size_type length) = 0;
580 
581  virtual void
582  outputNewline() = 0;
583 
584  /**
585  * Mark the parent element as having a child. If this
586  * is the first child, return true, otherwise, return
587  * false. This allows the child element to determine
588  * if the parent tag has already been closed.
589  *
590  * @return true if the parent element has not been previously marked for children.
591  */
592  bool
594  {
595  if(!m_elemStack.empty())
596  {
597  // See if the parent element has already been flagged as having children.
598  if(false == m_elemStack.back())
599  {
600  m_elemStack.back() = true;
601 
602  return true;
603  }
604  }
605 
606  return false;
607  }
608 
609  /**
610  * Determine if it a DOCTYPE declaration needs to
611  * be written.
612  */
613  bool
615  {
616  return m_needToOutputDoctypeDecl;
617  }
618 
619  /**
620  * Open an element for possibile children
621  */
622  void
624  {
625  m_elemStack.push_back(false);
626  }
627 
628  bool
630  {
631  return m_elemStack.empty();
632  }
633 
634  /**
635  * Determine if an element ever had any children added.
636  *
637  * @return true if the children were added, false if not.
638  */
639  bool
641  {
642  bool fResult = false;
643 
644  if (m_elemStack.empty() == false)
645  {
646  fResult = m_elemStack.back();
647 
648  m_elemStack.pop_back();
649  }
650 
651  return fResult;
652  }
653 
654  void
655  generateDoctypeDecl(const XalanDOMChar* name)
656  {
657  if(true == m_needToOutputDoctypeDecl)
658  {
659  assert(m_doctypeSystem.empty() == false);
660 
661  writeDoctypeDecl(name);
662 
663  m_needToOutputDoctypeDecl = false;
664  }
665  }
666 
667  /**
668  * Tell if the next text should be raw.
669  */
671 
672  /**
673  * Add space before '/>' for XHTML.
674  */
676 
677  /**
678  * The System ID for the doc type.
679  */
681 
682  /**
683  * The public ID for the doc type.
684  */
686 
687  /**
688  * Tells the XML version, for writing out to the XML decl.
689  */
691 
692  /**
693  * Text for standalone part of header.
694  */
696 
698 
699  static bool
700  isUTF16HighSurrogate(XalanDOMChar theChar)
701  {
702  return 0xD800u <= theChar && theChar <= 0xDBFFu ? true : false;
703  }
704 
705  static bool
706  isUTF16LowSurrogate(XalanDOMChar theChar)
707  {
708  return 0xDC00u <= theChar && theChar <= 0xDFFFu ? true : false;
709  }
710 
711  static XalanUnicodeChar
712  decodeUTF16SurrogatePair(
713  XalanDOMChar theHighSurrogate,
714  XalanDOMChar theLowSurrogate,
715  MemoryManager& theManager);
716 
717  /**
718  * Throw an exception when an invalid
719  * surrogate is encountered.
720  * @param ch The first character in the surrogate
721  */
722  static void
723  throwInvalidUTF16SurrogateException(
724  XalanDOMChar ch,
725  MemoryManager& theManager);
726 
727  /**
728  * Throw an exception when an invalid
729  * surrogate is encountered.
730  * @param ch The first character in the surrogate
731  * @param next The next character in the surrogate
732  */
733  static void
734  throwInvalidUTF16SurrogateException(
735  XalanDOMChar ch,
736  XalanDOMChar next,
737  MemoryManager& theManager);
738 
739  /**
740  * Throw an exception when an invalid
741  * character is encountered.
742  * @param ch The first character in the surrogate
743  * @param next The next character in the surrogate
744  */
745  static void
746  throwInvalidCharacterException(
747  XalanUnicodeChar ch,
748  MemoryManager& theManager);
749 
750 
751  /**
752  * Throw an exception when an invalid
753  * character for the specific XML version is encountered.
754  * @param ch The first character in the surrogate
755  * @param next The next character in the surrogate
756  */
757  static void
758  throwInvalidXMLCharacterException(
759  XalanUnicodeChar ch,
760  const XalanDOMString& theXMLversion,
761  MemoryManager& theManager);
762 private:
763 
764  // These are not implemented.
766 
768  operator=(const XalanXMLSerializerBase&);
769 
770  bool
771  operator==(const XalanXMLSerializerBase&) const;
772 
773  // Data members...
774  /**
775  * Flag to tell that we need to add the doctype decl,
776  * which we can't do until the first element is
777  * encountered.
778  */
779  bool m_needToOutputDoctypeDecl;
780 
781  /**
782  * If true, XML header should be written to output.
783  */
784  bool m_shouldWriteXMLHeader;
785 
786  /**
787  * A stack of Boolean objects that tell if the given element
788  * has children.
789  */
790  BoolStackType m_elemStack;
791 
792  /**
793  * The string "-//W3C//DTD XHTML".
794  */
795  static const XalanDOMChar s_xhtmlDocTypeString[];
796 
797  static const size_type s_xhtmlDocTypeStringLength;
798 };
799 
800 
801 
802 }
803 
804 
805 
806 #endif // XALANXMLSERIALIZERBASE_HEADER_GUARD_1357924680
xalanc::XalanXMLSerializerBase::generateDoctypeDecl
void generateDoctypeDecl(const XalanDOMChar *name)
Definition: XalanXMLSerializerBase.hpp:655
xalanc::XalanXMLSerializerBase::getShouldWriteXMLHeader
bool getShouldWriteXMLHeader() const
Definition: XalanXMLSerializerBase.hpp:180
xalanc::XalanXMLSerializerBase::UTF8::s_doctypeHeaderSystemStringLength
static const size_type s_doctypeHeaderSystemStringLength
Definition: XalanXMLSerializerBase.hpp:228
xalanc::XalanXMLSerializerBase::s_1_1String
static const XalanDOMString & s_1_1String
Definition: XalanXMLSerializerBase.hpp:196
xalanc::XalanXMLSerializerBase::CharFunctor1_0
Definition: XalanXMLSerializerBase.hpp:435
xalanc::XalanXMLSerializerBase::CharFunctor1_0::range
bool range(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:456
xalanc::XalanXMLSerializerBase::m_doctypePublic
const XalanDOMString m_doctypePublic
The public ID for the doc type.
Definition: XalanXMLSerializerBase.hpp:685
xalanc::XalanXMLSerializerBase::UTF16::s_quoteEntityStringLength
static const size_type s_quoteEntityStringLength
Definition: XalanXMLSerializerBase.hpp:427
xalanc::XalanXMLSerializerBase::getMemoryManager
MemoryManager & getMemoryManager()
Definition: XalanXMLSerializerBase.hpp:102
xalanc::XalanXMLSerializerBase::setShouldWriteXMLHeader
void setShouldWriteXMLHeader(bool b)
Definition: XalanXMLSerializerBase.hpp:186
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanXMLSerializerBase::UTF16::s_doctypeHeaderPublicStringLength
static const size_type s_doctypeHeaderPublicStringLength
Definition: XalanXMLSerializerBase.hpp:336
xalanc::XalanXMLSerializerBase::openElementForChildren
void openElementForChildren()
Open an element for possibile children.
Definition: XalanXMLSerializerBase.hpp:623
xalanc::XalanXMLSerializerBase::UTF16::s_xmlHeaderEncodingStringLength
static const size_type s_xmlHeaderEncodingStringLength
Definition: XalanXMLSerializerBase.hpp:357
xalanc::XalanXMLSerializerBase::m_version
const XalanDOMString & m_version
Tells the XML version, for writing out to the XML decl.
Definition: XalanXMLSerializerBase.hpp:690
XalanDOMString.hpp
xalanc::XalanVector< bool >
xalanc::FormatterListener::eXMLVersion
eXMLVersion
Definition: FormatterListener.hpp:75
xalanc::XalanXMLSerializerBase::childNodesWereAdded
bool childNodesWereAdded()
Determine if an element ever had any children added.
Definition: XalanXMLSerializerBase.hpp:640
xalanc::XalanXMLSerializerBase
XalanXMLSerializerBase serves as a base class for XML serializers based on FormatterListener events.
Definition: XalanXMLSerializerBase.hpp:58
xalanc::XalanXMLSerializerBase::BoolStackType
XalanVector< bool > BoolStackType
Definition: XalanXMLSerializerBase.hpp:191
xalanc::XalanXMLSerializerBase::CharFunctor1_1::content
bool content(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:501
FormatterListener.hpp
xalanc::XalanXMLSerializerBase::UTF16::s_ampersandEntityStringLength
static const size_type s_ampersandEntityStringLength
Definition: XalanXMLSerializerBase.hpp:420
xalanc::size_type
size_t size_type
Definition: XalanMap.hpp:46
XalanVector.hpp
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XalanXMLSerializerBase::UTF8::s_quoteEntityStringLength
static const size_type s_quoteEntityStringLength
Definition: XalanXMLSerializerBase.hpp:312
xalanc::XalanXMLSerializerBase::CharFunctor1_1::isCharRefForbidden
bool isCharRefForbidden(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:525
xalanc::XalanXMLSerializerBase::UTF16::s_cdataOpenStringLength
static const size_type s_cdataOpenStringLength
Definition: XalanXMLSerializerBase.hpp:392
xalanc::XalanXMLSerializerBase::UTF16::s_cdataCloseStringLength
static const size_type s_cdataCloseStringLength
Definition: XalanXMLSerializerBase.hpp:399
xalanc::XalanXMLSerializerBase::CharFunctor1_1
Definition: XalanXMLSerializerBase.hpp:488
xalanc::XalanXMLSerializerBase::UTF16::s_greaterThanEntityStringLength
static const size_type s_greaterThanEntityStringLength
Definition: XalanXMLSerializerBase.hpp:413
xalanc::XalanXMLSerializerBase::UTF8::s_xmlHeaderStartStringLength
static const size_type s_xmlHeaderStartStringLength
Definition: XalanXMLSerializerBase.hpp:235
xalanc::XalanXMLSerializerBase::UTF16::s_encodingString
static const XalanDOMString & s_encodingString
The string "UTF-16".
Definition: XalanXMLSerializerBase.hpp:322
xalanc::XalanXMLSerializerBase::CharFunctor1_1::range
bool range(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:509
xalanc::XalanXMLSerializerBase::m_spaceBeforeClose
bool m_spaceBeforeClose
Add space before '/>' for XHTML.
Definition: XalanXMLSerializerBase.hpp:675
xalanc::XalanXMLSerializerBase::outsideDocumentElement
bool outsideDocumentElement() const
Definition: XalanXMLSerializerBase.hpp:629
xalanc::XalanXMLSerializerBase::CharFunctor1_1::isForbidden
bool isForbidden(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:517
xalanc::XalanXMLSerializerBase::isUTF16LowSurrogate
static bool isUTF16LowSurrogate(XalanDOMChar theChar)
Definition: XalanXMLSerializerBase.hpp:706
xalanc::XalanXMLSerializerBase::UTF8
Definition: XalanXMLSerializerBase.hpp:199
xalanc::XalanXMLSerializerBase::UTF16::s_defaultVersionStringLength
static const size_type s_defaultVersionStringLength
Definition: XalanXMLSerializerBase.hpp:378
xalanc::XalanXMLSerializerBase::CharFunctor1_0::attribute
bool attribute(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:440
xalanc::XalanXMLSerializerBase::UTF16::s_xmlHeaderStandaloneStringLength
static const size_type s_xmlHeaderStandaloneStringLength
Definition: XalanXMLSerializerBase.hpp:364
xalanc::XalanXMLSerializerBase::UTF8::s_doctypeHeaderPublicStringLength
static const size_type s_doctypeHeaderPublicStringLength
Definition: XalanXMLSerializerBase.hpp:221
xalanc::XalanXMLSerializerBase::CharFunctor1_0::isCharRefForbidden
bool isCharRefForbidden(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:472
xalanc::XalanXMLSerializerBase::UTF16::s_xhtmlDocTypeStringLength
static const size_type s_xhtmlDocTypeStringLength
Definition: XalanXMLSerializerBase.hpp:385
xalanc::XalanXMLSerializerBase::UTF8::s_cdataCloseStringLength
static const size_type s_cdataCloseStringLength
Definition: XalanXMLSerializerBase.hpp:284
xalanc::length
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
Definition: DOMStringHelper.hpp:235
xalanc::XalanXMLSerializerBase::CharFunctor1_0::content
bool content(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:448
xalanc::XalanXMLSerializerBase::isUTF16HighSurrogate
static bool isUTF16HighSurrogate(XalanDOMChar theChar)
Definition: XalanXMLSerializerBase.hpp:700
xalanc::XalanXMLSerializerBase::UTF16::s_xmlHeaderStartStringLength
static const size_type s_xmlHeaderStartStringLength
Definition: XalanXMLSerializerBase.hpp:350
xalanc::XalanXMLSerializerBase::UTF8::s_greaterThanEntityStringLength
static const size_type s_greaterThanEntityStringLength
Definition: XalanXMLSerializerBase.hpp:298
xalanc::XalanXMLSerializerBase::UTF8::s_defaultVersionStringLength
static const size_type s_defaultVersionStringLength
Definition: XalanXMLSerializerBase.hpp:263
xalanc::XalanXMLSerializerBase::UTF8::s_xmlHeaderEncodingStringLength
static const size_type s_xmlHeaderEncodingStringLength
Definition: XalanXMLSerializerBase.hpp:242
xalanc::XalanXMLSerializerBase::m_doctypeSystem
const XalanDOMString m_doctypeSystem
The System ID for the doc type.
Definition: XalanXMLSerializerBase.hpp:680
xalanc::XalanXMLSerializerBase::UTF8::s_cdataOpenStringLength
static const size_type s_cdataOpenStringLength
Definition: XalanXMLSerializerBase.hpp:277
xalanc::XalanXMLSerializerBase::getVersion
const XalanDOMString & getVersion() const
Definition: XalanXMLSerializerBase.hpp:168
xalanc::XalanXMLSerializerBase::s_1_0String
static const XalanDOMString & s_1_0String
Definition: XalanXMLSerializerBase.hpp:194
xalanc::XalanXMLSerializerBase::UTF8::s_xhtmlDocTypeStringLength
static const size_type s_xhtmlDocTypeStringLength
Definition: XalanXMLSerializerBase.hpp:270
xalanc::XalanXMLSerializerBase::m_encoding
const XalanDOMString m_encoding
Definition: XalanXMLSerializerBase.hpp:697
xalanc::XalanXMLSerializerBase::UTF8::s_lessThanEntityStringLength
static const size_type s_lessThanEntityStringLength
Definition: XalanXMLSerializerBase.hpp:291
xalanc::XalanXMLSerializerBase::UTF8::s_ampersandEntityStringLength
static const size_type s_ampersandEntityStringLength
Definition: XalanXMLSerializerBase.hpp:305
xalanc::XalanXMLSerializerBase::UTF16::s_doctypeHeaderStartStringLength
static const size_type s_doctypeHeaderStartStringLength
Definition: XalanXMLSerializerBase.hpp:329
xalanc::XalanXMLSerializerBase::m_nextIsRaw
bool m_nextIsRaw
Tell if the next text should be raw.
Definition: XalanXMLSerializerBase.hpp:670
xalanc::XalanXMLSerializerBase::m_standalone
const XalanDOMString m_standalone
Text for standalone part of header.
Definition: XalanXMLSerializerBase.hpp:695
xalanc::XalanXMLSerializerBase::CharFunctor1_1::attribute
bool attribute(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:493
xalanc::XalanXMLSerializerBase::UTF8::s_encodingString
static const XalanDOMString & s_encodingString
The string "UTF-8".
Definition: XalanXMLSerializerBase.hpp:207
xalanc::XalanXMLSerializerBase::UTF8::s_doctypeHeaderStartStringLength
static const size_type s_doctypeHeaderStartStringLength
Definition: XalanXMLSerializerBase.hpp:214
xalanc::XalanXMLSerializerBase::UTF8::s_xmlHeaderStandaloneStringLength
static const size_type s_xmlHeaderStandaloneStringLength
Definition: XalanXMLSerializerBase.hpp:249
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:56
xalanc::XalanXMLSerializerBase::getStandalone
const XalanDOMString & getStandalone() const
Definition: XalanXMLSerializerBase.hpp:174
xalanc::XalanXMLSerializerBase::markParentForChildren
bool markParentForChildren()
Mark the parent element as having a child.
Definition: XalanXMLSerializerBase.hpp:593
xalanc::XalanXMLSerializerBase::CharFunctor1_0::isForbidden
bool isForbidden(XalanDOMChar theChar) const
Definition: XalanXMLSerializerBase.hpp:464
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanXMLSerializerBase::UTF16
Definition: XalanXMLSerializerBase.hpp:315
xalanc::XalanXMLSerializerBase::UTF8::s_xmlHeaderEndStringLength
static const size_type s_xmlHeaderEndStringLength
Definition: XalanXMLSerializerBase.hpp:256
XMLSupportDefinitions.hpp
xalanc::XalanXMLSerializerBase::UTF16::s_lessThanEntityStringLength
static const size_type s_lessThanEntityStringLength
Definition: XalanXMLSerializerBase.hpp:406
XALAN_XMLSUPPORT_EXPORT
#define XALAN_XMLSUPPORT_EXPORT
Definition: XMLSupportDefinitions.hpp:35
xalanc::XalanXMLSerializerBase::UTF16::s_doctypeHeaderSystemStringLength
static const size_type s_doctypeHeaderSystemStringLength
Definition: XalanXMLSerializerBase.hpp:343
xalanc::XalanXMLSerializerBase::getNeedToOutputDoctypeDecl
bool getNeedToOutputDoctypeDecl() const
Determine if it a DOCTYPE declaration needs to be written.
Definition: XalanXMLSerializerBase.hpp:614
xalanc::XalanXMLSerializerBase::UTF16::s_xmlHeaderEndStringLength
static const size_type s_xmlHeaderEndStringLength
Definition: XalanXMLSerializerBase.hpp:371