I have an array of elements transformed with a apply-template tag. I would like to insert between 1 and 2 another element, which I can call with a xsl:call instruction. Is this feasible?


Not sure if this does you’re after?

<xsl:template match="your-array/entry">
  <xsl:value-of select="whatever-element"/>
  <xsl:if test="position()=1"><element>This comes only after Element 1</element></xsl:if>

Great, Animaux! That was it, Thanks!

Very good :)

Create an account or sign in 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