473,287 Members | 1,960 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,287 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 1243

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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.