473,802 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Netlist Hierarchy with XSLT

Dear All,

may be some one has a good idea for the follwoing problem.

In the xml data below you see a kind of abstract netlist as we use it
for chip design. Where the H tag stands for a logical hierarchy level,
the M tag for a physical macro and the p tag for a pin of the macro
which has to be bound to a Net ( named by @Net).
The existing netlist is described without the Hierarchy. Hence, I must
know which nets I have to pass trough the Hierarchy interface (H
tags).

Imagine I'm on the node <H id=5>
Then all nets which are above are ancestor::*/M/p/@Net
The Nets in and below this Level are decendant::*/p/@Net

What I would need is a list of Nets which are in the ancestor nets AND
in the decendant nets. This nets are exactly the ones we need in the
interface.

ancestor::/M/p[@Net=descedant: :*/p]/@Net does not return any net.
I feel the approach to have = betwenn to nodesets may be bad.

What is the right solution here ???
I would expect the Nets A,C and D

Thanks a lot for your help
Rolf

############### ########### DATA ############### #############
<TOP>
<H id="1">
<M id="2">
<p net="A"/>
<p net="B"/>
<p net="E"/>
</M>
<H id="3">
<M id="4">
<p net="C"/>
<p net="B"/>
</M>
<H id="5">
<M id="6">
<p net="D"/>
<p net="C"/>
</M>
<H id="7">
<M id="8">
<p net="A"/>
<p net="C"/>
</M>
</H>
</H>
<M id="9">
<p net="D"/>
<p net="A"/>
</M>
<H id="10">
<M id="11">
<p net="B"/>
<p net="E"/>
</M>
</H>
<M id="12">
<p net="E"/>
<p net="B"/>
</M>
</H>
</H>
</TOP>
Jul 20 '05 #1
1 1443
Hi,

Tempore 00:16:15, die Thursday 13 January 2005 AD, hinc in foro {comp.text.xml} scripsit Rolf Kemper <Ke*****@ee.nec .de>:
Imagine I'm on the node <H id=5>
Then all nets which are above are ancestor::*/M/p/@Net
The Nets in and below this Level are decendant::*/p/@Net

What I would need is a list of Nets which are in the ancestor nets AND
in the decendant nets. This nets are exactly the ones we need in the
interface.

ancestor::/M/p[@Net=descedant: :*/p]/@Net does not return any net.
I feel the approach to have = betwenn to nodesets may be bad.

IMHO, that approach is perfect, in fact the solution is very close.

The following Xpath will return 'ACDA':
ancestor::*/M/p/@net[.=current()/descendant::*/p/@net]

While this Xpath will return exactly 'ACD', your desired output:
ancestor::*/M/p/@net[.=current()/descendant::*/p/@net][not(ancestor::[position() &gt; 3]/M/p/@net=.)]

regards,
--
Joris Gillis (http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Deserta faciunt et innovationem appelant
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3717
by: poofpoof | last post by:
Dear Experts, I have some problems with XSLT recursivity... here what I want to do XML part : ---------- <struct>
10
2110
by: KemperR | last post by:
Dear All, may be some of you can help me with an XSLT example how to solve the following challange. For the XML below I want to find out the maximum hierarchy level for a specific element in my XSLT. The result for the example (searching for <A/>) should be 4 as the element A is nested 4 times maximum. I guess I have to use somehow the count function with 'following::A' axes. But I could not get that to work yet.
7
5402
by: gsoftwares | last post by:
Hi XML Guru, I need to transform flat xml to Hierarchy xml. Can some one help me get started or have a same code with them my flat xml: <rowset> <row>
7
5209
by: pintihar | last post by:
Hi, As a follow on from an earlier post I have another question about xslt. Is it possible to create the stylsheet programatically? Is this sensible? In the first phase I needed to map element name from inbound xml to my internal elements to standardize disparate input. Now I could just create an xslt stylesheet for each possible inbound format and be done, but I think it would be powerful to be able store this mapping in a database and...
5
1991
by: mlev | last post by:
I want function in one namespace to create instance of class defined in another namespace. (more detailed - I try to make independent "Seralizer" dll, to be used by different application, each calling it from its own class which defines the application configuration) I failed to make it work. Notify that in the Seralizer source I dont know the definition of the class I get. Foe example, how do I make lines like below working? public...
2
3089
by: Jonny | last post by:
Hi; I have a spice netlist contain capacitors, resistors, and mosfets. I want to store the componets in a graph so I can perform the following actions. 1. Check whether or not the network is connected/disconnected 2. Check which components are connectd to the net 3. Check whether the components are in series/paralle.
8
1679
by: Bostonasian | last post by:
I don't even know where to begin this as hierarchy is always confusing to construct dynamically in any form(query, xslt,etc). However it is very easy to follow when it's presented. I've done breaking a linear doc to 2 levels of hierarchy before, but that case had fixed level(its depth didn't go any further than 2). I have xml doc in attribute oriented format as following : <Root> <Survey ID="1" ControlType="Label" ParentID="1" Text="1....
3
18721
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however, working with complex reports is tricky Assumption: Reader of this article have basic knowledge of creating data reports. Creating a Parent-Child Command and create a DataReport Suppose we have a database called company with two tables ...
4
2760
by: mark4asp | last post by:
I want to write a xslt template to create a xhtml 1.0 (transitional) file which will be sent in as email. Here is a typical xml data file: <BatchEmail> <Domain>www.myDomain.com</Domain> <Destination> <Salutation>Hi Mark</Salutation> <UniqueID>4120</UniqueID>
0
9562
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
10538
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
10285
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,...
0
9115
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7598
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
6838
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
5494
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
4270
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
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.