Diff for /parser3/src/classes/xdoc.C between versions 1.137 and 1.145

version 1.137, 2004/02/17 15:08:51 version 1.145, 2004/09/13 08:12:57
Line 54  public: Line 54  public:
   
 DECLARE_CLASS_VAR(xdoc, new MXdoc, 0);  DECLARE_CLASS_VAR(xdoc, new MXdoc, 0);
   
   // helper classes
   
   class xmlOutputBuffer_auto_ptr {
   public:
           explicit xmlOutputBuffer_auto_ptr(xmlOutputBuffer *_APtr = 0) 
                   : _Owns(_APtr != 0), _Ptr(_APtr) {}
           xmlOutputBuffer_auto_ptr(const xmlOutputBuffer_auto_ptr& _Y) 
                   : _Owns(_Y._Owns), _Ptr(_Y.release()) {}
           xmlOutputBuffer_auto_ptr& operator=(const xmlOutputBuffer_auto_ptr& _Y) 
                   {if (this != &_Y)
                           {if (_Ptr != _Y.get())
                                   {if (_Owns && _Ptr)
                                           xmlOutputBufferClose(_Ptr);
                                   _Owns = _Y._Owns; }
                           else if (_Y._Owns)
                                   _Owns = true;
                           _Ptr = _Y.release(); }
                   return (*this); }
           ~xmlOutputBuffer_auto_ptr()
                   {if (_Owns && _Ptr)
                           xmlOutputBufferClose(_Ptr); }
           xmlOutputBuffer& operator*() const 
                   {return (*get()); }
           xmlOutputBuffer *operator->() const 
                   {return (get()); }
           xmlOutputBuffer *get() const 
                   {return (_Ptr); }
           xmlOutputBuffer *release() const 
                   {((xmlOutputBuffer_auto_ptr *)this)->_Owns = false;
                   return (_Ptr); }
   private:
           bool _Owns;
           xmlOutputBuffer *_Ptr;
   };
   
 class xsltTransformContext_auto_ptr {  class xsltTransformContext_auto_ptr {
 public:  public:
         explicit xsltTransformContext_auto_ptr(xsltTransformContext *_APtr = 0)           explicit xsltTransformContext_auto_ptr(xsltTransformContext *_APtr = 0) 
Line 122  private: Line 157  private:
   
 // methods  // methods
   
 static void writeNode(Request& r, GdomeNode *node,   static void writeNode(Request& r, VXdoc& xdoc, GdomeNode *node, 
                                           GdomeException exc) {                                            GdomeException exc) {
         if(!node || exc)          if(!node || exc)
                 throw XmlException(0, exc);                  throw XmlException(0, exc);
   
         // write out result          // write out result
         r.write_no_lang(*new VXnode(&r.charsets, node));          r.write_no_lang(*new VXnode(&r.charsets, xdoc, node));
 }  }
   
 // Element createElement(in DOMString tagName) raises(DOMException);  // Element createElement(in DOMString tagName) raises(DOMException);
Line 142  static void _createElement(Request& r, M Line 177  static void _createElement(Request& r, M
                 (GdomeNode *)gdome_doc_createElement(vdoc.get_document(),                   (GdomeNode *)gdome_doc_createElement(vdoc.get_document(), 
                 r.transcode(tagName).use(),                  r.transcode(tagName).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // Element createElementNS(in DOMString namespaceURI, in DOMString qualifiedName) raises(DOMException);  // Element createElementNS(in DOMString namespaceURI, in DOMString qualifiedName) raises(DOMException);
Line 159  static void _createElementNS(Request& r, Line 194  static void _createElementNS(Request& r,
                 r.transcode(namespaceURI).use(),                  r.transcode(namespaceURI).use(),
                 r.transcode(qualifiedName).use(),                  r.transcode(qualifiedName).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // DocumentFragment createDocumentFragment()  // DocumentFragment createDocumentFragment()
Line 171  static void _createDocumentFragment(Requ Line 206  static void _createDocumentFragment(Requ
                 (GdomeNode *)gdome_doc_createDocumentFragment(                  (GdomeNode *)gdome_doc_createDocumentFragment(
                 vdoc.get_document(),                  vdoc.get_document(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // Text createTextNode(in DOMString data);  // Text createTextNode(in DOMString data);
Line 185  static void _createTextNode(Request& r, Line 220  static void _createTextNode(Request& r,
                 vdoc.get_document(),                  vdoc.get_document(),
                 r.transcode(data).use(),                  r.transcode(data).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // Comment createComment(in DOMString data)  // Comment createComment(in DOMString data)
Line 199  static void _createComment(Request& r, M Line 234  static void _createComment(Request& r, M
                 vdoc.get_document(),                  vdoc.get_document(),
                 r.transcode(data).use(),                  r.transcode(data).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // CDATASection createCDATASection(in DOMString data) raises(DOMException);  // CDATASection createCDATASection(in DOMString data) raises(DOMException);
Line 213  static void _createCDATASection(Request& Line 248  static void _createCDATASection(Request&
                 vdoc.get_document(),                  vdoc.get_document(),
                 r.transcode(data).use(),                  r.transcode(data).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // ProcessingInstruction createProcessingInstruction(in DOMString target,in DOMString data) raises(DOMException);  // ProcessingInstruction createProcessingInstruction(in DOMString target,in DOMString data) raises(DOMException);
Line 229  static void _createProcessingInstruction Line 264  static void _createProcessingInstruction
                 r.transcode(target).use(),                   r.transcode(target).use(), 
                 r.transcode(data).use(),                  r.transcode(data).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // Attr createAttribute(in DOMString name) raises(DOMException);  // Attr createAttribute(in DOMString name) raises(DOMException);
Line 243  static void _createAttribute(Request& r, Line 278  static void _createAttribute(Request& r,
                 vdoc.get_document(),                  vdoc.get_document(),
                 r.transcode(name).use(),                  r.transcode(name).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // Attr createAttributeNS(in DOMString namespaceURI, in DOMString qualifiedName) raises(DOMException);  // Attr createAttributeNS(in DOMString namespaceURI, in DOMString qualifiedName) raises(DOMException);
Line 260  static void _createAttributeNS(Request& Line 295  static void _createAttributeNS(Request&
                 r.transcode(namespaceURI).use(),                  r.transcode(namespaceURI).use(),
                 r.transcode(qualifiedName).use(),                  r.transcode(qualifiedName).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // EntityReference createEntityReference(in DOMString name) raises(DOMException);  // EntityReference createEntityReference(in DOMString name) raises(DOMException);
Line 274  static void _createEntityReference(Reque Line 309  static void _createEntityReference(Reque
                 vdoc.get_document(),                  vdoc.get_document(),
                 r.transcode(name).use(),                  r.transcode(name).use(),
                 &exc);                  &exc);
         writeNode(r, node, exc);          writeNode(r, vdoc, node, exc);
 }  }
   
 // NodeList getElementsByTagName(in DOMString name);  // NodeList getElementsByTagName(in DOMString name);
Line 294  static void _getElementsByTagName(Reques Line 329  static void _getElementsByTagName(Reques
                 for(gulong i=0; i<length; i++)                  for(gulong i=0; i<length; i++)
                         result.hash().put(                          result.hash().put(
                                 String::Body::Format(i),                                   String::Body::Format(i), 
                                 new VXnode(&r.charsets, gdome_nl_item(nodes, i, &exc)));                                  new VXnode(&r.charsets, vdoc, gdome_nl_item(nodes, i, &exc)));
         } else if(exc)          } else if(exc)
                 throw XmlException(0, exc);                  throw XmlException(0, exc);
   
Line 321  static void _getElementsByTagNameNS(Requ Line 356  static void _getElementsByTagNameNS(Requ
                 for(gulong i=0; i<length; i++)                  for(gulong i=0; i<length; i++)
                         result.hash().put(                          result.hash().put(
                                 String::Body::Format(i),                                   String::Body::Format(i), 
                                 new VXnode(&r.charsets, gdome_nl_item(nodes, i, &exc)));                                  new VXnode(&r.charsets, vdoc, gdome_nl_item(nodes, i, &exc)));
         }          }
   
         // write out result          // write out result
Line 340  static void _getElementById(Request& r, Line 375  static void _getElementById(Request& r,
                 r.transcode(elementId).use(),                  r.transcode(elementId).use(),
                 &exc)) {                  &exc)) {
                 // write out result                  // write out result
                 r.write_no_lang(*new VXnode(&r.charsets, node));                  r.write_no_lang(*new VXnode(&r.charsets, vdoc, node));
         } else if(exc || xmlHaveGenericErrors())          } else if(exc || xmlHaveGenericErrors())
                 throw XmlException(&elementId, exc);                  throw XmlException(&elementId, exc);
 }  }
Line 361  static void _importNode(Request& r, Meth Line 396  static void _importNode(Request& r, Meth
                 throw XmlException(0, exc);                  throw XmlException(0, exc);
   
         // write out result          // write out result
         r.write_no_lang(*new VXnode(&r.charsets, outputNode));          r.write_no_lang(*new VXnode(&r.charsets, vdoc, outputNode));
 }  }
 /*  /*
 GdomeElement *gdome_doc_createElementNS (GdomeDocument *self, GdomeDOMString *namespaceURI, GdomeDOMString *qualifiedName, GdomeException *exc);  GdomeElement *gdome_doc_createElementNS (GdomeDocument *self, GdomeDOMString *namespaceURI, GdomeDOMString *qualifiedName, GdomeException *exc);
Line 486  static void param_option_over_output_opt Line 521  static void param_option_over_output_opt
 }  }
 static void param_option_over_output_option(  static void param_option_over_output_option(
                                             HashStringValue& param_options, const char* option_name,                                              HashStringValue& param_options, const char* option_name,
                                             bool& output_option) {                                              int& output_option) {
         if(Value* value=param_options.get(String::Body(option_name))) {          if(Value* value=param_options.get(String::Body(option_name))) {
                 const String& s=value->as_string();                  const String& s=value->as_string();
                 if(s=="yes")                  if(s=="yes")
                         output_option=true;                          output_option=1;
                 else if(s=="no")                  else if(s=="no")
                         output_option=false;                          output_option=0;
                 else                  else
                         throw Exception("parser.runtime",                          throw Exception("parser.runtime",
                                 &s,                                  &s,
Line 560  static void prepare_output_options(Reque Line 595  static void prepare_output_options(Reque
         }          }
 }  }
   
 /// patching piece from libxslt not to set meta encoding  
 static void  
 pa_xsltSaveResultToMem(   
                                            xmlChar*& doc_txt_ptr,       int& doc_txt_len,  
                                            xmlDocPtr result,  
                                            xsltStylesheetPtr style,  
                                            xmlCharEncodingHandler* encoder)   
 {  
     const xmlChar *encoding;  
     int base;  
     const xmlChar *method;  
     int indent;  
         xmlOutputBufferPtr buf = 0;  
   
     if ((result == NULL) || (style == NULL))  
         return;  
     if ((result->children == NULL) ||  
         ((result->children->type == XML_DTD_NODE) &&  
          (result->children->next == NULL)))  
         return;  
   
     if ((style->methodURI != NULL) &&  
         ((style->method == NULL) ||  
          (!xmlStrEqual(style->method, (const xmlChar *) "xhtml")))) {  
         xsltGenericError(xsltGenericErrorContext,  
                 "xsltSaveResultTo : unknown ouput method\n");  
         return;  
     }  
   
     XSLT_GET_IMPORT_PTR(method, style, method)  
     XSLT_GET_IMPORT_PTR(encoding, style, encoding)  
     XSLT_GET_IMPORT_INT(indent, style, indent);  
   
     if ((method == NULL) && (result->type == XML_HTML_DOCUMENT_NODE))  
         method = (const xmlChar *) "html";  
   
     if ((method != NULL) &&  
         (xmlStrEqual(method, (const xmlChar *) "html")  
         ||xmlStrEqual(method, (const xmlChar *) "xhtml"))) {  
         if (indent == -1)  
             indent = 1;  
         //  
         // * xmlDocDumpFormatMemoryEnc:  
         // Note it is up to the caller of this function to free the  
         // allocated memory with xmlFree()  
         //   
         // we wont free anything, and wont copy that data anymore [already done inside and zeroterminated]  
         xmlDocDumpFormatMemoryEnc(result, &doc_txt_ptr, &doc_txt_len, (const char *) encoding,  
                                        indent);  
     } else if ((method != NULL) &&  
                (xmlStrEqual(method, (const xmlChar *) "text"))) {  
         xmlNodePtr cur;  
         buf = xmlAllocOutputBuffer(encoder);  
   
         cur = result->children;  
         while (cur != NULL) {  
             if (cur->type == XML_TEXT_NODE)  
                 xmlOutputBufferWriteString(buf, (const char *) cur->content);  
   
             /*  
              * Skip to next node  
              */  
             if (cur->children != NULL) {  
                 if ((cur->children->type != XML_ENTITY_DECL) &&  
                     (cur->children->type != XML_ENTITY_REF_NODE) &&  
                     (cur->children->type != XML_ENTITY_NODE)) {  
                     cur = cur->children;  
                     continue;  
                 }  
             }  
             if (cur->next != NULL) {  
                 cur = cur->next;  
                 continue;  
             }  
               
             do {  
                 cur = cur->parent;  
                 if (cur == NULL)  
                     break;  
                 if (cur == (xmlNodePtr) style->doc) {  
                     cur = NULL;  
                     break;  
                 }  
                 if (cur->next != NULL) {  
                     cur = cur->next;  
                     break;  
                 }  
             } while (cur != NULL);  
         }  
     } else {  
         int omitXmlDecl;  
         int standalone;  
         buf = xmlAllocOutputBuffer(encoder);  
   
         XSLT_GET_IMPORT_INT(omitXmlDecl, style, omitXmlDeclaration);  
         XSLT_GET_IMPORT_INT(standalone, style, standalone);  
   
         if (omitXmlDecl != 1) {  
             xmlOutputBufferWriteString(buf, "<?xml version=");  
             if (result->version != NULL)   
                 xmlBufferWriteQuotedString(buf->buffer, result->version);  
             else  
                 xmlOutputBufferWriteString(buf, "\"1.0\"");  
             if (encoding == NULL) {  
                 if (result->encoding != NULL)  
                     encoding = result->encoding;  
                 else if (result->charset != XML_CHAR_ENCODING_UTF8)  
                     encoding = (const xmlChar *)  
                                xmlGetCharEncodingName((xmlCharEncoding)  
                                                       result->charset);  
             }  
             if (encoding != NULL) {  
                 xmlOutputBufferWriteString(buf, " encoding=");  
                 xmlBufferWriteQuotedString(buf->buffer, (xmlChar *) encoding);  
             }  
             switch (standalone) {  
                 case 0:  
                     xmlOutputBufferWriteString(buf, " standalone=\"no\"");  
                     break;  
                 case 1:  
                     xmlOutputBufferWriteString(buf, " standalone=\"yes\"");  
                     break;  
                 default:  
                     break;  
             }  
             xmlOutputBufferWriteString(buf, "?>\n");  
         }  
         if (result->children != NULL) {  
             xmlNodePtr child = result->children;  
   
             while (child != NULL) {  
                 xmlNodeDumpOutput(buf, result, child, 0, (indent == 1),  
                                   (const char *) encoding);  
                 if (child->type == XML_DTD_NODE)  
                     xmlOutputBufferWriteString(buf, "\n");  
                 child = child->next;  
             }  
             xmlOutputBufferWriteString(buf, "\n");  
         }  
     }  
   
         if(buf) {  
                 xmlOutputBufferFlush(buf);  
                 if(buf->conv) {  
                         doc_txt_len=buf->conv->use;  
                         doc_txt_ptr=buf->conv->content;  
                 } else {  
                         doc_txt_len=buf->buffer->use;  
                         doc_txt_ptr=buf->buffer->content;  
                 }  
   
                 if(doc_txt_ptr && doc_txt_len)  
                         doc_txt_ptr=BAD_CAST pa_strdup((const char*)doc_txt_ptr, doc_txt_len);  
   
                 xmlOutputBufferClose(buf);  
         }  
 }  
   
 struct Xdoc2buf_result {  struct Xdoc2buf_result {
         char* str;          char* str;
         size_t length;          size_t length;
Line 725  struct Xdoc2buf_result { Line 602  struct Xdoc2buf_result {
 static Xdoc2buf_result xdoc2buf(Request& r, VXdoc& vdoc,   static Xdoc2buf_result xdoc2buf(Request& r, VXdoc& vdoc, 
                                          MethodParams& params, int index,                                           MethodParams& params, int index,
                                          VXdoc::Output_options& oo,                                           VXdoc::Output_options& oo,
                                          const String* file_spec) {                                           const String* file_spec,
                                            bool use_source_charset_to_render_and_client_charset_to_write_to_header=false) {
         Xdoc2buf_result result;          Xdoc2buf_result result;
         prepare_output_options(r, params, index,          prepare_output_options(r, params, index,
                 oo);                  oo);
   
         const char* encoding_cstr=oo.encoding->cstr();          const char* render_encoding;
         xmlCharEncodingHandler *encoder=xmlFindCharEncodingHandler(encoding_cstr);          const char* header_encoding;
         if(!encoder)          if(use_source_charset_to_render_and_client_charset_to_write_to_header) {
                   render_encoding=r.charsets.source().NAME_CSTR();
                   header_encoding=r.charsets.client().NAME_CSTR();
           } else {
                   header_encoding=render_encoding=oo.encoding->cstr();
           }
   
           xmlCharEncodingHandler *renderer=xmlFindCharEncodingHandler(render_encoding);
           if(!renderer)
                 throw Exception("parser.runtime",                  throw Exception("parser.runtime",
                         0,                          0,
                         "encoding '%s' not supported", encoding_cstr);                          "encoding '%s' not supported", render_encoding);
         // UTF-8 encoder contains empty input/output converters,           // UTF-8 renderer contains empty input/output converters, 
         // which is wrong for xmlOutputBufferCreateIO          // which is wrong for xmlOutputBufferCreateIO
         // while zero encoder goes perfectly           // while zero renderer goes perfectly 
         const char* encoder_name=encoder->name;          if(strcmp(render_encoding, "UTF-8")==0)
         if(strcmp(encoder_name, "UTF-8")==0)                  renderer=0;
                 encoder=0;  
           xmlOutputBuffer_auto_ptr outputBuffer(xmlAllocOutputBuffer(renderer));
   
         xsltStylesheet_auto_ptr stylesheet(xsltNewStylesheet());          xsltStylesheet_auto_ptr stylesheet(xsltNewStylesheet());
         if(!stylesheet.get())          if(!stylesheet.get())
Line 749  static Xdoc2buf_result xdoc2buf(Request& Line 636  static Xdoc2buf_result xdoc2buf(Request&
                         0,                          0,
                         "xsltNewStylesheet failed");                          "xsltNewStylesheet failed");
   
         #define OOS2STYLE(name) \          #define OOSTRING2STYLE(name) \
                 stylesheet->name=oo.name?BAD_CAST xmlMemStrdup(r.transcode(*oo.name)->str):0                  stylesheet->name=oo.name?BAD_CAST xmlMemStrdup(r.transcode(*oo.name)->str):0
         #define OOE2STYLE(name) \          #define OOBOOL2STYLE(name) \
                 stylesheet->name=oo.name                  if(oo.name>=0) stylesheet->name=oo.name
   
         OOS2STYLE(method);          OOSTRING2STYLE(method);
         OOS2STYLE(encoding);          OOSTRING2STYLE(encoding);
         OOS2STYLE(mediaType);          OOSTRING2STYLE(mediaType);
 //      OOS2STYLE(doctypeSystem);  //      OOSTRING2STYLE(doctypeSystem);
 //      OOS2STYLE(doctypePublic);  //      OOSTRING2STYLE(doctypePublic);
         OOE2STYLE(indent);          OOBOOL2STYLE(indent);
         OOS2STYLE(version);          OOSTRING2STYLE(version);
         OOE2STYLE(standalone);          OOBOOL2STYLE(standalone);
         OOE2STYLE(omitXmlDeclaration);          OOBOOL2STYLE(omitXmlDeclaration);
   
         xmlDoc *document=gdome_xml_doc_get_xmlDoc(vdoc.get_document());          xmlDoc *document=gdome_xml_doc_get_xmlDoc(vdoc.get_document());
         document->encoding=BAD_CAST xmlMemStrdup(encoder_name);          document->encoding=BAD_CAST xmlMemStrdup(render_encoding);
           if(header_encoding)
         xmlChar* doc_txt_ptr=0;                  stylesheet->encoding=BAD_CAST xmlMemStrdup(header_encoding);
         int doc_txt_len=0;          if(xsltSaveResultTo(outputBuffer.get(), document, stylesheet.get())<0
         pa_xsltSaveResultToMem(doc_txt_ptr, doc_txt_len, document, stylesheet.get(), encoder);                  || xmlHaveGenericErrors()) {
         if(xmlHaveGenericErrors()) {  
                 GdomeException exc=0;                  GdomeException exc=0;
                 throw XmlException(0, exc);                  throw XmlException(0, exc);
         }          }
   
         result.length=doc_txt_len;          // write out result
         result.str=(char*)doc_txt_ptr;          char *gnome_str;  size_t gnome_length;
           if(outputBuffer->conv) {
                   gnome_length=outputBuffer->conv->use;
                   gnome_str=(char *)outputBuffer->conv->content;
           } else {
                   gnome_length=outputBuffer->buffer->use;
                   gnome_str=(char *)outputBuffer->buffer->content;
           }
   
           if((result.length=gnome_length)) {
                   result.str=pa_strdup(gnome_str, gnome_length);
           } else
                   result.str=0;
   
         if(file_spec)          if(file_spec)
                 file_write(*file_spec,                  file_write(*file_spec,
                 result.str, result.length,                           gnome_str, gnome_length, 
                         true/*as_text*/);                          true/*as_text*/);
   
         return result;          return result;
Line 826  static void _string(Request& r, MethodPa Line 724  static void _string(Request& r, MethodPa
         VXdoc::Output_options oo(vdoc.output_options);          VXdoc::Output_options oo(vdoc.output_options);
         Xdoc2buf_result buf=xdoc2buf(r, vdoc, params, 0,           Xdoc2buf_result buf=xdoc2buf(r, vdoc, params, 0, 
                 oo,                  oo,
                 0/*not to file, to memory*/);                  0/*not to file, to memory*/,
                   true/*use source charset to render, client charset to put to header*/);
         // write out result          // write out result
         r.write_no_lang(String(buf.str, buf.length));          r.write_no_lang(String(String::Body(buf.str), String::L_AS_IS));
 }  }
   
 #ifndef DOXYGEN  #ifndef DOXYGEN
Line 899  static VXdoc& _transform(Request& r, con Line 798  static VXdoc& _transform(Request& r, con
         oo.method=stylesheet->method?&r.transcode(stylesheet->method):0;          oo.method=stylesheet->method?&r.transcode(stylesheet->method):0;
         oo.encoding=stylesheet->encoding?&r.transcode(stylesheet->encoding):0;          oo.encoding=stylesheet->encoding?&r.transcode(stylesheet->encoding):0;
         oo.mediaType=stylesheet->mediaType?&r.transcode(stylesheet->mediaType):0;          oo.mediaType=stylesheet->mediaType?&r.transcode(stylesheet->mediaType):0;
         oo.indent=stylesheet->indent!=0;          oo.indent=stylesheet->indent;
         oo.version=stylesheet->version?&r.transcode(stylesheet->version):0;          oo.version=stylesheet->version?&r.transcode(stylesheet->version):0;
         oo.standalone=stylesheet->standalone!=0;          oo.standalone=stylesheet->standalone;
         oo.omitXmlDeclaration=stylesheet->omitXmlDeclaration!=0;          oo.omitXmlDeclaration=stylesheet->omitXmlDeclaration;
   
         // return          // return
         return result;          return result;

Removed from v.1.137  
changed lines
  Added in v.1.145


E-mail: