[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

Grouping unique nodes using xsl:key and recursive template based on calculating the sum

Asked by sunshine8888 in Extensible Markup Language (XML)

Dear all,

I need to group unique nodes based on the finestclasses using a recursive template. Calculation is involved- I also need to use xsl:param and xsl:key to group the unique nodes. It's not as easy as it sounds..

I need to put the books onto "shelves" so that no finestclass is split across two "shelves" and all finestclasses are assigned to "shelves".

The scenario:
There are 3 bookcases: each bookcase have 6 shelves or rows:
   one small shelf (occupies the top shelf)
   three medium shelves (occupies the next three shelves)
   two large shelves (occupies the last two bottom shelves)

Only small books can go on the top shelves. Small or Medium size books can go on the Medium shelves and any books can go on the two large shelves at the bottom of each bookcase.

large books - 40 units
medium books - 24 units
small books - 15 units

*in total, there are 600 "units" -also known as the size of a shelf
please refer to the <unit> node below

here's the sample xml:
<mybooks>
  <book>
       <author> Brian</author>
       <title>Cracking</title>
       <type>Large</type>
       <finestclasses>Animation</finestclasses>
       <unit>40</unit> //occupies 40 units out of the 600 units in one shelf
   </book>
-  <book>
        <author>Chuck</author>
        <title>Chuck Amuck</title>
        <type>Large</type>
        <finestclasses>Animation</finestclasses>
        <unit>40</unit>
   </book>
   <book>
       <author>Cors</author>
       <title>Cracking</title>
       <type>Large</type>
       <finestclasses>Biography</finestclasses>
       <unit>40</unit>
   </book>
-  <book>
        <author>Bell</author>
        <title>Roosevelt</title>
        <type>Medium</type>
        <finestclasses>Biography</finestclasses>
        <unit>24</unit>
   </book>
<mybooks>

the output should be like this:

  <mybooks>
     <book>
          <finestclass>Animation</finestclass>
          <bookcase>1</bookcase>
          <shelf>5</shelf>
          <totalunit>80</totalunit>  //this is the total of the units of the Animation finestclass
          <type>Large</type>
     </book>
                <book>
          <finestclass>Biography</finestclass>
          <bookcase>1</bookcase>
          <shelf>5</shelf>
          <totalunit>64</totalunit>
          <type>Large</type> //this is the largest type of book under the Biography finestclass
     </book>
  </mybooks>
               
The full xml file can be downloaded at: www.winarm.com/sunshine/mybooks.xml

Thank you in advance!

sunshine
[+][-]02/24/04 10:32 PM, ID: 10448117Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/04 10:44 PM, ID: 10448152Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/04 10:56 PM, ID: 10448194Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/04 11:00 PM, ID: 10448212Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/04 11:06 PM, ID: 10448233Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/04 11:12 PM, ID: 10448253Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/24/04 11:17 PM, ID: 10448270Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/04 11:30 PM, ID: 10448321Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/24/04 11:33 PM, ID: 10448335Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 12:25 AM, ID: 10448525Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/04 12:35 AM, ID: 10448551Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 12:42 AM, ID: 10448586Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/04 12:48 AM, ID: 10448612Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 12:56 AM, ID: 10448656Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 10:47 AM, ID: 10453001Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 11:30 AM, ID: 10453408Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/04 01:53 PM, ID: 10454631Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 03:02 PM, ID: 10455112Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/04 03:13 PM, ID: 10455185Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 05:53 PM, ID: 10456194Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Extensible Markup Language (XML)
Sign Up Now!
Solution Provided By: rdcpro
Participating Experts: 1
Solution Grade: A
 
[+][-]02/25/04 07:09 PM, ID: 10456720Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 07:48 PM, ID: 10456913Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/25/04 07:51 PM, ID: 10456921Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/25/04 07:52 PM, ID: 10456923Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/26/04 08:32 AM, ID: 10461472Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/26/04 03:45 PM, ID: 10465311Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-89