I have done research, but I found only solutions when operating on attributes.
I have recently started to study XSL. I would like to use it to transform my xml file into html one. The data that I want to extract should present how many nodes have certain value.
XML has following structure:
<Tests>
<Test>
<TestName> a </TestName>
<Date> 12.11.10 </Date>
<Result> Fail </Result>
</Test>
<Test>
<TestName> b </TestName>
<Date> 13.11.10 </Date>
<Result> Fail </Result>
</Test>
<Test>
<TestName> c </TestName>
<Date> 14.11.10 </Date>
<Result> Pass </Result>
</Test>
</Tests>
what I want as an out is: 2 (number of Fails) 1 (number of Passes)
any could give me a hand with this task ?
Maybe:
<xsl:value-of select="count(Tests/Test[normalize-space(Result)='Fail'])" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With