Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Sum Returns 0 [Thread Next] Re: Sum Returns 0To: NULL Date: 11/11/2008 9:28:00 AM It worked! Thank you so much! Steph "Martin Honnen" wrote: > Steph wrote: > > > <myFields > > xmlns="http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-10-08T18:17:49">... > > <groupServers> > > <txtNoCPU>5</txtNoCPU> > > The default namespace declaration on the myFields element applies to > descendant elements as well meaning your txtNoCPU elements are in the > namespace > http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-10-08T18:17:49. > So in your XSLT 1.0 stylesheet you need to bind a prefix to that > namespace URI and use that prefix to qualify element names e.g. > > <xsl:stylesheet > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0" > > xmlns:df="http://schemas.microsoft.com/office/infopath/2003/myXSD/2008-10-08T18:17:49"> > > > <xsl:template match="df:myFields"> > <xsl:value-of select="sum(.//df:txtNoCPU)"/> > > > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
