Subject:Ignore Duplicate Author:Brian Clements Date:04 Apr 2006 12:41 AM
I am currently trying to create a table of date which will display in an HTML page. It contains 4 columns. As rows are added I would like to display a blank table cell for information duplicated from previous row. I have included my XML Document, XSLT Stylesheet, current results, and result I am looking for.
I would appreciate any help you could give me!
Brian
Here is the XML Document:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="ignoredup.xslt"?>
<results>
<details>
<detail>
<ACDealerID>111111</ACDealerID>
<DealershipName>Dealership 1</DealershipName>
<Status>Pending</Status>
<Comments>This is a test</Comments>
</detail>
<detail>
<ACDealerID>111111</ACDealerID>
<DealershipName>Dealership 1</DealershipName>
<Status>Pending</Status>
<Comments>This is a test 2</Comments>
</detail>
<detail>
<ACDealerID>222222</ACDealerID>
<DealershipName>Dealership 2</DealershipName>
<Status>Pending</Status>
<Comments>This is a test</Comments>
</detail>
<detail>
<ACDealerID>222222</ACDealerID>
<DealershipName>Dealership 2</DealershipName>
<Status>Pending</Status><Subject></Subject>
<Comments>This is a test2</Comments>
</detail>
<detail>
<ACDealerID>222222</ACDealerID>
<DealershipName>Dealership 2</DealershipName>
<Status>Opened</Status>
<Comments>This is a test</Comments>
</detail>
</details>
</results>
Here are my current results: (I typed in instead of displaying actual html)
AC Dealer ID Dealership Name Status Comments
------------ --------------- ------- -----------------
111111 Dealership 1 Pending This is a test
111111 Dealership 1 Pending This is a test 2
222222 Dealership 2 Pending This is a test
222222 Dealership 2 Pending This is a test 2
222222 Dealership 2 Opened This is a test 3
Here is the result I am looking for: (I typed in instead of displaying actual html)
AC Dealer ID Dealership Name Status Comments
------------ --------------- ------- -----------------
111111 Dealership 1 Pending This is a test
This is a test 2
222222 Dealership 2 Pending This is a test
This is a test 2
Opened This is a test 3
Subject:Ignore Duplicate Author:Brian Clements Date:04 Apr 2006 11:33 AM
This solution reduced the number of rows returned from 5 to 2. For my situation this will not work. I need it to return 5 rows of data. Basically, we need to display an empty column for each duplicate entry. For instance, the first 2 rows are for AC Dealer ID 111111. We need to display 2 rows. The first row will have all the columns filled out. The second row will display with a blank in all the columns which match the previous row. So the second row should contain each element AC Dealer ID, Dealership Name, and Status as blanks and the Comments should have a value.