I’m using bom2groupedCsv.xsl in EESchema from KiCad 4. This groups components by reference and value, which are part of the exported static table. But I would also like to group on fields in the dynamic table (children of the <fields> node). The exported XML looks like:
I’m out of my depth with XSL. Can anyone tell me please how I should modify bom2groupedCsv.xsl so it also groups on the value(s) of the dynamic table fields, eg “X7R 25V” from <field name="Type">X7R 25V</field>?
Yes, KiCad 4, because it’s an ongoing project. The XSL script I’m using does what it was written to do so it doesn’t require updating by the original author. However, I was hoping for a simple tweak without giving myself a whole new pile of problems to deal with. I’m no more familiar with Python than I am with XSLT.
I eventually figured it out on my own, and as I suspected the answer is very simple. All that is needed is to change instances of: concat(footprint, '-', value)
to: concat(footprint, '-', value, '-', field[@name='Type'])
‘Type’ being the custom field name I defined in the Template Field Names that define the dynamic table in the EEschema options, and ‘field’ and ‘name’ being the name and attribute name of the XML node I wanted added to the group definition.