I have an xml with the following structure:
<?xml version="1.0" encoding="UTF-16"?>
<Report>
<Category>
<Category Empty="10" Name="T" Type="Filter"></Category>
<Category Empty="30" Name="S" Type="Filter"></Category>
</Category>
<Fase>
<Fase Empty="1" Name="AO" Type="Filter"></Fase>
<Fase Empty="2" Name="VO" Type="Filter"></Fase>
<Fase Empty="3" Name="DO" Type="Filter"></Fase>
<Fase Empty="4" Name="UO" Type="Filter"></Fase>
</Fase>
<Imago>
<Imago Empty="1" Effect="Low risk" Score="1" Type="Quantifier"></Imago>
<Imago Empty="2" Effect="Moderate risk" Score="2" Type="Quantifier"></Imago>
<Imago Empty="3" Effect="High risk" Score="3" Type="Quantifier"></Imago>
<Imago Empty="4" Effect="Extreme risk" Score="4" Type="Quantifier"></Imago>
<Imago Empty="5" Effect="None" Score="0" Type="Quantifier"></Imago>
<Imago Empty="6" Effect="Little chance" Score="-1" Type="Quantifier"></Imago>
<Imago Empty="7" Effect="Moderate chance" Score="-2" Type="Quantifier"></Imago>
<Imago Empty="8" Effect="High chance" Score="-3" Type="Quantifier"></Imago>
<Imago Empty="9" Effect="Extreme chance" Score="-4" Type="Quantifier"></Imago>
</Imago>
<Chance>
<Chance Empty="1" Effect="None" Score="0" Type="Likelihood">
<_max_ Max_="6"></_max_>
</Chance>
<Chance Empty="2" Effect="Less" Score="1" Type="Likelihood">
<_max_ Max_="7"></_max_>
</Chance>
<Chance Empty="3" Effect="Moderate" Score="2" Type="Likelihood">
<_max_ Max_="8"></_max_>
</Chance>
<Chance Empty="4" Effect="Most" Score="3" Type="Likelihood">
<_max_ Max_="6"></_max_>
</Chance>
</Chance>
</Report>
I wan't to transform this to a table like this:
Type|Name|Value
Filter|Category|T
Filter|Category|S
Filter|Category|AO
Filter|Category|VO
Filter|Category|DO
Filter|Category|UO
Quantifier|Category|Low risk
Quantifier|Category|Moderate risk
Quantifier|Category|High risk
Quantifier|Category|Extreme risk
Quantifier|Category|None
Quantifier|Category|Little chance
Quantifier|Category|Moderate change
Quantifier|Category|High chance
Quantifier|Category|Extreme chance
Likelihood|Category|None
Likelihood|Category|Less
Likelihood|Category|Moderate
Likelihood|Category|Most
But the problem is I don't know the names of all the filters and all the quantifiers on forehand.
So I don't know the names of the elements in the xml. I only know they have an attribute Type with a value 'Filter/Quantifier/Likelihood'
I expect that I need to use a XMLXQueryExtractor with this setting:
for $x in /Report
return $x/*/*/@Type
Or something like that
Can someone help me with my workbench?