Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL - Group by listing

Status
Not open for further replies.

cbsoft

Programmer
Dec 5, 2000
2
BE
Hi,

I have an ado generated xml file,

- <xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
- <s:Schema id='RowsetSchema'>
+ <s:ElementType name='row' content='eltOnly'>
</s:Schema>
- <rs:data>
<z:row item='Value' attrib1='value1' attrib2='value2'/>
<z:row item='Value' attrib1='value1' attrib2='value2'/>
<z:row item='Value' attrib1='value1' attrib2='value2'/>

...

</rs:data>
</xml>

and i need to generate a report by xsl that gives me an output like the ones in microsoft access where you can create a grouped output.
Like :

item1
subitem1 atrrib1 atrrib2
subitem2 attrib1 attrib2
...
item2
subitem1 atrrib1 atrrib2
subitem2 attrib1 attrib2
...
...


Can somebody please indicate me how to process?
Regards,
Curt.
 
Why don't you group it with sql before outputting the xml using the GROUP BY SQL combination?
It would seem an easier option than to do it with xsl.
You probably going to have to do some scripting to group it I would suggest rather grouping it with sql

If you having trouble or don't know how to use the GROUP BY statement I'd be happy to show you an example.

Have fun
caf

 
The problem is not the group by function.
When I want to output the ADO generated xml, I want a header section and a detail section for every item

ex.:

if the recordset looks like:
item1 subitem1 atrrib1 atrrib2
item1 subitem2 attrib1 attrib2
...
item2 subitem1 atrrib1 atrrib2
item2 subitem2 attrib1 attrib2
...

I would like to have a xsl who generate an output like
item1 -> header section
subitem1 atrrib1 atrrib2 -> detail section
subitem2 attrib1 attrib2
...
item2 -> header section
subitem1 atrrib1 atrrib2 -> detail section
subitem2 attrib1 attrib2

Regards,
Curt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top