Update of /var/cvs/config/xslt
In directory james.mmbase.org:/tmp/cvs-serv9966

Modified Files:
        docbook2block.xslt 
Log Message:
some more support of docbook tags we use in documentation


See also: http://cvs.mmbase.org/viewcvs/config/xslt


Index: docbook2block.xslt
===================================================================
RCS file: /var/cvs/config/xslt/docbook2block.xslt,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- docbook2block.xslt  15 Oct 2008 14:47:40 -0000      1.2
+++ docbook2block.xslt  13 Jan 2009 21:30:49 -0000      1.3
@@ -19,7 +19,7 @@
   Could perhaps use nwalsh xslt but that seems a huge overkill. It should be 
rather simple, we probably use only a small subset of docbook.
 
   @author:  Michiel Meeuwissen
-  @version: $Id: docbook2block.xslt,v 1.2 2008/10/15 14:47:40 michiel Exp $
+  @version: $Id: docbook2block.xslt,v 1.3 2009/01/13 21:30:49 michiel Exp $
   @since:   MMBase-1.9
 -->
 <xsl:stylesheet
@@ -36,9 +36,10 @@
               omit-xml-declaration="yes" /> <!-- xhtml is a form of xml -->
 
   <xsl:template match="article">
-    <div class="mm_c" >
+    <div class="mm_docbook" >
       <h1><xsl:value-of select="articleinfo/title" /></h1>
       <xsl:for-each select="articleinfo/authorgroup/author">
+        <div class="name">
         <span class="surname">
           <xsl:value-of select="surname" />
         </span>
@@ -46,6 +47,7 @@
           <xsl:text> </xsl:text>
           <xsl:value-of select="firstname" />
         </span>
+        </div>
       </xsl:for-each>
       <xsl:apply-templates select="section" />
     </div>
@@ -94,10 +96,82 @@
       <xsl:apply-templates select="*" />
     </ul>
   </xsl:template>
+
+  <xsl:template match="orderedlist">
+    <ol>
+      <xsl:apply-templates select="*" />
+    </ol>
+  </xsl:template>
+
   <xsl:template match="listitem">
     <li>
       <xsl:apply-templates select="*" />
     </li>
   </xsl:template>
 
+  <xsl:template match="glosslist">
+    <dl class="glossary">
+      <xsl:apply-templates select="*" />
+    </dl>
+  </xsl:template>
+
+  <xsl:template match="glosslist">
+    <dl>
+      <xsl:apply-templates select="*" />
+    </dl>
+  </xsl:template>
+
+
+  <xsl:template match="glossentry">
+    <di>
+      <xsl:copy-of select="@*" />
+      <xsl:apply-templates select="*" />
+    </di>
+  </xsl:template>
+
+  <xsl:template match="glossterm">
+    <dt>
+      <xsl:apply-templates select="*|text()" />
+    </dt>
+  </xsl:template>
+
+  <xsl:template match="glossdef">
+    <dd>
+      <xsl:apply-templates select="*|text()" />
+    </dd>
+  </xsl:template>
+
+  <xsl:template match="glossseealso">
+    <p class="seealso">
+      <xsl:text>See also </xsl:text>
+      <xsl:choose>
+        <xsl:when test="@otherterm">
+          <a>
+            <xsl:attribute name="href">#<xsl:value-of select="@otherterm" 
/></xsl:attribute>
+            <xsl:for-each select="id(@otherterm)">
+              <xsl:value-of select="glossterm" />
+            </xsl:for-each>
+          </a>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates select="*|text()" />
+        </xsl:otherwise>
+      </xsl:choose>
+    </p>
+  </xsl:template>
+
+  <xsl:template match="ulink">
+    <a>
+      <xsl:attribute name="href"><xsl:value-of select="@url" /></xsl:attribute>
+      <xsl:apply-templates select="*|text()" />
+    </a>
+  </xsl:template>
+
+  <xsl:template match="graphic">
+    <img>
+      <!-- TODO -->
+      <xsl:attribute 
name="src">"http://cvs.mmbase.org/viewcvs/*checkout*/<xsl:value-of 
select="@fileref" /></xsl:attribute>
+    </img>
+  </xsl:template>
+
 </xsl:stylesheet>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to