473,411 Members | 1,937 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,411 software developers and data experts.

XSL conditional styling based on certain values lower down

I am trying to create an xsl stylesheet.
Here is how my input XML looks like :-

<diffs>
<test-case number="1">
<diff>
<element>cost-basis</element>
<attribute>at</attribute>
<actual>123</actual>
<expected>234</expected>
<diff-data>
<cost-basis cb="300" key="mykey" is-true="false"/>
</diff-data>
<diff-data>
<cost-basis cb="301" key="mykey" is-true="false"/>
</diff-data>
</diff>
<diff>
<element>adjustment-basis</element>
<attribute>unique-object-id</attribute>
<actual/>
<expected>1.0</expected>
<diff-data>
<cb-adjust-impl id="123456" quantity="100" myid="123456-0-0" />
</diff-data>
<diff-data>
<cb-adjust-impl id="123456" quantity="100" myid="123456-0-0" />
</diff-data>
</diff>
</test-case>
<test-case number="2">
</test-case>
</diffs>

For test case number 1, the id is same irrespective of whether it lies in a different diff-data.
For the first diff-data, the id is not mentioned. Is it possible to go one level higher up and collect the id from either of the subsequent diff-data which has the id attribute and display the value of that id (123456 in this case) for all element in any diff-data for that test case. The output format is not an xml. it is in CSV format.
I tried using ancestor, but not able to get it correctly.
--nark
Feb 7 '07 #1
1 1089
dorinbogdan
839 Expert 512MB
Hi,
Did you succeed to solve the problem ?
If yes, please let me know, in order to close the thread.
Thanks,
Dorin.
Mar 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: TheKeith | last post by:
I just wrote the following script for something I'm working on: ---------------------------------------------------------------------------- ------------------- <html> <head> <script...
4
by: CGuy | last post by:
Hi, I have an ASPX page which has a datagrid and this datagrid is bound to a Custom Collection. sample code this.DataGrid1.DataSource = UserManager.Users; this.DataGrid1.DataBind();
28
by: Benjamin Niemann | last post by:
Hello, I've been just investigating IE conditional comments - hiding things from non-IE/Win browsers is easy, but I wanted to know, if it's possible to hide code from IE/Win browsers. I found...
3
by: Dexsquab Molutinator via AccessMonster.com | last post by:
Greetings. I have searched for an answer to my query for some time and have had no success. I'm hoping the pooled resources of all your brains can help. How do you set a field to become active...
6
by: Marc Jennings | last post by:
Hi there, I am trying to get some conditional functionality into some of my apps. I can use the format : private void doStuff() { //do something }
28
by: richardlang | last post by:
Anyone out there ever come across a preprocessor macro that compares an argument value against the predefined __DATE__ macro in order to control conditional compilation based on date. Something...
1
by: cyningeston | last post by:
OS: WinXP Pro, VB/ASP/ADO.NET I'm building a web-based supplier management application. For each supplier we are required by the FDA to track certain documents. I've managed to pull them from...
2
by: audespero | last post by:
Hello, I'm a student tech at my college's campus library and i'm in charge of inventory for our A/V equipment this summer. I've decided to use access to tackle this task, and so far things are...
3
by: Momomo | last post by:
Hi, I am having a problem with a control which is caused by a style on the page which I am not able to trace. If I use the control in a page without any styling it looks ok. Is there a way to...
17
by: liketofindoutwhy | last post by:
to simply add two quote images around some text. seems quite simple at first but turns out all the obvious solutions are not as desirable as a perfect solution: please see...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...
0
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,...

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.