update Expat and XMLStorage files Modified: trunk/reactos/subsys/system/explorer/shell/webchild.h Added: trunk/reactos/subsys/system/explorer/utility/expat.h Added: trunk/reactos/subsys/system/explorer/utility/expat_external.h Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.h _____
Modified: trunk/reactos/subsys/system/explorer/shell/webchild.h --- trunk/reactos/subsys/system/explorer/shell/webchild.h 2005-02-20 10:21:19 UTC (rev 13666) +++ trunk/reactos/subsys/system/explorer/shell/webchild.h 2005-02-20 10:21:20 UTC (rev 13667) @@ -347,7 +347,7 @@
*lprcClipRect = rect;
assert(lpFrameInfo->cb>=sizeof(OLEINPLACEFRAMEINFO)); - lpFrameInfo->fMDIApp = FALSE; + lpFrameInfo->fMDIApp = FALSE; //@@ lpFrameInfo->hwndFrame = 0; lpFrameInfo->haccel = 0; lpFrameInfo->cAccelEntries = 0; _____
Copied: trunk/reactos/subsys/system/explorer/utility/expat.h (from rev 13664, trunk/reactos/lib/expat/lib/expat.h) _____
Copied: trunk/reactos/subsys/system/explorer/utility/expat_external.h (from rev 13664, trunk/reactos/lib/expat/lib/expat_external.h) _____
Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp --- trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp 2005-02-20 10:21:19 UTC (rev 13666) +++ trunk/reactos/subsys/system/explorer/utility/xmlstorage.cpp 2005-02-20 10:21:20 UTC (rev 13667) @@ -432,6 +432,12 @@
case XML_ERROR_FINISHED: return "XML_ERROR_FINISHED"; case XML_ERROR_SUSPEND_PE: return "XML_ERROR_SUSPEND_PE"; #endif +#if XML_MAJOR_VERSION>=2 + /* Added in 2.0. */ + case XML_ERROR_RESERVED_PREFIX_XML: return "XML_ERROR_RESERVED_PREFIX_XML"; + case XML_ERROR_RESERVED_PREFIX_XMLNS: return "XML_ERROR_RESERVED_PREFIX_XMLNS"; + case XML_ERROR_RESERVED_NAMESPACE_URI: return "XML_ERROR_RESERVED_NAMESPACE_URI"; +#endif }
std::ostringstream out; _____
Modified: trunk/reactos/subsys/system/explorer/utility/xmlstorage.h --- trunk/reactos/subsys/system/explorer/utility/xmlstorage.h 2005-02-20 10:21:19 UTC (rev 13666) +++ trunk/reactos/subsys/system/explorer/utility/xmlstorage.h 2005-02-20 10:21:20 UTC (rev 13667) @@ -612,6 +612,23 @@
return out; }
+protected: + Children _children; + AttributeMap _attributes; + + std::string _leading; + std::string _content; + std::string _end_leading; + std::string _trailing; + + XMLNode* get_first_child() const + { + if (!_children.empty()) + return _children.front(); + else + return NULL; + } + XMLNode* find(const XS_String& name, int n=0) const { for(Children::const_iterator it=_children.begin(); it!=_children.end(); ++it) @@ -670,23 +687,6 @@ /// relative XPath create function XMLNode* create_relative(const char* path);
-protected: - Children _children; - AttributeMap _attributes; - - std::string _leading; - std::string _content; - std::string _end_leading; - std::string _trailing; - - XMLNode* get_first_child() const - { - if (!_children.empty()) - return _children.front(); - else - return NULL; - } - void write_worker(std::ostream& out, int indent) const; void pretty_write_worker(std::ostream& out, int indent) const; void smart_write_worker(std::ostream& out, int indent) const; @@ -1533,6 +1533,8 @@ return out.str(); }
+ std::string get_instructions() const {return _instructions;} + XML_Error get_error_code() {return XML_GetErrorCode(_parser);} std::string get_error_string() const;
@@ -1541,6 +1543,7 @@ XML_Parser _parser; std::string _xml_version; std::string _encoding; + std::string _instructions;
std::string _content; enum {TAG_NONE, TAG_START, TAG_END} _last_tag; @@ -1592,11 +1595,14 @@
if (!_doctype.empty()) out << _doctype << '\n'; + if (!_additional.empty()) + out << _additional << '\n'; }
std::string _version; std::string _encoding; std::string _doctype; + std::string _additional; };
@@ -1640,6 +1646,8 @@ { XML_Status status = reader.read();
+ _header._additional = reader.get_instructions(); + if (status == XML_STATUS_ERROR) { std::ostringstream out;
@@ -1656,6 +1664,8 @@ { XML_Status status = reader.read();
+ _header._additional = reader.get_instructions(); + if (status == XML_STATUS_ERROR) { std::ostringstream out;
@@ -1669,9 +1679,9 @@ }
/// write XML stream preserving previous white space and comments - std::ostream& write(std::ostream& out, WRITE_MODE mode=FORMAT_SMART, const XMLHeader& header=XMLHeader()) const + std::ostream& write(std::ostream& out, WRITE_MODE mode=FORMAT_SMART) const { - header.print(out); + _header.print(out);
if (!_children.empty()) _children.front()->write(out); @@ -1685,11 +1695,11 @@ return write(out, FORMAT_PRETTY); }
- void write(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART, const XMLHeader& header=XMLHeader()) const + void write(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART) const { tofstream out(path);
- write(out, mode, header); + write(out, mode); }
void write_formating(LPCTSTR path) const @@ -1699,6 +1709,7 @@ write_formating(out); }
+ XMLHeader _header; XML_Error _last_error; std::string _last_error_msg; };