auriemma    00/11/09 10:01:42

  Modified:    c/src/XMLSupport FormatterToXML.cpp FormatterToXML.hpp
  Log:
  Explicit initialization of static strings.
  
  Revision  Changes    Path
  1.36      +31 -5     xml-xalan/c/src/XMLSupport/FormatterToXML.cpp
  
  Index: FormatterToXML.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToXML.cpp,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- FormatterToXML.cpp        2000/11/02 22:25:42     1.35
  +++ FormatterToXML.cpp        2000/11/09 18:01:41     1.36
  @@ -141,7 +141,7 @@
        {
                if(startsWith(
                        m_doctypePublic,
  -                     XALAN_STATIC_UCODE_STRING("-//W3C//DTD XHTML")) == true)
  +                     s_xhtmlDocType) == true)
                {
                        m_spaceBeforeClose = true;
                }
  @@ -586,8 +586,8 @@
                        accum(s_xmlHeaderEncodingString);       // "\" 
encoding=\""
   
                        if (isEmpty(m_encoding) == true)
  -                     {
  -                             accum(XALAN_STATIC_UCODE_STRING("ISO-8859-1"));
  +                     {       
  +                             accum(s_iso88591String);
                        }
                        else
                        {
  @@ -895,7 +895,7 @@
                {
                        if(i != 0)
                        {
  -                             accum(XALAN_STATIC_UCODE_STRING("]]>"));
  +                             accum(s_dtdCDATACloseString);
                        }
   
                        // This needs to go into a function... 
  @@ -1555,6 +1555,11 @@
   
   static XalanDOMCharVectorType        s_xmlHeaderEndString;
   
  +static XalanDOMString                        s_xhtmlDocType;
  +
  +static XalanDOMString                        s_iso88591String;
  +
  +static XalanDOMString                        s_dtdCDATACloseString;
   
   
   const XalanDOMCharVectorType&        FormatterToXML::s_xsltNextIsRawString = 
::s_xsltNextIsRawString;
  @@ -1578,8 +1583,14 @@
   const XalanDOMCharVectorType&        
FormatterToXML::s_xmlHeaderStandaloneString = ::s_xmlHeaderStandaloneString;
   
   const XalanDOMCharVectorType&        FormatterToXML::s_xmlHeaderEndString = 
::s_xmlHeaderEndString;
  +
  +bool                                                 
FormatterToXML::s_javaEncodingIsISO = false;
  +
  +const XalanDOMString&                        FormatterToXML::s_xhtmlDocType 
= ::s_xhtmlDocType;
  +
  +const XalanDOMString&                        
FormatterToXML::s_iso88591String = ::s_iso88591String;
   
  -bool                                                 
FormatterToXML::s_javaEncodingIsISO = false; 
  +const XalanDOMString&                        
FormatterToXML::s_dtdCDATACloseString = ::s_dtdCDATACloseString;
   
   const FormatterToXML::DOMCharBufferType::size_type   
FormatterToXML::s_maxBufferSize = 512;
   
  @@ -1620,6 +1631,15 @@
   
        ::s_xmlHeaderEndString =
                
MakeXalanDOMCharVector(c_wstr(XALAN_STATIC_UCODE_STRING("\"?>")));
  +
  +     ::s_xhtmlDocType = 
  +             XALAN_STATIC_UCODE_STRING("-//W3C//DTD XHTML");
  +                             
  +     ::s_iso88591String = 
  +             XALAN_STATIC_UCODE_STRING("ISO-8859-1");
  +
  +     ::s_dtdCDATACloseString =
  +             XALAN_STATIC_UCODE_STRING("]]>");
   }
   
   
  @@ -1648,4 +1668,10 @@
        XalanDOMCharVectorType().swap(::s_xmlHeaderStandaloneString);
   
        XalanDOMCharVectorType().swap(::s_xmlHeaderEndString);
  +
  +     clear(::s_xhtmlDocType);
  +
  +     clear(::s_iso88591String);      
  +
  +     clear(::s_dtdCDATACloseString);
   }
  
  
  
  1.22      +17 -3     xml-xalan/c/src/XMLSupport/FormatterToXML.hpp
  
  Index: FormatterToXML.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToXML.hpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- FormatterToXML.hpp        2000/11/02 22:25:42     1.21
  +++ FormatterToXML.hpp        2000/11/09 18:01:42     1.22
  @@ -779,12 +779,26 @@
         */
        static const XalanDOMCharVectorType&    s_defaultVersionString;
   
  +     /**
  +      * The string "-//W3C//DTD XHTML".
  +      */
  +     static const XalanDOMString&                    s_xhtmlDocType;
   
  -     DOMCharBufferType                               m_charBuf;
  +     /**
  +      * The string "ISO-8859-1"
  +      */
  +     static const XalanDOMString&                    s_iso88591String;
   
  -     DOMCharBufferType::size_type    m_pos;
  +     /**
  +      * The string "]]>".
  +      */
  +     static const XalanDOMString&                    s_dtdCDATACloseString;
   
  -     ByteBufferType                                  m_byteBuf;
  +     DOMCharBufferType                                                       
m_charBuf;
  +
  +     DOMCharBufferType::size_type                            m_pos;
  +
  +     ByteBufferType                                                          
m_byteBuf;
   
        static const DOMCharBufferType::size_type       s_maxBufferSize;
   
  
  
  

Reply via email to