Question

I have this template

<xsl:when test="@width &gt; 500">
    <a href="{@path}"><xsl:value-of select="@path"/></a>
    <br/>
</xsl:when>

What I need to do is that when some xml image element has its width attribute larger then 500, I will not write element and display it but I just write simple link to which user can click and view that image instead.

I am getting this error:

The element type "xsl:when" must be terminated by the 
matching end-tag "</xsl:when>".

And VM totally crashes after this.

However when I delete that closing tag, it says that it needs that one, so I can not go without closing "a" element but it fails to render it.

Is there some workaround?

Was it helpful?

Solution

So the problem was that I can not use that br tag which closes itself in connection with xsl:when ... totally stupid I would say.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top