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

Modified Files:
        2rich.xslt mmxf2rich.xslt 
Log Message:
support for <strong>, also in wiki


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


Index: 2rich.xslt
===================================================================
RCS file: /var/cvs/applications/richtext/config/xslt/2rich.xslt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- 2rich.xslt  22 Apr 2008 14:47:13 -0000      1.5
+++ 2rich.xslt  22 Apr 2008 16:00:49 -0000      1.6
@@ -6,7 +6,7 @@
 
 
   @author:  Michiel Meeuwissen
-  @version: $Id: 2rich.xslt,v 1.5 2008/04/22 14:47:13 michiel Exp $
+  @version: $Id: 2rich.xslt,v 1.6 2008/04/22 16:00:49 michiel Exp $
   @since:   MMBase-1.6
 -->
 <xsl:stylesheet
@@ -23,6 +23,7 @@
 
   <xsl:param name="cloud">mmbase</xsl:param>
   <xsl:param name="org.mmbase.richtext.wiki.show_broken">false</xsl:param>
+  <xsl:param name="org.mmbase.richtext.wiki.undecorateids">false</xsl:param>
 
   <xsl:template match="o:objects">
     <div class="objects">
@@ -85,7 +86,7 @@
 
     <xsl:choose>
       <xsl:when test="count($relatednodes) &gt; 0 or 
$org.mmbase.richtext.wiki.show_broken = 'true'" >
-        <xsl:text>[</xsl:text><xsl:value-of select="@id" />
+        <xsl:text>[</xsl:text><xsl:apply-templates select="." 
mode="undecorateids" />
         <xsl:if test="count(*|text()) &gt; 1 or (count(*|text()) = 1 and 
count(text()) &gt; 0)">
           <xsl:text>:</xsl:text>
           <xsl:apply-templates />
@@ -103,4 +104,19 @@
 </xsl:text>
   </xsl:template>
 
+  <!--
+      Sometimes, ids are autoamticly generated as n[a..z]_<node_number>. 
Remove this prefix, if requested, so wiki-user can see only the number.
+  -->
+  <xsl:template match="*" mode="undecorateids">
+    <xsl:choose>
+      <xsl:when test="$org.mmbase.richtext.wiki.undecorateids = 'true'
+                      and string-length(substring-after(@id, '_')) gt 0" >
+        <xsl:value-of select="substring-after(@id, '_')" />
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="@id" />
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
 </xsl:stylesheet>


Index: mmxf2rich.xslt
===================================================================
RCS file: /var/cvs/applications/richtext/config/xslt/mmxf2rich.xslt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- mmxf2rich.xslt      22 Apr 2008 11:16:59 -0000      1.5
+++ mmxf2rich.xslt      22 Apr 2008 16:00:49 -0000      1.6
@@ -2,7 +2,7 @@
   This translates a mmbase XML field to enriched ASCII
 
   @author: Michiel Meeuwissen
-  @version: $Id: mmxf2rich.xslt,v 1.5 2008/04/22 11:16:59 michiel Exp $
+  @version: $Id: mmxf2rich.xslt,v 1.6 2008/04/22 16:00:49 michiel Exp $
   @since:  MMBase-1.6
 -->
 <xsl:stylesheet
@@ -20,7 +20,7 @@
 
   <xsl:template match = "mmxf:p|mmxf:ul|mmxf:ol|mmxf:table" >
     <xsl:apply-templates select="." mode="rels" />
-    <xsl:apply-templates 
select="mmxf:a|mmxf:em|text()|mmxf:ul|mmxf:ol|mmxf:br" />
+    <xsl:apply-templates 
select="mmxf:a|mmxf:em|mmxf:strong|text()|mmxf:ul|mmxf:ol|mmxf:br" />
     <xsl:text>&#xA;&#xA;</xsl:text>
   </xsl:template>
 
@@ -39,8 +39,11 @@
     <xsl:text>_</xsl:text><xsl:value-of select = "." /><xsl:text>_</xsl:text>
   </xsl:template>
 
+  <xsl:template match="mmxf:strong" >
+    <xsl:text>*</xsl:text><xsl:value-of select = "." /><xsl:text>*</xsl:text>
+  </xsl:template>
+
   <xsl:template match="mmxf:a" >
-    bla bla
     <xsl:apply-templates select="*" />
   </xsl:template>
 
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to