ui-gxmlcpp  1.4.4
XSLTree.hpp
Go to the documentation of this file.
1 
10 #ifndef UI_GXML_XSLTREE_HPP
11 #define UI_GXML_XSLTREE_HPP
12 
13 // STDC++
14 #include <string>
15 #include <cassert>
16 
17 // C++ Libraries
18 #include <ui-gxmlcpp/Tree.hpp>
19 
20 // C libraries
21 #include <libxslt/xsltInternals.h>
22 
23 namespace UI {
24 namespace GXML {
25 
27 class XSLTree: public Tree
28 {
29 private:
30  static xsltStylesheetPtr create(xmlDocPtr const doc);
31 
32 public:
34  enum ErrorCode
35  {
36  Style_ = 0 // Not a valid stylesheet
37  };
40 
43  XSLTree(char const * xml, int len=-1, std::string const & base=DefaultDocbase_, int const options=0);
44  XSLTree(std::string const & xml, std::string const & base=DefaultDocbase_, int const options=0);
45  XSLTree(std::istream & xml, std::string const & base=DefaultDocbase_, int const options=0);
46  XSLTree(FileConstructor const dummy, std::string const & file, int const options=0);
49 private:
52  XSLTree(XSLTree const & tree);
53  XSLTree & operator=(XSLTree const & xslTree);
56 public:
57  ~XSLTree();
58 
60  std::string getOutputEncoding() const;
61 
62 protected:
64  friend class XSLTransTree;
66  xsltStylesheet * getStylesheet() const;
67 
68 private:
69  xsltStylesheetPtr style_;
70 };
71 
72 }}
73 #endif
CodeException< ErrorCode > Exception
Exceptions for this class.
Definition: XSLTree.hpp:39
Namespace for all Schlund+Partner Code.
Definition: Buffer.cpp:30
XSL (stylesheet) Tree.
Definition: XSLTree.hpp:27
ErrorCode
Error codes for exceptions.
Definition: Tree.hpp:51
Adding code facility to Exception.
Definition: Exception.hpp:34
FileConstructor
Helper enum for constructor from file name.
Definition: Tree.hpp:102
static std::string const DefaultDocbase_
Default document base. This is used for from-memory parsing if not specified otherwise.
Definition: Tree.hpp:74
XML tree.
Definition: Tree.hpp:30
~XSLTree()
Definition: XSLTree.cpp:78
xsltStylesheet * getStylesheet() const
Get libxml2 stylesheet struct.
Definition: XSLTree.cpp:91
XSL translation result tree.
Definition: XSLTransTree.hpp:35
std::string getOutputEncoding() const
Get output charset encoding (i.e., what is specified in xsl::output); empty if none is specified...
Definition: XSLTree.cpp:86