Required Stylesheet should refer the refer.xml and must get only the values of that elements from the input.xml. How to do that
Input.xml which is the request
<?xml version="1.0" encoding="ISO-8859-1"?>
<catalog>
<cd>
<title>Empire Burlesque</title>
<artist>Bob Dylan</artist>
<country>USA</country>
<company>Columbia</company>
<price>10.90</price>
<year>1985</year>
</cd>
<cd>
<title>Hide your heart</title>
<artist>Bonnie Tyler</artist>
<country>UK</country>
<company>CBS Records</company>
<price>9.90</price>
<year>1988</year>
</cd>
<cd>
<title>Greatest Hits</title>
<artist>Dolly Parton</artist>
<country>USA</country>
<company>RCA</company>
<price>9.90</price>
<year>1982</year>
</cd>
<cd>
<title>Still got the blues</title>
<artist>Gary Moore</artist>
<country>UK</country>
<company>Virgin records</company>
<price>10.20</price>
<year>1990</year>
</cd>
<cd>
<title>Eros</title>
<artist>Eros Ramazzotti</artist>
<country>EU</country>
<company>BMG</company>
<price>9.90</price>
<year>1997</year>
</cd>
<cd>
<title>One night only</title>
<artist>Bee Gees</artist>
<country>UK</country>
<company>Polydor</company>
<price>10.90</price>
<year>1998</year>
</cd>
<cd>
<title>Romanza</title>
<artist>Andrea Bocelli</artist>
<country>EU</country>
<company>Polydor</company>
<price>10.80</price>
<year>1996</year>
</cd>
<cd>
<title>When a man loves a woman</title>
<artist>Percy Sledge</artist>
<country>USA</country>
<company>Atlantic</company>
<price>8.70</price>
<year>1987</year>
</cd>
</catalog>
refer.xml - here we will have our elements from the input
<catalog>
<cd>
<country name="USA">
<title>When a man loves a woman</title>
<title>Greatest Hits</title>
</country>
<country name="UK">
<title>Still got the blues</title>
<title>One night only</title>
</country>
</cd>
</catalog>
Output.xml - This shows the values of elements which are shown in refer.xml
<country name="USA">
<cd>
<title>When a man loves a woman</title>
<price>8.70</price>
</cd>
<cd>
<title>Greatest Hits</title>
<price>9.90</price>
</cd>
</country>
<country name="UK">
<cd>
<title>Still got the blues</title>
<price>10.20</price>
</cd>
<cd>
<title>One night only</title>
<price>10.90</price>
</cd>
</country>
Thanks