summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Pokorný <jpokorny@redhat.com>2013-03-19 18:32:44 +0100
committerJan Pokorný <jpokorny@redhat.com>2013-03-19 18:32:44 +0100
commit83540448b7c8f99408194a0c6a9e7f4861e73760 (patch)
tree1416162100b213573df4a8060ca733bac45231fb
parent1f4cad9b54504194566036dc650bbef0e28f00e7 (diff)
downloadontogen-83540448b7c8f99408194a0c6a9e7f4861e73760.tar.gz
ontogen-83540448b7c8f99408194a0c6a9e7f4861e73760.tar.xz
ontogen-83540448b7c8f99408194a0c6a9e7f4861e73760.zip
Treat foaf:mbox link reasonably whether "mailto:" present or not
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
-rw-r--r--ns-schema.xsl5
1 files changed, 4 insertions, 1 deletions
diff --git a/ns-schema.xsl b/ns-schema.xsl
index 8c4fdc4..ecdc5b6 100644
--- a/ns-schema.xsl
+++ b/ns-schema.xsl
@@ -329,8 +329,11 @@
<xsl:when test="starts-with(.//foaf:mbox/@rdf:resource,'mailto:webmaster@kanzaki')">
<a href="/info/disclaimer#webmastermail">See contact information</a>
</xsl:when>
+ <xsl:when test="starts-with(.//foaf:mbox/@rdf:resource,'mailto:')">
+ <a href="{.//foaf:mbox/@rdf:resource}"><xsl:value-of select="substring-after(.//foaf:mbox/@rdf:resource,'mailto:')"/></a>
+ </xsl:when>
<xsl:otherwise>
- <a href="{.//foaf:mbox/@rdf:resource}"><xsl:value-of select=".//foaf:mbox/@rdf:resource"/></a>
+ <a href="mailto:{.//foaf:mbox/@rdf:resource}"><xsl:value-of select=".//foaf:mbox/@rdf:resource"/></a>
</xsl:otherwise>
</xsl:choose>
)