summaryrefslogtreecommitdiffstats
path: root/klinkstatus/data/styles
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite9ae80694875f869892f13f4fcaf1170a00dea41 (patch)
treeaa2f8d8a217e2d376224c8d46b7397b68d35de2d /klinkstatus/data/styles
downloadtdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.tar.gz
tdewebdev-e9ae80694875f869892f13f4fcaf1170a00dea41.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klinkstatus/data/styles')
-rw-r--r--klinkstatus/data/styles/Makefile.am6
-rw-r--r--klinkstatus/data/styles/results_stylesheet.xsl99
2 files changed, 105 insertions, 0 deletions
diff --git a/klinkstatus/data/styles/Makefile.am b/klinkstatus/data/styles/Makefile.am
new file mode 100644
index 00000000..7f17fbd9
--- /dev/null
+++ b/klinkstatus/data/styles/Makefile.am
@@ -0,0 +1,6 @@
+styles_DATA = \
+ results_stylesheet.xsl
+
+stylesdir = $(kde_datadir)/klinkstatus/styles
+EXTRA_DIST = $(styles_DATA)
+
diff --git a/klinkstatus/data/styles/results_stylesheet.xsl b/klinkstatus/data/styles/results_stylesheet.xsl
new file mode 100644
index 00000000..d0b0c10d
--- /dev/null
+++ b/klinkstatus/data/styles/results_stylesheet.xsl
@@ -0,0 +1,99 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+ <xsl:output method="html" />
+
+ <xsl:template match="/klinkstatus">
+ <html>
+ <body>
+
+ <strong>URL: </strong>
+ <xsl:value-of select="/klinkstatus/url"/>
+ <br/>
+ <strong>Depth: </strong>
+ <xsl:value-of select="/klinkstatus/depth"/>
+ <br/>
+ <strong>Check Parent Folders: </strong>
+ <xsl:value-of select="/klinkstatus/check_parent_folders"/>
+ <br/>
+ <strong>Check external links: </strong>
+ <xsl:value-of select="/klinkstatus/check_external_links"/>
+ <br/>
+ <xsl:if test="/klinkstatus/check_regular_expression[@check = 'true']">
+ <strong>Do not check links matching regular expression: </strong>
+ <xsl:value-of select="/klinkstatus/check_regular_expression"/>
+ <br/>
+ </xsl:if>
+ <br/>
+
+ <table border="1">
+ <thead>
+ <tr>
+ <th>URL</th>
+ <th>Status</th>
+ <th>Label</th>
+ <th>Referrers</th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="/klinkstatus/link_list/link">
+ <tr>
+ <td>
+ <xsl:apply-templates select="url"/>
+ </td>
+ <td>
+ <xsl:apply-templates select="status"/>
+ </td>
+ <td>
+ <xsl:apply-templates select="label"/>
+ </td>
+ <td>
+ <xsl:apply-templates select="referrers"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+
+ <xsl:template match="url">
+ <xsl:variable name="isBroken">
+ <xsl:value-of select="../status/@broken"/>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$isBroken='true'">
+ <span style="color: red;">
+ <xsl:value-of select="."/>
+ </span>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="."/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="status">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="label">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:template>
+
+ <xsl:template match="referrers">
+ <xsl:for-each select="url">
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+ </xsl:template>
+
+
+ <xsl:template match="/klinkstatus/link_list/link/referrers/url">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:template>
+
+</xsl:stylesheet>