By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,678 Members | 1,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,678 IT Pros & Developers. It's quick & easy.

XSLT recursion with signals

P: n/a
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
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I would be glad to help, however, I cannot understand anything from your
description.
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
"Leo Kirch" <oc********@hotmail.com> wrote in message
news:d7**************************@posting.google.c om...
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

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.