Hello,
How I can transform a xml like this:
<xml>
<paragraph>
<data>
<label> title </label>
</data>
<data>
<label> subtitle </label>
</data>
<data>
<label> text </label>
</data>
<data>
<label> image </label>
</data>
</paragraph>
</xml>
In the following xml (image before the text):
<xml>
<paragraph>
<data>
<label> title </label>
</data>
<data>
<label> subtitle </label>
</data>
<data>
<label> image </label>
</data>
<data>
<label> text </label>
</data>
</paragraph>
</xml>
I really need to call the template of the images rather than the text if next node is an image. (The xml source is messy in that field)
Then I copy some code I'm using xslt:
<xsl:when test="etiqueta = 'Imagen'">
<xsl:call-template name="imprimeImagenParrafo">
<xsl:with-param name="etiqueta" select="etiqueta"></xsl:with-param>
<xsl:with-param name="valor" select="valor"></xsl:with-param>
<xsl:with-param name="longitud" select="longitud"></xsl:with-param>
<xsl:with-param name="comentario" select="comentario"></xsl:with-param>
<xsl:with-param name="enlace" select="enlace"></xsl:with-param>
<xsl:with-param name="target_enlace" select="target_enlace"></xsl:with-param>
</xsl:call-template>
</xsl:when>
</xsl:when>