From a15cf65c44d5c224169c32ef5495b68c758134b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 18 May 2014 16:08:14 +0200 Subject: Imported Upstream version 3.3.0.2 --- libxsd-frontend/xsd-frontend/schema-dom-parser.hxx | 93 ++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 libxsd-frontend/xsd-frontend/schema-dom-parser.hxx (limited to 'libxsd-frontend/xsd-frontend/schema-dom-parser.hxx') diff --git a/libxsd-frontend/xsd-frontend/schema-dom-parser.hxx b/libxsd-frontend/xsd-frontend/schema-dom-parser.hxx new file mode 100644 index 0000000..7571677 --- /dev/null +++ b/libxsd-frontend/xsd-frontend/schema-dom-parser.hxx @@ -0,0 +1,93 @@ +// file : xsd-frontend/schema-dom-parser.hxx +// author : Boris Kolpackov +// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSD_FRONTEND_SCHEMA_DOM_PARSER_HXX +#define XSD_FRONTEND_SCHEMA_DOM_PARSER_HXX + +#include + +#include + +#include +#include + +namespace XSDFrontend +{ + namespace XML + { + namespace Xerces = xercesc; + + extern const XMLCh line_key[2]; + extern const XMLCh column_key[2]; + + class SchemaDOMParser: public Xerces::XercesDOMParser + { + public : + SchemaDOMParser ( + Xerces::MemoryManager* = Xerces::XMLPlatformUtils::fgMemoryManager); + + // Callbacks. + // + virtual void + startElement (const Xerces::XMLElementDecl&, + const unsigned int url_id, + const XMLCh* const prefix, + const Xerces::RefVectorOf& attributes, +#if _XERCES_VERSION >= 30000 + const XMLSize_t attribute_count, +#else + const unsigned int attribute_count, +#endif + const bool empty, + const bool root); + + virtual void + endElement (const Xerces::XMLElementDecl&, + const unsigned int url_id, + const bool root, + const XMLCh* const prefix); + + virtual void + docCharacters (const XMLCh* const, +#if _XERCES_VERSION >= 30000 + const XMLSize_t length, +#else + const unsigned int length, +#endif + const bool cdata); + + virtual void + docComment (const XMLCh* const); + + virtual void + startEntityReference (const Xerces::XMLEntityDecl&); + + virtual void + endEntityReference (const Xerces::XMLEntityDecl&); + + virtual void + ignorableWhitespace (const XMLCh* const, +#if _XERCES_VERSION >= 30000 + const XMLSize_t length, +#else + const unsigned int length, +#endif + const bool cdata); + private: + SchemaDOMParser (SchemaDOMParser const&); + SchemaDOMParser& + operator=(SchemaDOMParser const&); + + private: + int depth_; + int ann_depth_; + int inner_ann_depth_; + Xerces::XSDLocator locator_; + Xerces::XSDErrorReporter error_reporter_; + }; + } +} + +#endif // XSD_FRONTEND_SCHEMA_DOM_PARSER_HXX -- cgit v1.2.3