I have this XML file and I want to create an XSL file to convert it to Excel. Each row should represent a logo. The columns will be the key attributes like color, id, descriptio
You were very close. Try to be more specific when it comes to template matching - don't say template match"/*/*/*"
when you can say template match="field"
.
Other than that, this is your approach, only slightly modified:
|
Your "repeating column names" problem roots in this expression:
In your context, this selects any third level element in the document (literally all
nodes in all
s), and makes a header row out of them. I replaced it with
which makes a header row out of the first
only.
If a certain column order is required (other than document order) or not all
nodes are in the same order for all
s, things get more complex. Tell me if you need that.