[rs-commit] r85 - in /rs-manual/trunk: ./ src/main/modules.xsl

rs-commit at redwax.eu rs-commit at redwax.eu
Thu Oct 10 13:35:22 CEST 2019


Author: Martin van den Bemt
Date: Thu Oct 10 13:34:21 2019
New Revision: 85

Log:
Use meta tag for description
- Set output to html instead of xml
- value-of instead of copy-of

Modified:
    rs-manual/trunk/   (props changed)
    rs-manual/trunk/src/main/modules.xsl

Modified: rs-manual/trunk/src/main/modules.xsl
==============================================================================
--- rs-manual/trunk/src/main/modules.xsl	(original)
+++ rs-manual/trunk/src/main/modules.xsl	Thu Oct 10 13:34:21 2019
@@ -4,7 +4,7 @@
    xmlns="http://www.w3.org/1999/xhtml"
     xmlns:html="http://www.w3.org/1999/xhtml" exclude-result-prefixes="html">
 
-  <xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
+  <xsl:output method="html" omit-xml-declaration="no" indent="yes"/>
 
   <xsl:template match="node()">
     <xsl:copy>
@@ -30,8 +30,8 @@
       <xsl:if test=".[@type=$modtype]">
         <xsl:variable name="file" select="./text()"/>
         <xsl:variable name="doc" select="concat('../site/xhtml5/mod/',$file, '.xhtml5')"/>
-        <xsl:variable name="description" select="document($doc)/html:html/html:head/html:title/text()"/>
-        <dt><a href="mod/{$file}.html"><xsl:copy-of select="$file"/></a></dt><dd><p><xsl:copy-of select="$description"/></p></dd>
+        <xsl:variable name="description" select="document($doc)/html:html/html:head/html:meta[@name='description']/@content"/>
+        <dt><a href="mod/{$file}.html"><xsl:copy-of select="$file"/></a></dt><dd><p><xsl:value-of select="$description"/></p></dd>
       </xsl:if>
     </xsl:for-each>
   </xsl:template>



More information about the rs-commit mailing list