aboutsummaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-10-18 04:09:09 +0800
committerChristian Persch <chpe@src.gnome.org>2005-10-18 04:09:09 +0800
commitf07a81d93c1aadf9131ff54c4aadfe25607e4a2e (patch)
tree0704cf378a881fa8aa890f4803f54ef16484948a /data
parent74859f3e57ed50dd10f285f178f7e2cecc64e000 (diff)
downloadgsoc2013-epiphany-f07a81d93c1aadf9131ff54c4aadfe25607e4a2e.tar
gsoc2013-epiphany-f07a81d93c1aadf9131ff54c4aadfe25607e4a2e.tar.gz
gsoc2013-epiphany-f07a81d93c1aadf9131ff54c4aadfe25607e4a2e.tar.bz2
gsoc2013-epiphany-f07a81d93c1aadf9131ff54c4aadfe25607e4a2e.tar.lz
gsoc2013-epiphany-f07a81d93c1aadf9131ff54c4aadfe25607e4a2e.tar.xz
gsoc2013-epiphany-f07a81d93c1aadf9131ff54c4aadfe25607e4a2e.tar.zst
gsoc2013-epiphany-f07a81d93c1aadf9131ff54c4aadfe25607e4a2e.zip
A data/ephy-xml2ini.xsl:
2005-10-16 Christian Persch <chpe@cvs.gnome.org> * data/Makefile.am: A data/ephy-xml2ini.xsl: * src/ephy-extensions-manager.c: Remove .xml parsing code and translate the .xml files to the new format with XSLT instead.
Diffstat (limited to 'data')
-rw-r--r--data/Makefile.am4
-rw-r--r--data/ephy-xml2ini.xsl51
2 files changed, 54 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am
index 039aa59a6..e0e798c1a 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -55,7 +55,9 @@ pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = epiphany-1.10.pc
xsldir = $(pkgdatadir)
-xsl_DATA = epiphany-bookmarks-html.xsl
+xsl_DATA = \
+ epiphany-bookmarks-html.xsl \
+ ephy-xml2ini.xsl
install-data-local:
if GCONF_SCHEMAS_INSTALL
diff --git a/data/ephy-xml2ini.xsl b/data/ephy-xml2ini.xsl
new file mode 100644
index 000000000..e9cd6b89a
--- /dev/null
+++ b/data/ephy-xml2ini.xsl
@@ -0,0 +1,51 @@
+<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+
+<xsl:output method="text" indent="no" encoding="UTF-8"/>
+
+<xsl:template match="/extension"># This file has been automatically generated by Epiphany
+
+[Epiphany Extension]
+Version=1
+<xsl:for-each select="/extension/name">
+<xsl:text>Name</xsl:text>
+<xsl:call-template name="printkey"/>
+</xsl:for-each>
+
+<xsl:for-each select="/extension/description">
+<xsl:text>Description</xsl:text>
+<xsl:call-template name="printkey"/>
+</xsl:for-each>
+<xsl:text>Authors=</xsl:text>
+<xsl:for-each select="/extension/author"><xsl:value-of select="."/>;</xsl:for-each>
+URL=<xsl:value-of select="/extension/url"/>
+
+[Loader]
+<xsl:choose>
+<xsl:when test='/extension/loader/@type="shlib"'>Type=shlib
+Library=<xsl:for-each select="/extension/loader/attribute">
+<xsl:if test='@name="library"'><xsl:value-of select="."/></xsl:if>
+</xsl:for-each>
+</xsl:when>
+<xsl:when test='/extension/loader/@type="python"'>Type=python
+Module=<xsl:for-each select="/extension/loader/attribute">
+<xsl:if test='@name="module"'><xsl:value-of select="."/></xsl:if>
+</xsl:for-each>
+</xsl:when>
+</xsl:choose>
+<xsl:text>
+</xsl:text>
+</xsl:template>
+
+<xsl:template name="printkey">
+<xsl:if test="@xml:lang">
+<xsl:text>[</xsl:text>
+<xsl:value-of select="@xml:lang"/>
+<xsl:text>]</xsl:text>
+</xsl:if>
+<xsl:text>=</xsl:text>
+<xsl:value-of select="."/>
+<xsl:text>
+</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>