#include <Parser.h>
Inheritance diagram for ACEXML_Parser:
Public Methods | |
ACEXML_Parser (void) | |
Default constructor. | |
virtual | ~ACEXML_Parser (void) |
Destructor. | |
int | initialize (ACEXML_InputSource *input) |
virtual ACEXML_ContentHandler * | getContentHandler (void) const |
virtual ACEXML_DTDHandler * | getDTDHandler (void) const |
virtual ACEXML_EntityResolver * | getEntityResolver (void) const |
virtual ACEXML_ErrorHandler * | getErrorHandler (void) const |
virtual int | getFeature (const ACEXML_Char *name ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException |
virtual void | setFeature (const ACEXML_Char *name, int boolean_value ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException |
virtual void * | getProperty (const ACEXML_Char *name ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException |
virtual void | setProperty (const ACEXML_Char *name, void *value ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXNotRecognizedException |
virtual void | parse (ACEXML_InputSource *input ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
virtual void | parse (const ACEXML_Char *systemId ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
virtual void | setContentHandler (ACEXML_ContentHandler *handler) |
virtual void | setDTDHandler (ACEXML_DTDHandler *handler) |
virtual void | setEntityResolver (ACEXML_EntityResolver *resolver) |
virtual void | setErrorHandler (ACEXML_ErrorHandler *handler) |
Public Attributes | |
virtual int | ACEXML_SAXNotSupportedException |
virtual void | ACEXML_SAXNotSupportedException |
virtual void * | ACEXML_SAXNotSupportedException |
Protected Methods | |
void | parse_xml_prolog (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
void | parse_version_info (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
void | parse_encoding_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
void | parse_xml_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_text_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_processing_instruction (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_doctypedecl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
void | parse_element (int is_root ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_content (const ACEXML_Char *startname, const ACEXML_Char *ns_uri, const ACEXML_Char *ns_lname ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_char_reference (ACEXML_Char *buf, size_t &len) |
ACEXML_Char * | parse_reference_name (void) |
int | parse_cdata (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_internal_dtd (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_comment (void) |
int | parse_element_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_entity_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_attlist_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_atttype (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_notation_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_external_id (ACEXML_Char *&publicId, ACEXML_Char *&systemId ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_external_dtd (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_external_subset (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_markup_decl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_conditional_section (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_includesect (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_ignoresect (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_PE_reference (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_entity_reference (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_entity_value (ACEXML_Char *&str ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_defaultdecl (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_children_definition (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_child (int skip_open_paren ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
ACEXML_Char * | parse_name (ACEXML_Char ch=0) |
ACEXML_Char * | parse_nmtoken (ACEXML_Char ch=0) |
int | parse_version (ACEXML_Char *&str) |
int | parse_version_num (ACEXML_Char *&str) |
int | parse_encname (ACEXML_Char *&str) |
int | parse_sddecl (ACEXML_Char *&str) |
ACEXML_Char * | parse_attname (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_attvalue (ACEXML_Char *&str ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_tokenized_type (ACEXML_ENV_SINGLE_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_system_literal (ACEXML_Char *&str) |
int | parse_pubid_literal (ACEXML_Char *&str) |
int | is_whitespace (const ACEXML_Char c) const |
int | isChar (ACEXML_UCS4 c) const |
int | isCharRef (const ACEXML_Char c) const |
int | isBasechar (const ACEXML_Char c) const |
int | isIdeographic (const ACEXML_Char c) const |
int | isCombiningchar (const ACEXML_Char c) const |
int | isDigit (const ACEXML_Char c) const |
int | isExtender (const ACEXML_Char c) const |
int | isLetter (const ACEXML_Char c) const |
int | isNameChar (const ACEXML_Char c) const |
int | isPubidChar (const ACEXML_Char c) const |
virtual ACEXML_Char | get (void) |
Get a character. | |
virtual ACEXML_Char | peek (void) |
Peek a character. | |
Private Methods | |
ACEXML_Char | skip_whitespace (void) |
int | skip_whitespace_count (ACEXML_Char *peek=0) |
int | skip_equal (void) |
int | get_quoted_string (ACEXML_Char *&str) |
int | isNormalDigit (const ACEXML_Char c) const |
void | error (const ACEXML_Char *msg ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
void | warning (const ACEXML_Char *msg ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
void | fatal_error (const ACEXML_Char *msg ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
void | prefix_mapping (const ACEXML_Char *prefix, const ACEXML_Char *uri, const ACEXML_Char *name, int start ACEXML_ENV_ARG_DECL) ACE_THROW_SPEC((ACEXML_SAXException)) |
int | parse_token (const ACEXML_Char *keyword) |
int | push_context (ACEXML_Parser_Context *context) |
int | pop_context (int GE_ref ACEXML_ENV_ARG_DECL) |
virtual int | switch_input (ACEXML_CharStream *cstream, const ACEXML_Char *systemId, const ACEXML_Char *publicId=0) |
virtual int | switch_input (ACEXML_InputSource *input, const ACEXML_Char *systemId, const ACEXML_Char *publicId=0) |
int | check_for_PE_reference (ACEXML_ENV_SINGLE_ARG_DECL) |
void | reset (void) |
ACEXML_Char * | normalize_systemid (const ACEXML_Char *systemId) |
Private Attributes | |
ACEXML_DTDHandler * | dtd_handler_ |
ACEXML_EntityResolver * | entity_resolver_ |
ACEXML_ContentHandler * | content_handler_ |
ACEXML_ErrorHandler * | error_handler_ |
ACEXML_Char * | doctype_ |
Document Type. | |
ACEXML_Parser_Context * | current_ |
Current parser context. | |
ACE_Unbounded_Stack< ACEXML_Parser_Context * > | ctx_stack_ |
Stack used to hold the Parser_Context. | |
ACE_Unbounded_Stack< ACEXML_Char * > | GE_reference_ |
Set used to hold the general entity references that are active. | |
ACE_Unbounded_Stack< ACEXML_Char * > | PE_reference_ |
Set used to hold the parameter entity references that are active. | |
ACE_Obstack_T< ACEXML_Char > | obstack_ |
Obstack used by the parser to hold all the strings parsed. | |
ACE_Obstack_T< ACEXML_Char > | alt_stack_ |
Alternative obstack used to hold any strings when the original is in use. | |
ACEXML_NamespaceSupport | xml_namespace_ |
Namespace stack used by the parser to implement support for Namespaces. | |
int | nested_namespace_ |
T => We are processing a nested namespace. | |
ACEXML_Entity_Manager | internal_GE_ |
Set of internal parsed general entities in the document. | |
ACEXML_Entity_Manager | external_GE_ |
Set of external parsed general entities in the document. | |
ACEXML_Entity_Manager | unparsed_entities_ |
Set of unparsed entities in the document. | |
ACEXML_Entity_Manager | predef_entities_ |
Set of predefined entities used by the parser. | |
ACEXML_Entity_Manager | internal_PE_ |
Set of internal parsed parameter entities in the document. | |
ACEXML_Entity_Manager | external_PE_ |
Set of external parsed parameter entities in the document. | |
ACEXML_Entity_Manager | notations_ |
Set of notations declared in the document. | |
ACEXML_ParserInt::ReferenceState | ref_state_ |
State of the parser when it encounters a reference. | |
int | external_subset_ |
T => We are parsing an external subset. | |
int | external_entity_ |
T => We are parsing an external entity value. | |
int | has_pe_refs_ |
T => Internal DTD has parameter entity references. | |
int | standalone_ |
If set, the document is a standalone XML document. | |
int | external_dtd_ |
If set, the document has an external DTD subset. | |
int | internal_dtd_ |
If set, the document has an internal DTD. | |
int | simple_parsing_ |
int | validate_ |
If set, the parser should also validate. | |
int | namespaces_ |
If set, the parser should allow access by namespace qualified names. | |
int | namespace_prefixes_ |
Static Private Attributes | |
const ACEXML_Char | simple_parsing_feature_ [] = ACE_TEXT ("Simple") |
const ACEXML_Char | namespaces_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/namespaces") |
const ACEXML_Char | namespace_prefixes_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/namespace-prefixes") |
const ACEXML_Char | validation_feature_ [] = ACE_TEXT ("http://xml.org/sax/features/validation") |
|
Default constructor.
|
|
Destructor.
|
|
Check for a parameter entity reference. This is used to check for the occurence of a PE Reference withing markupDecl. Additionally this function consumes any leading or trailing whitespace around the PE Reference.
|
|
Dispatch errors to ErrorHandler. |
|
Dispatch fatal errors to ErrorHandler. |
|
Get a character.
|
|
Get a quoted string. Quoted strings are used to specify attribute values and this routine will replace character and entity references on-the-fly. Parameter entities are not allowed (or replaced) in this function. (But regular entities are.)
|
|
Return the current content handler. Implements ACEXML_XMLReader. |
|
Return the current DTD handler. Implements ACEXML_XMLReader. |
|
Return the current entity resolver. Implements ACEXML_XMLReader. |
|
Return the current error handler. Implements ACEXML_XMLReader. |
|
Look up the value of a feature. This method allows programmers to check whether a specific feature has been activated in the parser. Reimplemented from ACEXML_XMLReader. |
|
Look up the value of a property. Reimplemented from ACEXML_XMLReader. |
|
Initialize the parser state.
|
|
Check if a character c is a whitespace.
|
|
Check if a character c is a BaseChar.
|
|
Check if a character c is a valid Char.
|
|
Check if a character c is a valid CharRef character.
|
|
Check if a character c is a CombiningChar.
|
|
Check if a character c is a Digit.
|
|
Check if a character c is an Extender.
|
|
Check if a character c is a Ideographic.
|
|
Check if a character c is a Letter.
|
|
Check if a character is an acceptable NameChar.
|
|
Check if a character c is a Digit.
|
|
Check if a character is a PubidChar.
|
|
Very trivial, non-conformant normalization of a systemid. |
|
Parse an XML document from a system identifier (URI). Implements ACEXML_XMLReader. |
|
Parse an XML document. Implements ACEXML_XMLReader. |
|
Parse an "ATTLIST" decl. Thse first character this method expects is always the 'A' (the first char) in the word "ATTLIST".
|
|
Parse an attribute name.
|
|
Parse a AttType declaration. |
|
Parse an attribute value.
|
|
Parse a CDATA section. The first character should always be the first '[' in CDATA definition.
|
|
Parse a character reference, i.e., "&x20;" or "". The first character encountered should be the '#' char.
|
|
Parse a
|
|
Parse the "children" and "Mixed" non-terminals in contentspec. The first character this function sees must be the first open paren '(' in children.
|
|
Skip over a comment. The first character encountered should always be the first '-' in the comment prefix "<@!--". |
|
Parse a conditionalSect declaration. |
|
Parse a content declaration. |
|
Parse a DefaultDecl specification. |
|
Parse the DOCTYPE declaration. The first character encountered should always be 'D' in doctype prefix: "<@!DOCTYPE". |
|
Parse an XML element. The first character encountered should be the first character of the element "Name".
|
|
Parse an "ELEMENT" decl. The first character this method expects is always the 'L' (the second char) in the word "ELEMENT".
|
|
Parse the encoding name in an XML Prolog section.
|
|
Parse a EncodingDecl declaration. |
|
Parse an "ENTITY" decl. The first character this method expects is always the 'N' (the second char) in the word "ENTITY".
|
|
Parse a Reference. |
|
Parse an entityValue. |
|
Parse an external DTD. |
|
Parse an ExternalID or a reference to PUBLIC ExternalID. Possible cases are in the forms of:
SYSTEM 'quoted string representing system resource' PUBLIC 'quoted name of public ID' 'quoted resource' PUBLIC 'quoted name we are referring to' The first character this function sees must be either 'S' or 'P'. When the function finishes parsing, the input stream points at the first non-whitespace character.
|
|
Parse an external subset. This does the actual parsing of an external subset and is called by
|
|
Parse a ignoreSect declaration. |
|
Parse a includeSect declaration. |
|
Parse a "markupdecl" section, this includes both "markupdecl" and "DeclSep" sections in XML specification |
|
Parse a markupDecl section. |
|
Parse a name from the input CharStream. If ch @!= 0, then we have already consumed the first name character from the input CharStream, otherwise, parse_name will use this->get() to acquire the initial character.
|
|
Parse a NMTOKEN from the input stream.
|
|
Parse a "NOTATION" decl. The first character this method expects is always the 'N' (the first char) in the word "NOTATION".
|
|
Parse a PEReference. |
|
Parse a PI statement. The first character encountered should always be '?' in the PI prefix "<?".
|
|
Parse a PubidLiteral.
|
|
Parse a reference name, i.e., foo in "&foo;" or "foo;". The first character encountered should be the character following '&' or '%'. Effectively the same as
|
|
Parse a SDDecl string.
|
|
Parse a SystemLiteral.
|
|
Parse a TextDecl declaration. |
|
Parse a keyword. |
|
Parse a tokenized type attribute.
|
|
Parse the version string in an XML Prolog section.
|
|
Parse VersionInfo declaration. |
|
Parse the version number in a VersionInfo declaration. |
|
Parse a XMLDecl declaration. |
|
Parse XML Prolog. |
|
Peek a character.
|
|
Pop the top element in the stack and replace current context with that. |
|
Dispatch prefix mapping calls to the ContentHandler.
|
|
Push the current context on to the stack. |
|
Reset the parser state. |
|
Allow an application to register a content event handler. Implements ACEXML_XMLReader. |
|
Allow an application to register a DTD event handler. Implements ACEXML_XMLReader. |
|
Allow an application to register an entity resolver. Implements ACEXML_XMLReader. |
|
Allow an application to register an error event handler. Implements ACEXML_XMLReader. |
|
Activating or deactivating a feature. Reimplemented from ACEXML_XMLReader. |
|
Set the value of a property. Reimplemented from ACEXML_XMLReader. |
|
Skip an equal sign.
|
|
Skip any whitespaces encountered until the first non-whitespace character is encountered.
|
|
Skip any whitespaces encountered until the first non-whitespace character. The first non-whitespace character is not consumed. This method does peek into the input CharStream and therefore is more expensive than skip_whitespace.
|
|
Create a new ACEXML_InputSource from systemId and publicId and replace the current input source with the newly created InputSource. |
|
Create a new ACEXML_CharStream from systemId and publicId and replace the current input stream with the newly created stream. |
|
Dispatch warnings to ErrorHandler. |
|
Reimplemented from ACEXML_XMLReader. |
|
Reimplemented from ACEXML_XMLReader. |
|
Reimplemented from ACEXML_XMLReader. |
|
Alternative obstack used to hold any strings when the original is in use.
|
|
|
|
Stack used to hold the Parser_Context.
|
|
Current parser context.
|
|
Document Type.
|
|
Keeping track of the handlers. We do not manage the memory for handlers. |
|
|
|
|
|
If set, the document has an external DTD subset.
|
|
T => We are parsing an external entity value.
|
|
Set of external parsed general entities in the document.
|
|
Set of external parsed parameter entities in the document.
|
|
T => We are parsing an external subset.
|
|
Set used to hold the general entity references that are active.
|
|
T => Internal DTD has parameter entity references.
|
|
If set, the document has an internal DTD.
|
|
Set of internal parsed general entities in the document.
|
|
Set of internal parsed parameter entities in the document.
|
|
If set, the parser should include namespace declarations in the list of attributes of an element. |
|
If set, the parser should allow access by namespace qualified names.
|
|
T => We are processing a nested namespace.
|
|
Set of notations declared in the document.
|
|
Obstack used by the parser to hold all the strings parsed.
|
|
Set used to hold the parameter entity references that are active.
|
|
Set of predefined entities used by the parser.
|
|
State of the parser when it encounters a reference.
|
|
Feature flags If set, the parser should parse a document without a prolog |
|
If set, the document is a standalone XML document.
|
|
Set of unparsed entities in the document.
|
|
If set, the parser should also validate.
|
|
Namespace stack used by the parser to implement support for Namespaces.
|