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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XSL - Grouping Control Breaks

Status
Not open for further replies.

pfoutz

Programmer
Apr 3, 2002
5
US
I am creating an XMLDocument from a ADO recordset and then merging that with a XSL stylesheet. I have a situation where I would like to group my data and break once the group header changes. I cannot figure out how to do this in XSL.

I want my output to look something like this:

John Doe
cell - (214)222-2222
work - (214)454-4444

Jane Doe
cell - (214)392-2393
work - (214)234-2343

The input recordset would look like this:

Name Phone Type
John Doe (214)222-2222 Cell
John Doe (214)454-4444 work
Jane Doe (214)392-2393 cell
Jane Doe (214)234-2343 work

If anyone knows how to do this, I would appreciate the help!
 
to work, an xsl file needs an xml file as input - sorry if i'm stating the obvious here but you input looks like raw text.

that said, if the input you specified was inside an xml document then it is possible to do what you want but grouping in xsl is not good and should really be done by your DB or script that creates the XML file.
 
The data I showed as input was from my recordset. My program takes that recordset data and converts it to an XML Document. That is working fine. My problem is taking that XML document and then applying a XSL stylesheet that groups the data as I showed in my output. If anyone has been able to group data like this using XSL I would appreciate knowing how.

Thanks Paula
 
It would be really useful if you would post your XML file so we can see the structure. Change the data if you are worried about it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top