1
#ifndef __INKSCAPE_IO_XSLTSTREAM_H__
2
#define __INKSCAPE_IO_XSLTSTREAM_H__
4
* Xslt-enabled input and output streams
8
* Bob Jamison <ishmalius@gmail.com>
10
* Copyright (C) 2004-2008 Inkscape.org
12
* Released under GNU GPL, read the file 'COPYING' for more information
16
#include "inkscapestream.h"
18
#include <libxslt/xslt.h>
19
#include <libxslt/xsltInternals.h>
27
//#########################################################################
28
//# X S L T S T Y L E S H E E T
29
//#########################################################################
31
* This is a container for reusing a loaded stylesheet
39
* Constructor with loading
41
XsltStyleSheet(InputStream &source) throw (StreamException);
44
* Simple constructor, no loading
51
bool read(InputStream &source);
56
virtual ~XsltStyleSheet();
58
xsltStylesheetPtr stylesheet;
61
}; // class XsltStyleSheet
64
//#########################################################################
65
//# X S L T I N P U T S T R E A M
66
//#########################################################################
69
* This class is for transforming stream input by a given stylesheet
71
class XsltInputStream : public BasicInputStream
76
XsltInputStream(InputStream &xmlSource, XsltStyleSheet &stylesheet)
77
throw (StreamException);
79
virtual ~XsltInputStream() throw (StreamException);
81
virtual int available() throw (StreamException);
83
virtual void close() throw (StreamException);
85
virtual int get() throw (StreamException);
90
XsltStyleSheet &stylesheet;
96
}; // class UriInputStream
101
//#########################################################################
102
//# X S L T O U T P U T S T R E A M
103
//#########################################################################
106
* This class is for transforming stream output by a given stylesheet
108
class XsltOutputStream : public BasicOutputStream
113
XsltOutputStream(OutputStream &destination, XsltStyleSheet &stylesheet)
114
throw (StreamException);
116
virtual ~XsltOutputStream() throw (StreamException);
118
virtual void close() throw (StreamException);
120
virtual void flush() throw (StreamException);
122
virtual void put(int ch) throw (StreamException);
126
XsltStyleSheet &stylesheet;
128
Glib::ustring outbuf;
132
}; // class UriOutputStream
137
} // namespace Inkscape
140
#endif /* __INKSCAPE_IO_XSLTSTREAM_H__ */