]> git.donarmstrong.com Git - flightcrew.git/blob - src/FlightCrew/Validators/DomSchemaValidator.h
add flightcrew-gui manpage
[flightcrew.git] / src / FlightCrew / Validators / DomSchemaValidator.h
1 /************************************************************************
2 **
3 **  Copyright (C) 2010  Strahinja Markovic
4 **
5 **  This file is part of FlightCrew.
6 **
7 **  FlightCrew is free software: you can redistribute it and/or modify
8 **  it under the terms of the GNU Lesser General Public License as published
9 **  by the Free Software Foundation, either version 3 of the License, or
10 **  (at your option) any later version.
11 **
12 **  FlightCrew is distributed in the hope that it will be useful,
13 **  but WITHOUT ANY WARRANTY; without even the implied warranty of
14 **  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 **  GNU Lesser General Public License for more details.
16 **
17 **  You should have received a copy of the GNU Lesser General Public License
18 **  along with FlightCrew.  If not, see <http://www.gnu.org/licenses/>.
19 **
20 *************************************************************************/
21
22 #pragma once
23 #ifndef DOMSCHEMAVALIDATOR_H
24 #define DOMSCHEMAVALIDATOR_H
25
26 #include <xercesc/framework/MemBufInputSource.hpp>
27 namespace XERCES_CPP_NAMESPACE { class MemBufInputSource; };
28 namespace xc = XERCES_CPP_NAMESPACE;
29 namespace XercesExt { class LocationAwareDOMParser; }
30 namespace xe = XercesExt;
31 #include "IValidator.h"
32
33 namespace FlightCrew
34 {
35
36 class DomSchemaValidator : public IValidator
37 {
38
39 protected:
40
41     std::vector< Result > ValidateAgainstSchema( 
42         const fs::path &filepath, 
43         const std::string &external_schema_location,
44         const std::vector< const xc::MemBufInputSource* > &schemas,
45         const std::vector< const xc::MemBufInputSource* > &dtds );
46
47 private:
48
49     void LoadSchemas( 
50         xe::LocationAwareDOMParser &parser,
51         const std::string &external_schema_location,
52         const std::vector< const xc::MemBufInputSource* > &schemas,
53         const std::vector< const xc::MemBufInputSource* > &dtds );
54 };
55
56 } // namespace FlightCrew
57
58 #endif // DOMSCHEMAVALIDATOR_H