50 |
50 |
51 |
51 |
52 class MSaxLayoutHandler |
52 class MSaxLayoutHandler |
53 { |
53 { |
54 public: |
54 public: |
55 typedef SAX::basic_Attributes<std::string> TAttribs; |
55 typedef Arabica::SAX::Attributes<std::string> TAttribs; |
56 virtual MSaxLayoutHandler* HandleSax(const std::string& aElement, const TAttribs& aAttribs) { return this; }; |
56 virtual MSaxLayoutHandler* HandleSax(const std::string& aElement, const TAttribs& aAttribs) { return this; }; |
57 virtual void HandleSaxEnd(const std::string& aElement) { }; |
57 virtual void HandleSaxEnd(const std::string& aElement) { }; |
58 }; |
58 }; |
59 |
59 |
60 |
60 |
153 public: // from MSaxLayoutHandler |
153 public: // from MSaxLayoutHandler |
154 MSaxLayoutHandler* HandleSax(const std::string& aElement, const TAttribs& aAttribs); |
154 MSaxLayoutHandler* HandleSax(const std::string& aElement, const TAttribs& aAttribs); |
155 }; |
155 }; |
156 |
156 |
157 |
157 |
158 class TLayoutSaxParser : private SAX::basic_DefaultHandler<std::string> |
158 class TLayoutSaxParser : private Arabica::SAX::DefaultHandler<std::string> |
159 { |
159 { |
160 private: |
160 private: |
161 typedef stack<MSaxLayoutHandler*> TSaxHandlerStack; |
161 typedef stack<MSaxLayoutHandler*> TSaxHandlerStack; |
162 typedef SAX::basic_ErrorHandler<std::string>::SAXParseExceptionT TException; |
162 typedef Arabica::SAX::ErrorHandler<std::string>::SAXParseExceptionT TException; |
163 |
163 |
164 public: |
164 public: |
165 TLayoutSaxParser(MSaxLayoutHandler* aHandler); |
165 TLayoutSaxParser(MSaxLayoutHandler* aHandler); |
166 void Parse(const std::string& aFileName); |
166 void Parse(const std::string& aFileName); |
167 |
167 |
168 private: // from basic_DefaultHandler |
168 private: // from basic_DefaultHandler |
169 void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const SAX::basic_Attributes<std::string>& atts); |
169 void startElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName, const Arabica::SAX::Attributes<std::string>& atts); |
170 void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName); |
170 void endElement(const std::string& namespaceURI, const std::string& localName, const std::string& qName); |
171 |
171 |
172 void warning(const TException& aException); |
172 void warning(const TException& aException); |
173 void error(const TException& aException); |
173 void error(const TException& aException); |
174 void fatalError(const TException& aException); |
174 void fatalError(const TException& aException); |