[library-web] xslt: get some mallard ghelp: xrefs right (GNOME bug 655643)
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] xslt: get some mallard ghelp: xrefs right (GNOME bug 655643)
- Date: Sun, 12 Aug 2012 15:43:24 +0000 (UTC)
commit ccb6ab6079c469697656cf3177e3d216d9cb82c8
Author: FrÃdÃric PÃters <fpeters 0d be>
Date: Sun Aug 12 17:42:14 2012 +0200
xslt: get some mallard ghelp: xrefs right (GNOME bug 655643)
data/xslt/mal2html.xsl | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/data/xslt/mal2html.xsl b/data/xslt/mal2html.xsl
index 5da62b1d9..a01264d 100644
--- a/data/xslt/mal2html.xsl
+++ b/data/xslt/mal2html.xsl
@@ -153,4 +153,31 @@ $(document).ready(function () {
</html>
</xsl:template>
+<xsl:template name="mal.link.target.custom">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="action" select="$node/@action"/>
+ <xsl:param name="xref" select="$node/@xref"/>
+ <xsl:param name="href" select="$node/@href"/>
+ <xsl:if test="substring($href, 0, 7) = 'ghelp:'">../../<xsl:choose>
+ <xsl:when test="substring-before(substring-after($href, 'ghelp:'), '?')">
+ <xsl:value-of select="substring-before(substring-after($href, 'ghelp:'), '?')"/>
+ </xsl:when>
+ <xsl:when test="substring-before(substring-after($href, 'ghelp:'), '#')">
+ <xsl:value-of select="substring-before(substring-after($href, 'ghelp:'), '#')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-after($href, 'ghelp:')"/>
+ </xsl:otherwise>
+ </xsl:choose>/stable/<xsl:choose>
+ <xsl:when test="substring-after($href, '?')">
+ <xsl:value-of select="substring-after($href, '?')"/>
+ </xsl:when>
+ <xsl:when test="substring-after($href, '#')">
+ <xsl:value-of select="substring-after($href, '#')"/>
+ </xsl:when>
+ </xsl:choose></xsl:if>
+
+</xsl:template>
+
+
</xsl:stylesheet>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]