]> granicus.if.org Git - apache/commitdiff
- add rel="alternate" attribute
authorAndré Malo <nd@apache.org>
Thu, 29 May 2003 15:49:49 +0000 (15:49 +0000)
committerAndré Malo <nd@apache.org>
Thu, 29 May 2003 15:49:49 +0000 (15:49 +0000)
- use rel and hreflang attribute only if the link points to another language
- add newlines for better diffs (the next will be a huge one ...)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100087 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/style/xsl/common.xsl

index b78ba97e918fa34f51b4b7ada161a0beb74dece8..f36f185bb1c43edd4095a039882fce51d27709fc 100644 (file)
         <xsl:for-each select="$metafile/variants/variant">
         <xsl:sort select="." />
 
-            <a hreflang="{.}"
-                   href="{$path}/{.}{$metafile/path}{$metafile/basename}.html">
+            <a href="{$path}/{.}{$metafile/path}{$metafile/basename}.html">
                 <xsl:if test="$metafile/basename = 'index'">
                     <xsl:attribute name="href">
                         <xsl:value-of
                             select="concat($path, '/', ., $metafile/path)" />
                     </xsl:attribute>
                 </xsl:if>
+                <xsl:if test="$messages/@lang != .">
+                    <xsl:attribute name="hreflang">
+                        <xsl:value-of select="." />
+                    </xsl:attribute>
+                    <xsl:attribute name="rel">alternate</xsl:attribute>
+                </xsl:if>
                 <xsl:attribute name="title">
                     <xsl:choose>
                     <xsl:when test=". != 'fr'"> <!-- no language file avail. -->
                 <xsl:value-of select="." />
                 &nbsp;
             </a>
-            <xsl:if test="position() != last()"> | </xsl:if>
+            <xsl:if test="position() != last()">
+                <xsl:text> |&#xA;</xsl:text>
+            </xsl:if>
         </xsl:for-each>
     </p>&lf;
 </div> <!-- /.{$position}lang -->