CYCLUS
relax_ng_validator.h
Go to the documentation of this file.
1 /* relaxngvalidator.h
2  * this class is agented off of the schemavalidator in libxml++
3  * here is their license statement:
4  *
5  * libxml++ and this file are copyright (C) 2000 by Ari Johnson,
6  * (C) 2002-2004 by the libxml dev team and
7  * are covered by the GNU Lesser General Public License, which should be
8  * included with libxml++ as the file COPYING.
9  */
10 
11 #ifndef CYCLUS_SRC_RELAX_NG_VALIDATOR_H_
12 #define CYCLUS_SRC_RELAX_NG_VALIDATOR_H_
13 
14 #include <glibmm/ustring.h>
15 
16 class _xmlRelaxNG;
17 class _xmlRelaxNGParserCtxt;
18 class _xmlRelaxNGValidCtxt;
19 typedef _xmlRelaxNG xmlRelaxNG;
20 typedef _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
21 typedef _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
22 
23 namespace xmlpp {
24  class Document;
25 }
26 
27 namespace cyclus {
28 
29 /// RelaxNGValidator
30 ///
31 /// This class provides a simple interface to validate xml documents
32 /// agaisnt a given RelaxNG schema.
34  public:
35  /// constructor
37 
38  /// destructor
40 
41  /// parse a relaxng schema xml file
42  /// @param contents the contents of the xml file
43  void parse_memory(const Glib::ustring& contents);
44 
45  /// validate an xml file agaisnt the given schema
46  /// @param doc the xml file document
47  bool Validate(const xmlpp::Document* doc);
48 
49  protected:
50  /// free xml-related memory
51  void release_underlying();
52 
53  /// parse a relaxng schema context
54  /// @param context the context
55  void parse_context(xmlRelaxNGParserCtxt* context);
56 
57  /// the schema
59 
60  /// the validated context
62 };
63 
64 } // namespace cyclus
65 
66 #endif // CYCLUS_SRC_RELAX_NG_VALIDATOR_H_
_xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt
xmlRelaxNG * schema_
the schema
xmlRelaxNGValidCtxt * valid_context_
the validated context
std::string doc(int x)
Definition: pyne.cc:6557
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
Definition: agent.cc:14
_xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt
_xmlRelaxNG xmlRelaxNG