This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
using xsl:key
- To: xsl-list at mulberrytech dot com
- Subject: using xsl:key
- From: "Peter Foley" <peter dot foley at abs dot gov dot au>
- Date: Tue, 29 Feb 2000 10:40:50 +1100
- Reply-To: xsl-list at mulberrytech dot com
I hope you can help with a tricky problem.
I have a table format e.g.
<Table>
<Heading>
<Column>
Male
</Column>
<Column>
Female
</Column>
</Heading>
<Rows>
<Row>
<Cell>
Employed
</Cell>
<Cell>
1-1
</Cell>
<Cell>
1-2
</Cell>
</Row>
<Row>
<Cell>
Not Employed
</Cell>
<Cell>
2-1
</Cell>
<Cell>
2-2
</Cell>
</Row>
</Rows>
<Cells>
<Data id="1-1">
10
</Data>
<Data id="1-2">
20
</Data>
<Data id="2-1">
30
</Data>
<Data id="2-2">
40
</Data>
</Cells>
</Table>
As you can see the id of the Data tag identifies the cell the data is put in. I
key the data tags on @id so that when I process the Row/Cell I can retrieve the
cell value. This works great BUT now the user wants to aggregate 2 or more
tables. This means that there are now 2 or more Data tags with the same id.
What does this do to Key? Can I say sum (Key("data", value))?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list