Do you try to make a total of quantity * price for each shoe item?
You can't do that this way
Using XPath1/XSLT1 sum() only works on nodes, not on sequences... you will need recursive processing for that (I can show you an example if you send a decent example document and the XSLT you already have)
If you are using XSLT2, you need to make sure that also the price is in context
I would make a function fun:line-total() (note you need your own namespace)
fn:sum($Orders/item[type = 'Shoe']/fun:line-total(quantity,price))
if you are just using XPath 2.0 outside the context of XSLT
fn:sum(for $i in $Orders/item[type = 'Shoe'] return $i/quantity * $i/price)

Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa. Here's how to do it.

Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it.
Define Error Message:
Line Numbers:
Type of Error:
Break Down…