Commits

shl...@52c325ad-5fd0-0310-8a0f-c43feede02cc  committed 2e88b41

Got the XSLT to work.

  • Participants
  • Parent commits 847f19f

Comments (0)

Files changed (1)

File XML-Grammar-Fortune/module/extradata/fortune-xml-to-html.xslt

+<?xml version="1.0" encoding="utf-8" ?>
 <xsl:stylesheet version = '1.0'
-     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
+    
      >
 
 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"
  doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
  />
 
-<xsl:template match="/">
+<xsl:template match="/collection">
     <html>
         <head><title>Fortunes</title></head>
         <body>
 </xsl:template>
 
 <xsl:template match="body">
-    <xsl:apply-template select="saying|me_is|joins|leaves" />
+    <xsl:apply-templates select="saying|me_is|joins|leaves" />
 </xsl:template>
 
 <xsl:template match="saying|me_is|joins|leaves">
                     <xsl:text>* </xsl:text>
                 </xsl:when>
                 <xsl:when test="name(.) = 'joins'">
-                    <xsl:text>&larr;</xsl:text>
+                    <xsl:text></xsl:text>
                 </xsl:when>
                 <xsl:when test="name(.) = 'leaves'">
-                    <xsl:text>&rarr;</xsl:text>
+                    <xsl:text></xsl:text>
                 </xsl:when>
             </xsl:choose> 
-            <xsl:value-of "@who" />
+            <xsl:value-of select="@who" />
         </td>        
         <td class="text">
-            <xsl:value-of "." />
+            <xsl:value-of select="." />
         </td>
     </tr>
 </xsl:template>