S
S
Sebastian Pereira2013-12-16 15:34:47
Arrays
Sebastian Pereira, 2013-12-16 15:34:47

Outputting the first non-null value from an xslt array?

Hello. I have a set of values

"<xsl:value-of select="$item//property[@name='название_свойства']/value" />"
"<xsl:value-of select="$item//property[@name='название_свойства2']/value" />"
....
"<xsl:value-of select="$item//property[@name='название_свойства15']/value" />"

I need to display the first non-zero value from this array. Tell me how to do it?
If it is possible that by means of the xsl.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sebastian Pereira, 2013-12-17
@uJlJluduAH

Here is the solution

<xsl:apply-templates select="($item//property[@name='bla17']/value |  $item//property[@name='cena2']/value | $item//property[@name='bla']/value)[not (. = 0)][1]" />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question