XSLT recursion with signals

Leo Kirch

Usenet Archive
Joined
Oct 27, 2003
Messages
1
Reaction score
0
Hello XSLT gurus,

i've got a rather difficult problem. Some explanations first. theres a signal oriented xml-file - the graphical represantation looks like:

| startsignal (signal00)
\ /
| top | _________
part01 | | / \__
| down |____/ \_______________
| top |______
part02 | | \
| down | \________________________
| top | ______________________
part03 | | _____/
| down |________/

all parts have got two states (top,down) with different values to change between the states:

part01: 2 ticks up, 4 ticks down, starting position down part02: 5 ticks up, 2 ticks down, starting position top part03: 7 ticks up, 3 ticks down, starting position down

lets assume the startsignal's name is "signal00"

part01 requires signal00 and generates signal01
part02 requires signal01 and generates signal02
part03 requires signal02 and generates signal03
part01 requires signal03 and generates signal04

the xml representation could be

<project starttime="0" startsignal="signal00">
<element name="part01">
<positions>
<position name="top" duration="2" starting="false" />
<position name="down" duration="4" starting="true" />
</positions>
<signals>
<signal gen="signal01">
<and req="signal00" />
</signal>
<signal gen="signal04">
<and req="signal03" />
</signal>
</signals>
</element>

<element name="part02">
<positions>
<position name="top" duration="5" starting="true" />
<position name="down" duration="2" starting="false" />
</positions>
<signals>
<signal gen="signal02">
<and req="signal01" />
</signal>
</signals>
</element>

<element name="part03">
<positions>
<position name="top" duration="7" starting="false" />
<position name="down" duration="3" starting="true" />
</positions>
<signals>
<signal gen="signal03">
<and req="signal02" />
</signal>
</signals>
</element>
</project>

still reading that veeery long post? :) thanks! now assume you want to transform that signal oriented xml-file into a timetick oriented one:

part01: (0,0) (2,1) (11,1) (15,0)
part02: (0,1) (2,1) (4,0)
part03: (0,0) (4,0) (11,1)

tricky, eh? i wan't post the corresponding java-code here (due to size) but will make it available on request at no time.

thanks for playing with that problem

yours
sebastian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,224
Members
248,132
Latest member
henrywalsh

Latest Threads

Top