473,471 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

copy-of, sort and preceding-sibling help

3 New Member
i'm trying to perform the following steps:

- given the following XML sample

<things>
<thing>
<name>something</name>
<type>abc</type>
<rate>10.00</rate>
</thing>
<thing>
<name>anything</name>
<type>def</type>
<rate>2.00</rate>
</thing>
<thing>
<name>nothing</name>
<type>zyx</type>
<rate>50.00</rate>
</thing>
<thing>
<name>everything</name>
<type>abc</type>
<rate>100.00</rate>
</thing>
</things>

i want to
- sort it by type and then by name
- pass it to a snippet of XSL for processing
- within that snippet, create a table from the results (where the results are grouped by type and the type only appears once at the start of each group), so the output would look like the following:

Things
--------------------------------------------
type: abc | |
--------------------------------------------
name | rate |
everything | 100.00 |
something | 10.00 |
---------------------------------------------

--------------------------------------------
type: def | |
--------------------------------------------
name | rate |
anything | 2.00 |
---------------------------------------------

--------------------------------------------
type: zyx | |
--------------------------------------------
name | rate |
nothing | 50.00 |
---------------------------------------------

how would i go about doing this? i've tried using a sorted copy-of that is sent to the XSL snippet for processing, but the results aren't coming out formatted...also, i've been trying to use preceding-sibling on the sorted list to figure out if i've seen a group header before and not display it if i have (i'm also not using the muenchian (sp?) method, as it is a small dataset), but now i'm thoroughly stuck...help!


p.s.: forgive the sloppiness of the table LOL
Feb 16 '07 #1
3 1353
shinma
3 New Member
*bump*

can't anyone help me with this?!?
Feb 21 '07 #2
shinma
3 New Member
*bump*

can anyone give me a hand with this?
Feb 27 '07 #3
dorinbogdan
839 Recognized Expert Contributor
Hi,
Did you succeed to solve the problem ?
If yes, please let me know, in order to close the thread.
Thanks,
Dorin.
Mar 21 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: A | last post by:
Hi, A default copy constructor is created for you when you don't specify one yourself. In such case, the default copy constructor will simply do a bitwise copy for primitives (including...
8
by: Joe Cipale | last post by:
I have a class defined as follows: public: char Date; char weight; char Workout; char Event; TDaily* nxt_Daily; I have defined my constructor/copy methods as shown:
8
by: trying_to_learn | last post by:
Why do we need to explicitly call the copy constructor and the operator = , for base class and member objects in composition? ....book says "You must explicitly call the GameBoard copy-constructor...
7
by: Kelly Mandrake | last post by:
I've implemented a class with operator+ overloaded and I also provided my own copy constructor; The problem is my copy constructor is being called twise and I dont understand why. I believe the...
0
by: Joshua Ginsberg | last post by:
Howdy -- I have a class that has an attribute that is a dictionary that contains an object that has a kword argument that is a lambda. Confused yet? Simplified example: import copy class...
8
by: rKrishna | last post by:
I was trying to understand the real need for copy constructors. From literature, the main reason for redfinition of copy constructor in a program is to allow deep copying; meaning ability to make...
26
by: saxenavaibhav17 | last post by:
what is Deep Copy, Shallow copy and Bitwise copy, Memberwise copy? and what is the difference between them? pls help vaibhav
7
by: vermarajeev | last post by:
Hi guys, I know what a copy constructor and an assignment operator is. I have read that in a copy constructor, deep copy () happens and in assignment operator shallow copy happens. My question...
7
by: Jeffrey Barish | last post by:
(Pdb) myclass MyClass( 0, 0, 'A string', 123.45) (Pdb) copy.copy(myclass) *** TypeError: TypeError('__new__() takes at least 4 arguments (2 given)',) I see 4 arguments (actually, 5 because...
34
by: =?ISO-8859-1?Q?Marcel_M=FCller?= | last post by:
Hi, is there a way to avoid the automatic copy constructor generation. I do not want the object to be non-copyable. I simply do not want that copying is done by the default copy constructor. But...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.