From a4472a42316106d1183ebaabde17c9cd0809eebc Mon Sep 17 00:00:00 2001
From: sebd <>
Date: Thu, 23 Jun 2005 10:22:50 +0000
Subject: [PATCH] SVG support.
---
config-svgtest.xml | 20 ++++++
src/core/dataholders.py | 3 +-
vhosts/svgtest/_config.xml | 12 ++++
vhosts/svgtest/image.svg | 118 ++++++++++++++++++++++++++++++++++
vhosts/svgtest/image.xml | 118 ++++++++++++++++++++++++++++++++++
vhosts/svgtest/index.html | 26 ++++++++
vhosts/svgtest/xhtml_svg.xml | 20 ++++++
vhosts/svgtest/xquery_svg.xml | 31 +++++++++
8 files changed, 347 insertions(+), 1 deletion(-)
create mode 100644 config-svgtest.xml
create mode 100644 vhosts/svgtest/_config.xml
create mode 100644 vhosts/svgtest/image.svg
create mode 100644 vhosts/svgtest/image.xml
create mode 100644 vhosts/svgtest/index.html
create mode 100644 vhosts/svgtest/xhtml_svg.xml
create mode 100644 vhosts/svgtest/xquery_svg.xml
diff --git a/config-svgtest.xml b/config-svgtest.xml
new file mode 100644
index 0000000..0c35566
--- /dev/null
+++ b/config-svgtest.xml
@@ -0,0 +1,20 @@
+
+
+ expression.pid
+
+
+
+
+
+ vhosts/svgtest/
+ 1997
+ localhost
+ SVG Test Site
+
+
diff --git a/src/core/dataholders.py b/src/core/dataholders.py
index bb79898..f878ab0 100644
--- a/src/core/dataholders.py
+++ b/src/core/dataholders.py
@@ -66,6 +66,7 @@ mimeTypes = {
".std": "application/vnd.sun.xml.draw.template",
".sti": "application/vnd.sun.xml.impress.template",
".stw": "application/vnd.sun.xml.writer.template",
+ ".svg": "image/svg+xml",
".sxc": "application/vnd.sun.xml.calc",
".sxd": "application/vnd.sun.xml.draw",
".sxg": "application/vnd.sun.xml.writer.global",
@@ -684,7 +685,7 @@ class StaticDataHolder(DataHolder):
class ImageHolder(StaticDataHolder):
- mimeTypes = ("image/gif", "image/jpeg", "image/png")
+ mimeTypes = ("image/gif", "image/jpeg", "image/png", "image/svg+xml")
def generateXml(self, layout):
import html
diff --git a/vhosts/svgtest/_config.xml b/vhosts/svgtest/_config.xml
new file mode 100644
index 0000000..e674cac
--- /dev/null
+++ b/vhosts/svgtest/_config.xml
@@ -0,0 +1,12 @@
+
+
+
+ index
+
+
+
+
+
+
+
+
diff --git a/vhosts/svgtest/image.svg b/vhosts/svgtest/image.svg
new file mode 100644
index 0000000..978ea4a
--- /dev/null
+++ b/vhosts/svgtest/image.svg
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+ Amedes
+
+
+ Les Développements Durables
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ?
+
diff --git a/vhosts/svgtest/image.xml b/vhosts/svgtest/image.xml
new file mode 100644
index 0000000..978ea4a
--- /dev/null
+++ b/vhosts/svgtest/image.xml
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+ Amedes
+
+
+ Les Développements Durables
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ?
+
diff --git a/vhosts/svgtest/index.html b/vhosts/svgtest/index.html
new file mode 100644
index 0000000..e994265
--- /dev/null
+++ b/vhosts/svgtest/index.html
@@ -0,0 +1,26 @@
+
+
+
+ Expression SVG Test Suite
+
+
+
+ Expression SVG Test Suite
+ Pre-requisites
+ Package svg2png must be installed for this to work.
+ Unofficial Debian packages are available.
+ You can add deb http://cairographics.org/packages/debian/ unstable/ to your source.list.
+ Tests
+
+ image.svg
+ Only for SVG-enabled web browsers.
+ image.xml
+ Same, but with a different file extension, which makes Expression generate the SVG file as PNG.
+ xhtml_svg.xml
+ XHTML with embedded SVG (SVG-enabled browsers only).
+ xquery_svg.xml
+ An XQuery that generates SVG contents (this will only work with DBXML support, see config-svgtest.xml).
+
+
+
diff --git a/vhosts/svgtest/xhtml_svg.xml b/vhosts/svgtest/xhtml_svg.xml
new file mode 100644
index 0000000..7cb2ba1
--- /dev/null
+++ b/vhosts/svgtest/xhtml_svg.xml
@@ -0,0 +1,20 @@
+
+
+ XHTML with embedded SVG
+
+ XHTML with embedded SVG
+ First, an external SVG image :
+
+ Then, the same, but embedded in this page (does not work in Mozilla nor in Konqueror yet) :
+
+ ?
+
+ That's it.
+
+
diff --git a/vhosts/svgtest/xquery_svg.xml b/vhosts/svgtest/xquery_svg.xml
new file mode 100644
index 0000000..864c20c
--- /dev/null
+++ b/vhosts/svgtest/xquery_svg.xml
@@ -0,0 +1,31 @@
+
+
+
+ This SVG document is the result of a DB XML database query.
+ {
+ for $t at $c in collection("test.dbxml")/*/*/text()
+ return {$t}
+ }
+
+