CYCLUS
Loading...
Searching...
No Matches
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
16class _xmlRelaxNG;
17class _xmlRelaxNGParserCtxt;
18class _xmlRelaxNGValidCtxt;
19typedef _xmlRelaxNG xmlRelaxNG;
20typedef _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
21typedef _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
22
23namespace xmlpp {
24 class Document;
25}
26
27namespace 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
56
57 /// the schema
59
60 /// the validated context
62};
63
64} // namespace cyclus
65
66#endif // CYCLUS_SRC_RELAX_NG_VALIDATOR_H_
void release_underlying()
free xml-related memory
void parse_memory(const Glib::ustring &contents)
parse a relaxng schema xml file
xmlRelaxNG * schema_
the schema
void parse_context(xmlRelaxNGParserCtxt *context)
parse a relaxng schema context
xmlRelaxNGValidCtxt * valid_context_
the validated context
bool Validate(const xmlpp::Document *doc)
validate an xml file agaisnt the given schema
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
Definition agent.cc:14
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters
_xmlRelaxNG xmlRelaxNG
_xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt
_xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt