This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Dynamic Table Generation
- To: <XSL-List at mulberrytech dot com>
- Subject: Dynamic Table Generation
- From: nigel dot byrnes at philips dot com
- Date: Tue, 7 Mar 2000 12:03:52 +0100
- Reply-To: xsl-list at mulberrytech dot com
Hi all
I have a xsl-teccy question for you all. I have a couple of ideas on how it could be solved but I don't know how to express it in XSL. Perhaps you might have some ideas on how I should tackle the problem.
context:
I have a XML document that describes information about services including the content-types each that each service may utilise.
problem:
I have to produce a table that captures the content-type that each service uses. With service-name on the y-axis of the table, the tricky part (to me) is that each content-type is to have it's own column (with content-type name as the column header on
the x-axis). Then I have to put a cross in the appropriate table cell indicating that the content-type(s) a service may use.
candidate solution 1:
One way I thought of doing it was to make to a pass over the XML document to generate a list of content-types. On the second pass over the document I can then build the table. Trouble is XSLT doesn't provide an equivalent to Java's Vector container
object to store the content-types....
candidate solution 2:
The other way could be to
read in each content-type associated with a service
compare this content-type against each content-type column-header in the table. If the content-type was not matched against any of the existing column-headers, then we need to add a new column for this new content-type.
Place a cross in the appropriate table-cell.
while I am not sure in sol'n 2 is the best way to go about it, can anyone give me feedback on how they would do it and also point me in the right direction regarding what XSLT is required.
Thanks in advance
Nigel
Nigel Byrnes, Philips Research
Cross Oak Lane, Redhill. Surrey, RH1 5HA
Voice: +44 (0) 1293 815578
Fax: +44 (0) 1293 815500
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list