From 51a464dee6cb556a231545e62a680aa9e2689bba Mon Sep 17 00:00:00 2001 From: nanbor Date: Tue, 18 Dec 2001 22:48:30 +0000 Subject: *** empty log message *** --- ACEXML/common/XMLReader.h | 6 +++-- ACEXML/docs/readme.txt | 9 ++++--- ACEXML/examples/SAXPrint/svc.conf.xml | 27 +++---------------- ACEXML/parser/parser/Parser.cpp | 27 +++++++++++-------- ACEXML/parser/parser/Parser.h | 49 +++++++++++++++++------------------ etc/acexml.doxygen | 10 +++---- 6 files changed, 58 insertions(+), 70 deletions(-) diff --git a/ACEXML/common/XMLReader.h b/ACEXML/common/XMLReader.h index 2816f0e4938..9586c9a3484 100644 --- a/ACEXML/common/XMLReader.h +++ b/ACEXML/common/XMLReader.h @@ -56,7 +56,9 @@ public: virtual ACEXML_ErrorHandler *getErrorHandler (void) const = 0; /** - * Look up the value of a feature. + * Look up the value of a feature. This method allows + * programmers to check whether a specific feature has been + * activated in the parser. */ virtual int getFeature (const ACEXML_Char *name, ACEXML_Env &xmlenv) @@ -111,7 +113,7 @@ public: virtual void setErrorHandler (ACEXML_ErrorHandler *handler) = 0; /** - * Set the state of a feature. + * Activating or deactivating a feature. */ virtual void setFeature (const ACEXML_Char *name, int boolean_value, diff --git a/ACEXML/docs/readme.txt b/ACEXML/docs/readme.txt index cf873e1ce4b..e2d0062fafd 100644 --- a/ACEXML/docs/readme.txt +++ b/ACEXML/docs/readme.txt @@ -1,7 +1,7 @@ /** @mainpage ACEXML - A Small and Portable XML Parser -\section acexml_synopsis Synopsis +@section acexml_synopsis Synopsis ACEXML is a small footprint and portable framework for integrating XML parsing ability into user applications. The framework is based on the Simple API for XML @@ -15,8 +15,7 @@ We do, however, plan to add more features to the parser and will either release a more versatile parser or allow the current parser to dynamically load in the extra features in the future. - -\section acexml_features Features of ACEXML +@section acexml_features Features of ACEXML -\section acexml_others Other Topics + +@section acexml_others Other Topics
    +
  1. @ref acexml_parser_features
  2. @ref acexml_guides
  3. @ref acexml_bugs
  4. @ref acexml_todo diff --git a/ACEXML/examples/SAXPrint/svc.conf.xml b/ACEXML/examples/SAXPrint/svc.conf.xml index ccdbd14ae26..78f51d1fab3 100644 --- a/ACEXML/examples/SAXPrint/svc.conf.xml +++ b/ACEXML/examples/SAXPrint/svc.conf.xml @@ -1,23 +1,3 @@ - - - - - - - - - - - - - - - ]> - -d @@ -56,10 +36,11 @@ +Do you &expect something more? A]]> + - - \ No newline at end of file + + diff --git a/ACEXML/parser/parser/Parser.cpp b/ACEXML/parser/parser/Parser.cpp index 5f36dd96225..f93f779bd34 100644 --- a/ACEXML/parser/parser/Parser.cpp +++ b/ACEXML/parser/parser/Parser.cpp @@ -26,6 +26,9 @@ Make sure we are freezing the obstack in all cases. static const ACEXML_Char default_attribute_type[] = {'C', 'D', 'A', 'T', 'A', 0}; static const ACEXML_Char empty_string[] = { 0 }; +const ACEXML_Char +ACEXML_Parser::simple_parsing_name_[] = { 'S', 'i', 'm', 'p', 'l', 'e', 0 }; + ACEXML_Parser::ACEXML_Parser (void) : dtd_handler_ (0), entity_resolver_ (0), @@ -34,7 +37,8 @@ ACEXML_Parser::ACEXML_Parser (void) instream_ (0), doctype_ (0), dtd_system_ (0), - dtd_public_ (0) + dtd_public_ (0), + simple_parsing_ (0) { } @@ -48,11 +52,10 @@ ACEXML_Parser::getFeature (const ACEXML_Char *name, // ACE_THROW_SPEC ((ACEXML_SAXNotRecognizedException, // ACEXML_SAXNotSupportedException)) { - // Not implemented. - - ACE_UNUSED_ARG (name); + if (ACE_OS_String::strcmp (name, ACEXML_Parser::simple_parsing_name_) == 0) + return this->simple_parsing_; - xmlenv.exception (new ACEXML_SAXNotSupportedException ()); + xmlenv.exception (new ACEXML_SAXNotRecognizedException ()); return -1; } @@ -76,11 +79,10 @@ ACEXML_Parser::setFeature (const ACEXML_Char *name, // ACE_THROW_SPEC ((ACEXML_SAXNotRecognizedException, // ACEXML_SAXNotSupportedException)) { - // @@ Not implemented. - ACE_UNUSED_ARG (name); - ACE_UNUSED_ARG (boolean_value); + if (ACE_OS_String::strcmp (name, ACEXML_Parser::simple_parsing_name_) == 0) + this->simple_parsing_ = (boolean_value == 0 ? 0 : 1); - xmlenv.exception (new ACEXML_SAXNotSupportedException ()); + xmlenv.exception (new ACEXML_SAXNotRecognizedException ()); } void @@ -116,9 +118,12 @@ ACEXML_Parser::parse (ACEXML_InputSource *input, xmlenv.exception (new ACEXML_SAXException ("No valid input source available")); return; } - this->parse_xml_prolog (xmlenv); - ACEXML_CHECK; + if (this->simple_parsing_ == 0) + { + this->parse_xml_prolog (xmlenv); + ACEXML_CHECK; + } // @@ Should startDocument come before or after parsing the DTD definition? this->content_handler_->startDocument (xmlenv); ACEXML_CHECK; diff --git a/ACEXML/parser/parser/Parser.h b/ACEXML/parser/parser/Parser.h index de8a46ce087..57053cbeec8 100644 --- a/ACEXML/parser/parser/Parser.h +++ b/ACEXML/parser/parser/Parser.h @@ -25,27 +25,6 @@ #include "ace/Containers_T.h" #include "parser/parser/Entity_Manager.h" -typedef ACE_Hash_Map_Entry ACEXML_ENTITY_ENTRY; - -typedef ACE_Hash_Map_Manager_Ex, - ACE_Equal_To, - ACE_Null_Mutex> ACEXML_ENTITIES_MANAGER; - -typedef ACE_Hash_Map_Iterator_Ex, - ACE_Equal_To, - ACE_Null_Mutex> ACEXML_ENTITIES_MANAGER_ITER; - -typedef ACE_Hash_Map_Reverse_Iterator_Ex, - ACE_Equal_To, - ACE_Null_Mutex> ACEXML_ENTITIES_MANAGER_REVERSE_ITER; - /** * @class ACEXML_Parser Parser.h "parser/parser/Parser.h" * @@ -81,8 +60,10 @@ public: */ virtual ACEXML_ErrorHandler *getErrorHandler (void) const; - /* - * Look up the value of a feature. + /** + * Look up the value of a feature. This method allows + * programmers to check whether a specific feature has been + * activated in the parser. */ virtual int getFeature (const ACEXML_Char *name, ACEXML_Env &xmlenv) @@ -136,8 +117,8 @@ public: */ virtual void setErrorHandler (ACEXML_ErrorHandler *handler); - /* - * Set the state of a feature. + /** + * Activating or deactivating a feature. */ virtual void setFeature (const ACEXML_Char *name, int boolean_value, @@ -420,6 +401,20 @@ protected: */ int try_grow_cdata (size_t size, size_t &len, ACEXML_Env &xmlenv); + // Feature names: + + /** + * \addtogroup acexml_parser_features + * @{ + */ + + /** + * + */ + static const ACEXML_Char simple_parsing_name_[]; + + /* @} */ + private: /** * Check and dispatch errors/warnings to ErrorHandler. @@ -457,6 +452,10 @@ private: // Locator ACEXML_LocatorImpl locator_; + + // Feature flags & + int simple_parsing_; + }; #if defined (__ACEXML_INLINE__) diff --git a/etc/acexml.doxygen b/etc/acexml.doxygen index 41c65ee3b52..01f74967f5e 100644 --- a/etc/acexml.doxygen +++ b/etc/acexml.doxygen @@ -47,9 +47,9 @@ WARN_FORMAT = "$file:$line: $text" # configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = ace/XML -FILE_PATTERNS = *.cpp *.h *.i *.inl -RECURSIVE = NO +INPUT = XML +FILE_PATTERNS = *.cpp *.h *.i *.inl *.txt +RECURSIVE = YES EXCLUDE = EXCLUDE_PATTERNS = EXAMPLE_PATH = @@ -70,7 +70,7 @@ IGNORE_PREFIX = #--------------------------------------------------------------------------- GENERATE_HTML = YES -HTML_OUTPUT = html/ace/xml +HTML_OUTPUT = html/xml HTML_HEADER = HTML_FOOTER = HTML_STYLESHEET = @@ -127,7 +127,7 @@ EXPAND_AS_DEFINED = ACE_RCSID \ #--------------------------------------------------------------------------- TAGFILES = html/ace/ACE.tag=.. -GENERATE_TAGFILE = html/ace/xml/ACEXML.tag +GENERATE_TAGFILE = html/xml/ACEXML.tag ALLEXTERNALS = NO PERL_PATH = /usr/bin/perl -- cgit v1.2.1