Jump to content

XSLT Table question


jazzman_guy

Recommended Posts

I want the XSL to perform the following calculation1. (Question 1/add supplies/equal/yes) answers with only highest numerical number i.e. item number 1 = 4 item number 2 =7 item number 3 = 2with the above answer if the answer is Yes for all items (Total should be 7)which is the Max number for the answers2. (Question 2/add supplies/equal/No) answers should be added individuallyall answer no for resupply i.e. item number 1 =2 item number 2 =5 item number 3 = 7 Answer should be added = 11another way to look at this:Supplies QtyNo 1No 2 Total Order = 3Supplies QtyYes 7Yes 4 Total order = 7I am hoping that this can be done in XSL but cannot find out how this can be done?Sample Code for both xsl and xml would be greatly appreciated

Link to comment
Share on other sites

Huh? I don't get it. XSLT is for transforming one XML into another (most oftenly XHTML). What do you want to transform and where do you have problems?

Link to comment
Share on other sites

Thanks very much for your replyI will try to explain a simplified version of what I am trying to do (limited space here) its actually rather simple I am just not an expert on xsl.First: I am trying to calculate item stock resupplyExample 1: if I say YES to items I want the calculation to only add the highest number in the categoryYES on Item 1 = 5YES on Item 2 = 8YES on Item 3 = 15Answer should be 15 (highest number)NO on Item 1 = 5NO on Item 2 = 8NO on Item 3 = 15Answer should be 28 (all added)Example 2: if I say NO to items I want the calculation to add ALL the items

Link to comment
Share on other sites

I still don't get it. And please, you don't have a limited space to write on. If you have any restrictions, they definetly don't come from the board. If the window you're typing is not enough, it will scroll.Please supply sample XML file(s) you plan to use and desired output code. It's much easier for me to work it out, though I admit the second post makes it slightly more clear. Still, without a data model (XML) to follow, I might not make what you really need.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...