Hello,
I can't get simple addition to work in my xsl file. Here's some of the XML:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<myFields
xmlns="http://schemas.microsoft.com/office/infopat h/2003/myXSD/2008-10-08T18:17:49">...
<groupServers>
<txtNoCPU>5</txtNoCPU>
<txtReqNtwrkBandw>2</txtReqNtwrkBandw>
</groupServers>
<groupServers>
<txtNoCPU>4</txtNoCPU>
<txtReqNtwrkBandw>8</txtReqNtwrkBandw>
</groupServers>
</myFields>
Here's some of the XSL:
<xsl:template match="/ns2:myFields">
<xsl:apply-templates select="//txtNoCPU"/>
<w

><w:r><w:t>
<xsl:text>TOTALS test</xsl:text>
</w:t></w:r></w

>
<w

><w:r> <w:t>
<xsl:text>CPUs </xsl:text>
<xsl:value-of select="sum(//txtNoCPU)"/>
</w:t></w:r></w

>
</xsl:template>
And this is the result of the transform:
TOTALS test
CPUs 0
Instead of 0, I expected 9. I've tried everything I can think of, but I'm
running out of ideas. (At least the groupServers stuff no longer disappears
entirely, and no more NaN)
I started with an Infopath 2003 form, then opened the xml in Word 2003 and
formatted it. Then I used the wml2xslt tool to create the xsl file. The
original Infopath form did the addition I wanted, but it wouldn't come across
to Word. (I tried getting the code from InfoPath and adding it back in with
no luck).
Any ideas? (I'm a beginner...)
Thanks, Steph