XSLTree.hpp
Go to the documentation of this file.
#ifndef UI_GXML_XSLTREE_HPP
#define UI_GXML_XSLTREE_HPP
// STDC++
#include <string>
#include <cassert>
// C++ Libraries
#include <ui-gxmlcpp/Tree.hpp>
// C libraries
#include <libxslt/xsltInternals.h>
namespace UI {
namespace GXML {
class XSLTree: public Tree
{
private:
static xsltStylesheetPtr create(xmlDocPtr const doc);
public:
enum ErrorCode
{
Style_ = 0 // Not a valid stylesheet
};
typedef CodeException<ErrorCode> Exception;
XSLTree(char const * xml, int len=-1, std::string const & base=DefaultDocbase_, int const options=0);
XSLTree(std::string const & xml, std::string const & base=DefaultDocbase_, int const options=0);
XSLTree(std::istream & xml, std::string const & base=DefaultDocbase_, int const options=0);
XSLTree(FileConstructor const dummy, std::string const & file, int const options=0);
private:
XSLTree(XSLTree const & tree);
XSLTree & operator=(XSLTree const & xslTree);
public:
~XSLTree();
std::string getOutputEncoding() const;
protected:
friend class XSLTransTree;
xsltStylesheet * getStylesheet() const;
private:
xsltStylesheetPtr style_;
};
}}
#endif
Tree.hpp
UI::GXML::CodeException
Adding code facility to Exception.
Definition Exception.hpp:35
UI::GXML::Tree::FileConstructor
FileConstructor
Helper enum for constructor from file name.
Definition Tree.hpp:103
UI::GXML::Tree::DefaultDocbase_
static std::string const DefaultDocbase_
Default document base. This is used for from-memory parsing if not specified otherwise.
Definition Tree.hpp:74
UI::GXML::Tree::Tree
Tree()
Protected default constructor.
Definition Tree.cpp:74
UI::GXML::XSLTree::~XSLTree
~XSLTree()
Definition XSLTree.cpp:78
UI::GXML::XSLTree::getStylesheet
xsltStylesheet * getStylesheet() const
Get libxml2 stylesheet struct.
Definition XSLTree.cpp:91
UI::GXML::XSLTree::ErrorCode
ErrorCode
Error codes for exceptions.
Definition XSLTree.hpp:35
UI::GXML::XSLTree::XSLTransTree
friend class XSLTransTree
We need to access libxml2 doc pointer to parse the stylesheet with libxml2 function.
Definition XSLTree.hpp:64
UI::GXML::XSLTree::getOutputEncoding
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
UI::GXML::XSLTree::Exception
CodeException< ErrorCode > Exception
Exceptions for this class.
Definition XSLTree.hpp:39
UI::GXML
Namespace for library project "ui-gxmlcpp".
Definition Buffer.cpp:31
UI
Namespace for all Schlund+Partner Code.
Definition Buffer.cpp:30