Click here to Skip to main content
15,913,854 members
Home / Discussions / XML / XSL
   

XML / XSL

 
QuestionXML as input to a print engine. Pin
mcgahanfl12-Sep-05 5:42
mcgahanfl12-Sep-05 5:42 
QuestionLoad XML without root node Pin
10-Sep-05 21:06
suss10-Sep-05 21:06 
AnswerRe: Load XML without root node Pin
DavidNohejl11-Sep-05 1:28
DavidNohejl11-Sep-05 1:28 
Generalwhy U can't answer this Pin
logicaldna8-Sep-05 19:03
logicaldna8-Sep-05 19:03 
GeneralRe: why U can't answer this Pin
Christian Graus11-Sep-05 17:52
protectorChristian Graus11-Sep-05 17:52 
QuestionXML encryption Pin
Donnie138-Sep-05 10:59
Donnie138-Sep-05 10:59 
AnswerRe: XML encryption Pin
A.A.11-Sep-05 17:35
A.A.11-Sep-05 17:35 
Questionhelp with Xml stylesheets Pin
jjburka7-Sep-05 3:55
jjburka7-Sep-05 3:55 
Good Day,
I'm trying to make a stylesheet that will sum up values and return the sum, this is what I have so far :

<xsl:template name="SumProducts">
<xsl:param name="pNodes" select="/.."/>
<xsl:param name="cNodes" select="/.."/>
<xsl:param name="result" select="0"/>
<xsl:choose>
<xsl:when test="$pNodes">
<xsl:call-template name="SumProducts">
<xsl:with-param name="pNodes"
select="$pNodes[position()!=1]"/>
<xsl:with-param name="cNodes"
select="$cNodes"/>
<xsl:with-param name="result"
select="$result
+ $pNodes[1]/Count * $cNodes[Project=$pNodes[1]/Project]/Cost"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$result"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

The problem I am having is "$pNodes[1]/Count * $cNodes[Project=$pNodes[1]/Project]/Cost" if I remove the second part of the expression (starting with $cNodes) it works (just sums up the project count) However when I try and mult. by the cost the value returned is always NaN. I have a feeling that I am missing something oblivous. Can any one help? below is the xml that goes with the stylesheet

thanks,
james

<NewDataSet>
<Table1>
<Project>Box Maker</Project>
<Count>175</Count>
<AuthorCount>71</AuthorCount>
</Table1>
<Table2>
<Author>Bill Smith</Author>
<Address>blah blah</Address>
<Date>1/20/2002</Date>
</Table2>
<Table3>
<Project>Shopbot-O-Graph</Project>
<Cost>0</Cost>
</Table3>
</NewDataSet>
QuestionCreating Nodes Pin
6-Sep-05 16:53
suss6-Sep-05 16:53 
AnswerRe: Creating Nodes Pin
Christian Graus6-Sep-05 16:57
protectorChristian Graus6-Sep-05 16:57 
GeneralRe: Creating Nodes Pin
Heinz_6-Sep-05 17:13
Heinz_6-Sep-05 17:13 
GeneralRe: Creating Nodes Pin
Christian Graus6-Sep-05 17:27
protectorChristian Graus6-Sep-05 17:27 
GeneralRe: Creating Nodes Pin
Heinz_8-Sep-05 13:43
Heinz_8-Sep-05 13:43 
QuestionHow Many Root Nodes? Pin
Heinz_6-Sep-05 12:30
Heinz_6-Sep-05 12:30 
AnswerRe: How Many Root Nodes? Pin
Christian Graus6-Sep-05 13:12
protectorChristian Graus6-Sep-05 13:12 
GeneralRe: How Many Root Nodes? Pin
LiquidE_SA18-Sep-05 11:21
LiquidE_SA18-Sep-05 11:21 
AnswerRe: How Many Root Nodes? Pin
DavidNohejl18-Sep-05 14:48
DavidNohejl18-Sep-05 14:48 
QuestionIXMLDOMDocument Save Method Pin
Edward Abrahim6-Sep-05 10:30
Edward Abrahim6-Sep-05 10:30 
Questionwhat's xml payload? Pin
HeartFriend3-Sep-05 1:08
HeartFriend3-Sep-05 1:08 
AnswerRe: what's xml payload? Pin
Christian Graus6-Sep-05 13:13
protectorChristian Graus6-Sep-05 13:13 
QuestionHow to Display Data in DataGrid Pin
Chetan Ranpariya2-Sep-05 1:37
Chetan Ranpariya2-Sep-05 1:37 
AnswerRe: How to Display Data in DataGrid Pin
softty2-Sep-05 8:24
softty2-Sep-05 8:24 
GeneralRe: How to Display Data in DataGrid Pin
Chetan Ranpariya2-Sep-05 17:10
Chetan Ranpariya2-Sep-05 17:10 
QuestionXSL data pre-processing Pin
Vitaly Tomilov1-Sep-05 23:42
Vitaly Tomilov1-Sep-05 23:42 
QuestionSVG: Manipulation with text length and size Pin
Adry131-Aug-05 23:54
sussAdry131-Aug-05 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.