diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-10-18 04:09:09 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-10-18 04:09:09 +0800 |
commit | f07a81d93c1aadf9131ff54c4aadfe25607e4a2e (patch) | |
tree | 0704cf378a881fa8aa890f4803f54ef16484948a /data/ephy-xml2ini.xsl | |
parent | 74859f3e57ed50dd10f285f178f7e2cecc64e000 (diff) | |
download | gsoc2013-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/ephy-xml2ini.xsl')
-rw-r--r-- | data/ephy-xml2ini.xsl | 51 |
1 files changed, 51 insertions, 0 deletions
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> |