summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2006-05-02 05:26:13 +0000
committergouldtj <gouldtj@users.sourceforge.net>2006-05-02 05:26:13 +0000
commit422f555591b3b7f2a0157e74cd95f7095f4c1098 (patch)
treeea4b89d6d1942da38ebc7d2af26eb4cf3387fa59
parentr11466@tres: ted | 2006-04-19 21:27:49 -0700 (diff)
downloadinkscape-422f555591b3b7f2a0157e74cd95f7095f4c1098.tar.gz
inkscape-422f555591b3b7f2a0157e74cd95f7095f4c1098.zip
r11467@tres: ted | 2006-04-19 21:49:02 -0700
Adding in the basic support for having an xslt implementation. (bzr r675)
-rw-r--r--src/extension/implementation/Makefile_insert6
-rw-r--r--src/extension/implementation/xslt.cpp52
-rw-r--r--src/extension/implementation/xslt.h50
-rw-r--r--src/extension/system.cpp9
4 files changed, 115 insertions, 2 deletions
diff --git a/src/extension/implementation/Makefile_insert b/src/extension/implementation/Makefile_insert
index 5d70216d2..0600c05f2 100644
--- a/src/extension/implementation/Makefile_insert
+++ b/src/extension/implementation/Makefile_insert
@@ -8,6 +8,8 @@ extension/implementation/clean:
extension_implementation_libimplementation_a_SOURCES = \
extension/implementation/implementation.cpp \
- extension/implementation/implementation.h \
+ extension/implementation/implementation.h \
extension/implementation/script.cpp \
- extension/implementation/script.h
+ extension/implementation/script.h \
+ extension/implementation/xslt.cpp \
+ extension/implementation/xslt.h
diff --git a/src/extension/implementation/xslt.cpp b/src/extension/implementation/xslt.cpp
new file mode 100644
index 000000000..3301679cc
--- /dev/null
+++ b/src/extension/implementation/xslt.cpp
@@ -0,0 +1,52 @@
+/** \file
+ * Code for handling XSLT extensions.
+ */
+/*
+ * Authors:
+ * Ted Gould <ted@gould.cx>
+ *
+ * Copyright (C) 2006 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "xslt.h"
+
+
+/* Namespaces */
+namespace Inkscape {
+namespace Extension {
+namespace Implementation {
+
+/* Real functions */
+/**
+ \return A XSLT object
+ \brief This function creates a XSLT object and sets up the
+ variables.
+
+*/
+XSLT::XSLT(void) :
+ Implementation()
+{
+}
+
+
+} /* Implementation */
+} /* module */
+} /* Inkscape */
+
+
+/*
+ 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:encoding=utf-8:textwidth=99 :
diff --git a/src/extension/implementation/xslt.h b/src/extension/implementation/xslt.h
new file mode 100644
index 000000000..822f4010e
--- /dev/null
+++ b/src/extension/implementation/xslt.h
@@ -0,0 +1,50 @@
+/*
+ * Code for handling XSLT extensions
+ *
+ * Authors:
+ * Ted Gould <ted@gould.cx>
+ *
+ * Copyright (C) 2006 Authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifndef __INKSCAPE_EXTENSION_IMPEMENTATION_XSLT_H__
+#define __INKSCAPE_EXTENSION_IMPEMENTATION_XSLT_H__
+
+#include "implementation.h"
+
+namespace Inkscape {
+namespace XML {
+class Node;
+}
+}
+
+
+namespace Inkscape {
+namespace Extension {
+namespace Implementation {
+
+class XSLT : public Implementation {
+private:
+
+public:
+ XSLT (void);
+
+};
+
+} /* 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 :
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index f62089369..81bf3075e 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -25,6 +25,7 @@
#include "patheffect.h"
#include "print.h"
#include "implementation/script.h"
+#include "implementation/xslt.h"
/* #include "implementation/plugin.h" */
namespace Inkscape {
@@ -326,6 +327,7 @@ build_from_reprdoc(Inkscape::XML::Document *doc, Implementation::Implementation
{
enum {
MODULE_EXTENSION,
+ MODULE_XSLT,
/* MODULE_PLUGIN, */
MODULE_UNKNOWN_IMP
} module_implementation_type = MODULE_UNKNOWN_IMP;
@@ -365,6 +367,8 @@ build_from_reprdoc(Inkscape::XML::Document *doc, Implementation::Implementation
module_functional_type = MODULE_PATH_EFFECT;
} else if (!strcmp(element_name, "script")) {
module_implementation_type = MODULE_EXTENSION;
+ } else if (!strcmp(element_name, "xslt")) {
+ module_implementation_type = MODULE_XSLT;
#if 0
} else if (!strcmp(element_name, "plugin")) {
module_implementation_type = MODULE_PLUGIN;
@@ -384,6 +388,11 @@ build_from_reprdoc(Inkscape::XML::Document *doc, Implementation::Implementation
imp = static_cast<Implementation::Implementation *>(script);
break;
}
+ case MODULE_XSLT: {
+ Implementation::XSLT *xslt = new Implementation::XSLT();
+ imp = static_cast<Implementation::Implementation *>(xslt);
+ break;
+ }
#if 0
case MODULE_PLUGIN: {
Implementation::Plugin *plugin = new Implementation::Plugin();