xsl-list
[Top] [All Lists]

[xsl] Comparison Table for XML files

2007-06-13 19:11:05
I need to generate a comparison table of several XML data files.

Each data file contains various nodes with "names" and "values". Some
nodes exist on one file and not in others. No one file is guaranteed
to have all possible node "names".

I would like to generate a table (using XSLT) as follows:

The left column will be the "name" - all names from the input files
need to be listed in this column. Each file will have a corresponding
labeled column in the table, and the value of each "name" node will be
placed in the correct spot in the grid. If a particular file does not
have a "name" node for some name, a filler will be inserted ("N/A" or
something) instead of a value. This may not show up, but for example:
    (f1)   (f2)   (f3)
A   NA    2     3
B   1     NA    NA
C   1      2      NA

A real-world example of such a table is a product feature comparison
chart for various products.

It's a very simple concept, but not so simple to implement it seems.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>