Update of /var/cvs/applications/richtext/config/xslt
In directory james.mmbase.org:/tmp/cvs-serv28896/config/xslt
Modified Files:
2rich.xslt
Log Message:
support for css classes
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.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- 2rich.xslt 2 Jun 2008 12:54:54 -0000 1.7
+++ 2rich.xslt 3 Jun 2008 12:24:37 -0000 1.8
@@ -6,7 +6,7 @@
@author: Michiel Meeuwissen
- @version: $Id: 2rich.xslt,v 1.7 2008/06/02 12:54:54 michiel Exp $
+ @version: $Id: 2rich.xslt,v 1.8 2008/06/03 12:24:37 michiel Exp $
@since: MMBase-1.6
-->
<xsl:stylesheet
@@ -74,6 +74,7 @@
<!-- also for conveniences: all related nodes to this node-->
<xsl:variable name="related_to_node" select="//o:objects/o:[EMAIL
PROTECTED]/@related]" />
+ <xsl:variable name="class_name"
select="//o:objects/o:object[o:[EMAIL PROTECTED]'id']/text() = $id]/o:[EMAIL
PROTECTED]'class']/text()" />
<!-- There are two type of relations, it is handy to treat them
seperately: -->
<xsl:variable name="srelations" select="//o:objects/o:[EMAIL
PROTECTED]@type='source']/@object and o:[EMAIL PROTECTED]'id'] =
current()/@id]" />
@@ -87,10 +88,13 @@
<xsl:choose>
<xsl:when test="count($relatednodes) > 0 or
$org.mmbase.richtext.wiki.show_broken = 'true'" >
<xsl:text>[</xsl:text><xsl:apply-templates select="."
mode="undecorateids" />
- <xsl:if test="count(*|text()) > 1 or (count(*|text()) = 1 and
count(text()) > 0)">
+ <xsl:if test="count(*|text()) > 1 or string-length($class_name)
> 0 or (count(*|text()) = 1 and count(text()) > 0)">
<xsl:text>:</xsl:text>
<xsl:apply-templates />
</xsl:if>
+ <xsl:if test="string-length($class_name) > 0">
+ <xsl:text>:</xsl:text><xsl:value-of select="$class_name" />
+ </xsl:if>
<xsl:text>]</xsl:text>
</xsl:when>
<xsl:otherwise>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs