plugins.xsl: Do not display an origin link if origin does not start with http
authorThomas Vander Stichele <thomas@apestaart.org>
Sat, 1 Apr 2006 11:40:18 +0000 (11:40 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sat, 1 Apr 2006 11:40:18 +0000 (11:40 +0000)
Original commit message from CVS:
* plugins.xsl:
Do not display an origin link if origin does not start with http
See #323798

* plugins.xsl:
Do not display an origin link if origin does not start with http
See #323798

ChangeLog
plugins.xsl

index 2c3b6b8..1f1527d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-04-01  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * plugins.xsl:
+         Do not display an origin link if origin does not start with http
+         See #323798
+
+2006-04-01  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * m4/gst-args.m4:
        * m4/gst-feature.m4:
          add more macros
index 8b71d77..9cf3dc4 100644 (file)
             <xsl:element name="term">origin</xsl:element>
             <xsl:element name="listitem">
               <xsl:element name="simpara">
-                <xsl:element name="ulink">
-                  <xsl:attribute name="url"><xsl:value-of select="origin" /></xsl:attribute>
-                  <xsl:value-of select="origin" />
-                </xsl:element>
+                <!-- only show origin as link if it starts with http -->
+                <xsl:choose>
+                  <xsl:when test="substring(@href, 1, 4) = 'http'">
+                    <xsl:element name="ulink">
+                      <xsl:attribute name="url"><xsl:value-of select="origin" /></xsl:attribute>
+                      <xsl:value-of select="origin" />
+                    </xsl:element>
+                  </xsl:when>
+                  <xsl:otherwise>
+                    <xsl:value-of select="origin" />
+                  </xsl:otherwise>
+                </xsl:choose>
               </xsl:element>
             </xsl:element>
           </xsl:element>