1 May 2009
String Operations

New#1: Problem with showing the text

I’ve tried all of the solutions, but with no result, nothing is showed when I use the mode="truncate".

This is my XML:

    <events />
        <section id="5" handle="blog">Blog</section>
        <entry id="19">
            <afbeelding-weergeven path="/uploads/pictures/blog">
                <item size="45 KB">ist2_10886447-racing-bicycle-isolated-on-white.jpg</item>
            <introtekst>Tincidunt varius sequi, integer magna ac, donec curabitur. Rhoncus sed. Lectus vitae augue, mauris tincidunt. Ut nec fermentum, dolor vestibulum. Nunc neque tincidunt, non dictumst tempus. Et id, duis sit arcu, felis porta donec. Proin tincidunt. Tincidunt varius sequi, integer magna ac, donec curabitur. Rhoncus sed. Lectus vitae augue, mauris tincidunt.</introtekst>
            <titel handle="wat-zullen-we-eens-bloggen">Wat zullen we eens bloggen?</titel>

And this is my XSLT:

<xsl:template match="data">
        <h3><xsl:value-of select="blog-home/entry/titel"/></h3>
        <p><xsl:apply-templates select="blog-home/entry/introtekst" mode="truncate" /></p>

The XSLT above is the one inside my home.xsl.
I’ve include inside my home.xsl the master.xsl and inside the master I include truncate.xsl.

with issues like this, always try starting your xpath from the data node


(Can’t edit comment)

Also try


Have you changed the match attribute of the template from body to introtekst?

I know it’s mentioned in the other post, but just checking.

So far we haven’t resolved if it’s really an issue with the utility (it might be, as the first template matches a node called body) so posting your problem to the issue tracker might not be the right way to solve it (additionally, nobody will notice the discussion as the issue tracker is still missing a notification feature).

I suggest opening a regular thread on the forum where we can discuss your problem.

I suggest that my discussion will continue inside the first post I’ve placed, because I’ve started that post.

This template assumes that your content is inside a node called "body"

Aside from major changes to the template, you need to change the first template line from

<xsl:template match="body" mode="truncate">


<xsl:template match="your-content-name-here" mode="truncate">

Please login to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details