Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSLT recursion with signals

Reply
Thread Tools

XSLT recursion with signals

 
 
Leo Kirch
Guest
Posts: n/a
 
      10-27-2003
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
 
Reply With Quote
 
 
 
 
Dimitre Novatchev
Guest
Posts: n/a
 
      10-28-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
va_arg... recursion: changing arguments and the using recursion jononanon@googlemail.com C Programming 8 04-26-2012 08:37 PM
XSLT: recursion (with key?) vs nesting call-template shaun roe XML 3 09-28-2005 08:11 PM
For-each or recursion in XSLT Oleg Konovalov XML 1 06-04-2005 02:02 AM
For-each or recursion in XSLT Oleg Konovalov Java 1 06-04-2005 02:02 AM
ANN: New low-cost XML Editor, XSLT Editor, XSLT Debugger, DTD/Schema Editor Stylus Studio Java 0 08-03-2004 03:53 PM



Advertisments