You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2007/09/19 23:30:40 UTC
svn commit: r577451 -
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl
Author: rgardler
Date: Wed Sep 19 14:30:40 2007
New Revision: 577451
URL: http://svn.apache.org/viewvc?rev=577451&view=rev
Log:
Better handling of Knows/Person
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl?rev=577451&r1=577450&r2=577451&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.foaf/resources/stylesheets/foaf-to-document.xsl Wed Sep 19 14:30:40 2007
@@ -108,19 +108,23 @@
<tr>
<td>Mbox</td>
<td>
- <xsl:choose>
- <xsl:when test="starts-with(@rdf:resource, 'mailto:')">
- <link href="{@rdf:resource}">
- <xsl:value-of select="@rdf:resource" />
- </link>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@rdf:resource" />
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:apply-templates select="@rdf:resource"/>
</td>
</tr>
</xsl:template>
+
+ <xsl:template match="@rdf:resource">
+ <xsl:choose>
+ <xsl:when test="starts-with(., 'mailto:')">
+ <link href="{.}">
+ <xsl:value-of select="." />
+ </link>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="." />
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
<!-- FIXME: This is a bit of a hack. Different people use different
ways of capturing project details. We need to refactor this to
@@ -171,9 +175,6 @@
<xsl:for-each select="foaf:Person">
<tr>
<td>
- <xsl:value-of select="./@rdf:ID" />
- </td>
- <td>
<xsl:choose>
<xsl:when test="foaf:name">
<xsl:value-of select="foaf:name" />
@@ -190,11 +191,11 @@
<xsl:when test="foaf:mbox_sha1sum">
<xsl:value-of select="foaf:mbox_sha1sum" />
</xsl:when>
+ <xsl:when test="foaf:mbox">
+ <xsl:apply-templates select="foaf:mbox/@rdf:resource"/>
+ </xsl:when>
<xsl:otherwise>
- <link href="{foaf:mbox/@rdf:resource}">
- <xsl:value-of
- select="foaf:mbox/@rdf:resource" />
- </link>
+ No MBox specified
</xsl:otherwise>
</xsl:choose>
</td>