Ich versuche gerade ein Stueck xslt code zu basteln, welcher eine Variable aus dem xml filtert, aber nur dann, wenn eine andere Variable false ist.
1 2 3 4 5 6 7 8 9 | <xmldoc1> <xmldoc2> <xmldoc3> <variable1>#Var1</variable1> <variable2>#Var2</variable2> <variable3>#Var3</variable3> </xmldoc3> </xmldoc2> </xmldoc1> |
<xmldoc1>, <xmldoc2> und <xmldoc3> existieren immer, aber <variable2> existiert nur manchmal. Die Kondition heisst if #Var2==false, dann soll <variable1> rausgefiltert werden. Der Wert von #Var1 und #Var3 ist egal.
Wenn #Var2=true dann
1 2 3 4 5 6 7 8 9 | <xmldoc1> <xmldoc2> <xmldoc3> <variable1>#Var1</variable1> <variable2>#Var2</variable2> <variable3>#Var3</variable3> </xmldoc3> </xmldoc2> </xmldoc1> |
Wenn #Var2=false dann
1 2 3 4 5 6 7 8 | <xmldoc1> <xmldoc2> <xmldoc3> <variable2>#Var2</variable2> <variable3>#Var3</variable3> </xmldoc3> </xmldoc2> </xmldoc1> |
Weiss da jemand weiter?