diff options
author | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-18 22:48:30 +0000 |
---|---|---|
committer | nanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-12-18 22:48:30 +0000 |
commit | 51a464dee6cb556a231545e62a680aa9e2689bba (patch) | |
tree | 14962e007278ddce9f88796d6bde1b381f6747a7 | |
parent | a88145471e10a1bd76dd12449c00fcc097929e18 (diff) | |
download | ATCD-51a464dee6cb556a231545e62a680aa9e2689bba.tar.gz |
*** empty log message ***
-rw-r--r-- | ACEXML/common/XMLReader.h | 6 | ||||
-rw-r--r-- | ACEXML/docs/readme.txt | 9 | ||||
-rw-r--r-- | ACEXML/examples/SAXPrint/svc.conf.xml | 27 | ||||
-rw-r--r-- | ACEXML/parser/parser/Parser.cpp | 27 | ||||
-rw-r--r-- | ACEXML/parser/parser/Parser.h | 49 | ||||
-rw-r--r-- | 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 <a href="http://www.saxproject.org/"> 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 <ul> <li> ACEXML only recognize UNICODE documents, although they can be in various different encoding, such as UTF-8, UTF-16, or UCS-4. @@ -25,8 +24,10 @@ dynamically load in the extra features in the future. UNICODE before being parsed by ACEXML parser. </ul> -\section acexml_others Other Topics + +@section acexml_others Other Topics <ol> + <li>@ref acexml_parser_features <li>@ref acexml_guides <li>@ref acexml_bugs <li>@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 @@ -<?xml version="1.0"?> -<!-- This is a test XML file. Most of the stuff here don't make any sense at all --> -<!DOCTYPE ACE_Svc_Conf PUBLIC 'GOODSAM' 'http://ace.cs.wustl.edu/dtd/ACE_SVCCONF.DTD' - [ - <!NOTATION goody PUBLIC 'NBC' 'http://hardcoreace.com/'> - <!NOTATION frodo PUBLIC 'ABC'> - <!NOTATION bilbo SYSTEM "C:/ACE-GUIDELINE"> - <!ENTITY ccm 'CCM_App'> - <!ENTITY pippin PUBLIC 'GOTO' 'http://taozen.com/' NDATA NBC> - <!ENTITY sam PUBLIC 'SHIRE' 'http://taozen.com/'> - <!ENTITY gandolf SYSTEM 'D:/RINGS.DOT'> - <!ELEMENT GOOBEGONE EMPTY> - <!ELEMENT POOPOO ANY> - <!ELEMENT HOHOHO ((BOOBOO, GOOBEGONE)?, (GOOBEGONE|POOPOO)*)+> - <!ELEMENT BOOBOO (#PCDATA | BOOBOO)*> - <!ATTLIST GOOBEGONE - ohmy CDATA #REQUIRED - testing IDREF #IMPLIED> - ]> - <ACE_Svc_Conf> <static id="ACE_Service_Manager"> <params>-d</params> @@ -56,10 +36,11 @@ <!-- <remove id="Event_Analyzer"/> --> <!-- <remove id="Multicast_Router"/> --> <![CDATA[Only a text string. -Do you &expect something more?]]> +Do you &expect something more? A]]> +<!-- Noticed that the "&" in the above CDATA section can not be escaped. --> </module> </stream> <!-- remove CCM_App --> -<remove id="Test_&Taskebc"/> -</ACE_Svc_Conf>
\ No newline at end of file +<remove id="Test_&Taskabc"/> +</ACE_Svc_Conf> 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_String, - ACEXML_String> ACEXML_ENTITY_ENTRY; - -typedef ACE_Hash_Map_Manager_Ex<ACEXML_String, - ACEXML_String, - ACE_Hash<ACEXML_String>, - ACE_Equal_To<ACEXML_String>, - ACE_Null_Mutex> ACEXML_ENTITIES_MANAGER; - -typedef ACE_Hash_Map_Iterator_Ex<ACEXML_String, - ACEXML_String, - ACE_Hash<ACEXML_String>, - ACE_Equal_To<ACEXML_String>, - ACE_Null_Mutex> ACEXML_ENTITIES_MANAGER_ITER; - -typedef ACE_Hash_Map_Reverse_Iterator_Ex<ACEXML_String, - ACEXML_String, - ACE_Hash<ACEXML_String>, - ACE_Equal_To<ACEXML_String>, - 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 |