summaryrefslogtreecommitdiffstats
path: root/src/extension/implementation/xslt.h
blob: 745d7f57aa458ccc32c1397e37732ec46088ac15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Code for handling XSLT extensions
 *
 * Authors:
 *   Ted Gould <ted@gould.cx>
 *
 * Copyright (C) 2006-2007 Authors
 *
 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
 */

#ifndef __INKSCAPE_EXTENSION_IMPEMENTATION_XSLT_H__
#define __INKSCAPE_EXTENSION_IMPEMENTATION_XSLT_H__

#include "implementation.h"

#include "libxml/tree.h"
#include "libxslt/xslt.h"
#include "libxslt/xsltInternals.h"

namespace Inkscape {
namespace XML {
class Node;
}
}


namespace Inkscape {
namespace Extension {
namespace Implementation {

class XSLT : public Implementation {
private:
    std::string _filename;
    xmlDocPtr _parsedDoc;
    xsltStylesheetPtr _stylesheet;

public:
    XSLT ();

    bool load(Inkscape::Extension::Extension *module) override;
    void unload(Inkscape::Extension::Extension *module) override;

    bool check(Inkscape::Extension::Extension *module) override;

    SPDocument *open(Inkscape::Extension::Input *module,
                     gchar const *filename) override;
    void save(Inkscape::Extension::Output *module, SPDocument *doc, gchar const *filename) override;
};

}  /* Inkscape  */
}  /* Extension  */
}  /* Implementation  */
#endif /* __INKSCAPE_EXTENSION_IMPEMENTATION_XSLT_H__ */

/*
  Local Variables:
  mode:c++
  c-file-style:"stroustrup"
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
  indent-tabs-mode:nil
  fill-column:99
  End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :