473,396 Members | 2,016 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,396 software developers and data experts.

Question :Comparing 2 elements in xsl

Hello !!
I have this xml file :

<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="tables.xsl"?>
<aaa xmlns="http://tempuri.org/My.xsd">
<Dog>
<DogName>f1</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>f1</DogName>
<Vet>google</Vet>
<Degree>danny</Degree>
<Vaxin>false</Vaxin>
<DogText>amstaf kind of wolf</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>f1</DogName>
<Vet>wofy</Vet>
<Degree>pk</Degree>
<Vaxin>false</Vaxin>
<DogText>colly kind of buldog</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
<Dog>
<DogName>test</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>test</DogName>
<Vet>google</Vet>
<Degree>danny</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>test</DogName>
<Vet>wofy</Vet>
<Degree>rexi</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
<Dog>
<DogName>TWA</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>TWA</DogName>
<Vet>google</Vet>
<Degree>Wolfy</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>TWA</DogName>
<Vet>wofy</Vet>
<Degree>poki</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
<Dog>
<DogName>QDA</DogName>
<Shot>16</Shot>
<DogDetail>
<DogName>QDA</DogName>
<Vet>yahoo</Vet>
<Degree>asmer</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>QDA</DogName>
<Vet>wofy</Vet>
<Degree>danny</Degree>
<Vaxin>true</Vaxin>
<DogText>No Text</DogText>
<Side>2</Side>
</DogDetail>
</Dog>
</aaa>

And i am trying to compare 2 elements (by the same name) from
different nodes , for example if we look on

<DogDetail>
<DogName>f1</DogName>
<Vet>google</Vet>
<Degree>danny</Degree>
<Vaxin>false</Vaxin>
<DogText>amstaf kind of wolf</DogText>
<Side>1</Side>
</DogDetail>
<DogDetail>
<DogName>f1</DogName>
<Vet>wofy</Vet>
<Degree>pk</Degree>
<Vaxin>false</Vaxin>
<DogText>colly kind of buldog</DogText>
<Side>2</Side>
</DogDetail>

I will compare "Vet" from the first "DogDetail" element (google) to
the second "Vet" in the second "DogDetail" element

( "wofy" in this case)

can you tell me how can i do it ?
is there anny "string compare" function in xsl ?
Jul 20 '05 #1
0 1247

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

Similar topics

8
by: Corno | last post by:
Hi all, Does anybody know a command line tool (linux or windows) that can compare 2 XML files. There's only 1 extra requirement that makes it a bit more complicated: the order of attributes or...
5
by: Sue | last post by:
After finishing up my first quarter JavaScript on 12/12/03, I decided to improve character checking on my project. In my project I only had to do very basic validation. Therefore, I only had one...
7
by: Master of C++ | last post by:
Hello Folks, I have a programming dilemma with templates and "genericity". I can think of a few solutions, but I am not sure which one is the best in terms of genetic C++ style. Any suggestions...
1
by: Alfonzo Morra | last post by:
Hi, If I have code like this : class MyClass { std::vector< in t> arr_ ; std::vector < std::pair< long, double> > adj ; ...... MyClass( const MyClass& rhs) { ......
2
by: Mounil Kadakia | last post by:
Hi all, I am not sure if this is the right group to post this question; if not, please direct me to an appropriate group. I have 2 hashtables; htb1 and htb2; I add 2 elements to each; ...
1
by: psmahesh | last post by:
Hi folks, I am comparing two arrays and removing matches from the second array from the first array. Can someone take a look at this code below and mention if this is okay and perhaps if there...
25
by: J Caesar | last post by:
In C you can compare two pointers, p<q, as long as they come from the same array or the same malloc()ated block. Otherwise you can't. What I'd like to do is write a function int comparable(void...
3
by: =?Utf-8?B?Sm9zaFA=?= | last post by:
Hi All, I am attempting to compare values in two arraylists to make sure all the values are the same. I am running into trouble with my code if both arraylists compare okay up until a point and I...
15
by: DL | last post by:
say, we have the following: // declare an array myArray = ; // short hand? same as myArray = new Array ? // populate it myArray = 0; myArray = 0; myArray = 1; myArray = 0;
3
by: Sean Dalton | last post by:
Hello, I have a two sets OLDLIST and REMOVE. I would like to remove every element in OLDLIST if it is also occuring in REMOVE and store the remaining elements from OLDLIST into NEWLIST. So...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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.