Hello i have a question about XSL . I try to select all images in a directory with starts with filename 'img_'. at the moment my code is this:
<div class="flex-container">
<div class="flexslider">
<ul class="slides">
<xsl:for-each select="entry/fields/*[@type = 'image']">
<img>
<xsl:attribute name="src">
<xsl:value-of select="data/@image"/>
</xsl:attribute>
</img>
</li>
</xsl:for-each>
</ul>
</div>
</div>
what i tried is this
<div class="flex-container">
<div class="flexslider">
<ul class="slides">
<xsl:for-each select="entry/fields/*[@type = 'image' contains( ., 'img_' )]">
<li>
<img>
<xsl:attribute name="src">
<xsl:value-of select="data/@image"/>
</xsl:attribute>
</img>
</li>
</xsl:for-each>
</ul>
</div>
</div>
Can anyone help? I hope its the right form to ask here .
Greetings
It seems, you just want to filter those images which are present, without breaking any link. So, you should use java extension to make it happen because XSLT only is not sufficient. Use something like:
I may get further information from http://www.altova.com/list/xsl-list/200906/msg1000300010.html