Hi there
I want to find the intersection of two xml files using XSLT. Plz see the following example as help.
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
<object ID ="3" name = "abc" price = "350"/>
<object ID ="4" name = "def" price = "3000"/>
<object ID ="5" name = "jkl" price = "130"/>
<object ID ="6" name = "abc" price = "230"/>
</root>
****************************************************
File2.xml
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
<object ID ="4" name = "defijk" price = "3000"/>
<object ID ="50" name = "jkl" price = "130"/>
<object ID ="7" name = "abc" price = "2"/>
<object ID ="17" name = "xyz" price = "2"/>
</root>
***********************************************
result.xml
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
</root>
So as you can see, only those elements are retained whose attributes exactly matched in value...
I think that will help explain the problem....
I want to find the intersection of two xml files using XSLT. Plz see the following example as help.
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
<object ID ="3" name = "abc" price = "350"/>
<object ID ="4" name = "def" price = "3000"/>
<object ID ="5" name = "jkl" price = "130"/>
<object ID ="6" name = "abc" price = "230"/>
</root>
****************************************************
File2.xml
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
<object ID ="4" name = "defijk" price = "3000"/>
<object ID ="50" name = "jkl" price = "130"/>
<object ID ="7" name = "abc" price = "2"/>
<object ID ="17" name = "xyz" price = "2"/>
</root>
***********************************************
result.xml
<?xml version="1.0"?>
<root>
<object ID ="1" name = "abc" price = "0"/>
<object ID ="2" name = "def" price = "430"/>
</root>
So as you can see, only those elements are retained whose attributes exactly matched in value...
I think that will help explain the problem....