28 #ifndef _CEGUIXercesParser_h_
29 #define _CEGUIXercesParser_h_
31 #include "../../CEGUIXMLParser.h"
32 #include "CEGUIXercesParserProperties.h"
34 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
35 # ifdef CEGUIXERCESPARSER_EXPORTS
36 # define CEGUIXERCESPARSER_API __declspec(dllexport)
38 # define CEGUIXERCESPARSER_API __declspec(dllimport)
41 # define CEGUIXERCESPARSER_API
46 #include <xercesc/framework/MemBufInputSource.hpp>
47 #include <xercesc/util/PlatformUtils.hpp>
48 #include <xercesc/util/TransService.hpp>
49 #include <xercesc/util/XMLString.hpp>
50 #include <xercesc/sax2/Attributes.hpp>
51 #include <xercesc/sax2/DefaultHandler.hpp>
52 #include <xercesc/sax2/SAX2XMLReader.hpp>
53 #include <xercesc/sax2/XMLReaderFactory.hpp>
65 void startElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname,
const XERCES_CPP_NAMESPACE::Attributes& attrs);
66 void endElement(
const XMLCh*
const uri,
const XMLCh*
const localname,
const XMLCh*
const qname);
67 #if _XERCES_VERSION >= 30000
68 void characters(
const XMLCh*
const chars,
const XMLSize_t length);
70 void characters (
const XMLCh *
const chars,
const unsigned int length);
72 void warning (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
73 void error (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
74 void fatalError (
const XERCES_CPP_NAMESPACE::SAXParseException &exc);
98 static void populateAttributesBlock(
const XERCES_CPP_NAMESPACE::Attributes& src,
XMLAttributes& dest);
111 static String transcodeXmlCharToString(
const XMLCh*
const xmlch_str,
unsigned int length);
123 static void setSchemaDefaultResourceGroup(
const String& resourceGroup)
124 { d_defaultSchemaResourceGroup = resourceGroup; }
133 static const String& getSchemaDefaultResourceGroup()
134 {
return d_defaultSchemaResourceGroup; }
137 static void initialiseSchema(XERCES_CPP_NAMESPACE::SAX2XMLReader* reader,
const String& schemaName,
const String& xmlFilename,
const String& resourceGroup);
138 static XERCES_CPP_NAMESPACE::SAX2XMLReader* createReader(XERCES_CPP_NAMESPACE::DefaultHandler& handler);
139 static void doParse(XERCES_CPP_NAMESPACE::SAX2XMLReader* parser,
const String& xmlFilename,
const String& resourceGroup);
142 bool initialiseImpl(
void);
143 void cleanupImpl(
void);
155 #endif // end of guard _CEGUIXercesParser_h_