T
thijs.kupers
hy,
I don't have so much experience with xslt, so i've got a question about
it.
I've got a xml-document with the following structure:
<Block>
<Block>
<State name="1">...</State>
<State name="2">...</State>
<Block>
<State name="3">...</State>
</Block>
<Trans name="a"/>
<Trans name="b"/>
</Block>
<Trans name="c"/>
</Block>
A 'state' (and 'Trans') can be a child of a 'block' and a 'block' can
be a child of another 'block'. What I as output want is the same as the
input, with the difference that every 'State' has all the 'Trans' items
from the parents (so State 3 gets trans a, b and c. State 2 gets only
state c)
for example:
<Block name="b1">
<Block name="b2">
<State name="1">...
<Trans name="c" blockFrom="b1"/>
</State>
<State name="2">...
<Trans name="c" blockFrom="b1"/>
</State>
<Block name="b3">
<State name="3">...
<Trans name="a" blockFrom="b2"/>
<Trans name="b" blockFrom="b2"/>
<Trans name="c" blockFrom="b1"/>
</State>
</Block>
<Trans name="a"/>
<Trans name="b"/>
</Block>
<Trans name="c"/>
</Block>
I hope, someone can help me
Regards,
Thijs
I don't have so much experience with xslt, so i've got a question about
it.
I've got a xml-document with the following structure:
<Block>
<Block>
<State name="1">...</State>
<State name="2">...</State>
<Block>
<State name="3">...</State>
</Block>
<Trans name="a"/>
<Trans name="b"/>
</Block>
<Trans name="c"/>
</Block>
A 'state' (and 'Trans') can be a child of a 'block' and a 'block' can
be a child of another 'block'. What I as output want is the same as the
input, with the difference that every 'State' has all the 'Trans' items
from the parents (so State 3 gets trans a, b and c. State 2 gets only
state c)
for example:
<Block name="b1">
<Block name="b2">
<State name="1">...
<Trans name="c" blockFrom="b1"/>
</State>
<State name="2">...
<Trans name="c" blockFrom="b1"/>
</State>
<Block name="b3">
<State name="3">...
<Trans name="a" blockFrom="b2"/>
<Trans name="b" blockFrom="b2"/>
<Trans name="c" blockFrom="b1"/>
</State>
</Block>
<Trans name="a"/>
<Trans name="b"/>
</Block>
<Trans name="c"/>
</Block>
I hope, someone can help me
Regards,
Thijs