473,397 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

XSLT recursion with signals

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
1 1631
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andy Dingley | last post by:
I've just started on a new project and inherited a huge pile of XSLT (and I use the term "pile" advisedly !) It runs at glacial speed, and I need to fix this this. Platform is MSXML 4 / ASP ...
3
by: Brian Schroeder | last post by:
Hello Group, I'm quite new to xml, xpath and xslt so I hope I've not overlooked a resource where the answer to my question is. I'll try to give a short example, but in XML everything gets...
1
by: Oleg Konovalov | last post by:
Hi, I am new to XSLT, modifying somebody else's code: I have the following data (leaves in parallel branches): mystruct/myarray1/myvar/var2 and mystruct/myarray2/myvar/var3 I need to...
3
by: shaun roe | last post by:
I have a document about 4 levels deep and in my XSLT I want to generate a unique string ID for each basic element based on its path through the hierarchy. If I use recursion, I am continually...
2
by: Adam dR. | last post by:
I have an xml file similar to: <menu> <menuitem name="home" show="false"/> <menuitem name="about" show="true"/> <menuitem name="links" show="true"/> <menuitem name="games" show="true"/>...
4
by: shaun roe | last post by:
I should like to count the frequency of strings embedded in a longer string, space separated. Specifically, I have: <phiModule> 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 8 8 5 5 5 6 6 6 7 7 7 7 7 7 7 7...
3
by: shaun roe | last post by:
mild rant follows Working now for a couple of years with xslt and now xslt 2.0, does anyone else get the impression that xslt 2.0 somehow missed the point? Yes its got a fancy new data model...
10
by: olivier.scalbert | last post by:
Hello, the following constraints: source: <Source> <Item>AAA</Item> <Item>BBBBBBBBBBB</Item> <Item>CCCCCCCCC</Item> <Item>DDDDDDDDDDDDDDD</Item>
8
by: Lawrence | last post by:
Hi Is there any way of using variables in XSLT? I have been using <xsl:param name="showDetails"/and want to be able to set it to say 1 or 0 dependent on certain XSL:if statements throughout...is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.