D
Damien
I have seen examples of selecting distinct elements by name, but my
issue is that I need to get distinct attributes by name. My XML looks
like:
<root>
<file>
<rows>
<row att1="1" />
<row att2="2" />
<row att1="1" att2="2" />
</rows>
</file>
<file>
<rows>
<row att3="1" />
<row />
<row att4="2" />
</rows>
</file>
</root>
For each file element, I want to return a distinct list of attribute
names. I'm trying to create an HTML table based on this data in an
XSL. For example:
+-------+--------+
| attr1 | attr 2 |
+-------+--------+
| 1 | N/A |
+-------+--------+
| N/A | 2 |
+-------+--------+
| 1 | 2 |
+-------+--------+
+-------+--------+
| attr3 | attr 4 |
+-------+--------+
| 1 | N/A |
+-------+--------+
| N/A | N/A |
+-------+--------+
| N/A | 2 |
+-------+--------+
I'm sure the Muenchian Technique is the thing to use (utilizing a
custom @use clause on the <xsl:key> to "group by" the file element),
but I can't seem to get it to work correctly for the attributes.
Thanks in advance for your help.
-Damien
issue is that I need to get distinct attributes by name. My XML looks
like:
<root>
<file>
<rows>
<row att1="1" />
<row att2="2" />
<row att1="1" att2="2" />
</rows>
</file>
<file>
<rows>
<row att3="1" />
<row />
<row att4="2" />
</rows>
</file>
</root>
For each file element, I want to return a distinct list of attribute
names. I'm trying to create an HTML table based on this data in an
XSL. For example:
+-------+--------+
| attr1 | attr 2 |
+-------+--------+
| 1 | N/A |
+-------+--------+
| N/A | 2 |
+-------+--------+
| 1 | 2 |
+-------+--------+
+-------+--------+
| attr3 | attr 4 |
+-------+--------+
| 1 | N/A |
+-------+--------+
| N/A | N/A |
+-------+--------+
| N/A | 2 |
+-------+--------+
I'm sure the Muenchian Technique is the thing to use (utilizing a
custom @use clause on the <xsl:key> to "group by" the file element),
but I can't seem to get it to work correctly for the attributes.
Thanks in advance for your help.
-Damien