473,806 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="si gnal00">
<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 1659
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********@hot mail.com> wrote in message
news:d7******** *************** ***@posting.goo gle.com...
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="si gnal00">
<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
2197
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 Any advice on benchmarking tools / techniques ? I have no budget for tool-building, so if there's anything already out there, that would be good to know.
3
1458
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 bloated really fast. I've got the following situation:
1
1563
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 implement the find the first occurence of : <xsl:if test="position() != last() and
3
2702
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 accessing the root element ID, here is a typical call: <xsl:variable name="fullPath" select="concat('p',../../../@id,'_c',../../@id,'_r',../@id,'_s',$slaveID) "/>
2
1696
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"/> <menuitem name="learn" show="true"/> <menuitem name="order" show="true"/> <menuitem name="contact" show="true"/> <menuitem name="support" show="false"/>
4
1930
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 8 8 8 8 8 8 8 8 8 9 9 9 9 6 7 7 7 8 8 8 8 9 9 9
3
3324
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 (and thank goodness for the new grouping functions), but where are the functions which would really have made it useful without taxing the implementers? e.g trigonometry functions for SVG; square root /log function to do simple statistics? hex/ dec...
10
2319
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
3459
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 this possible? Kind Regards Lawrence
0
9598
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10623
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10373
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.