i am beginner in XSLT and using to transform XML to XML.I require to get \[code\]Prices\[/code\] tag which has lowest sum.Source XML:\[code\]<Result> <Fares> <Fare> <Prices> <Price type="adt" ticket="15"/> <Price type="chd" ticket="10"/> <Price type="inf" ticket="10"/> <Prices> </Fare> <Fare> <Prices> <Price type="adt" ticket="10"/> <Price type="chd" ticket="10"/> <Price type="inf" ticket="10"/> <Prices> </Fare> <Fare> <Prices> <Price type="adt" ticket="5"/> <Price type="chd" ticket="5"/> <Price type="inf" ticket="5"/> <Prices> </Fare> <Fare> <Prices> <Price type="adt" ticket="10"/> <Price type="chd" ticket="5"/> <Price type="inf" ticket="5"/> <Prices> </Fare> </Fares></Result>\[/code\]XSLT:\[code\]<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xslutput method="xml" indent="yes" /> <xsl:template match="Result"> <xsl:element name="Lowest"> <xsl:variable name="lowest" select="Fares/Fare/Prices[not(sum(Price/@ticket) > //Fares/Fare/Prices[sum(Price/@ticket)])]"/> <xsl:copy-of select="$lowest"/> </xsl:element> </xsl:template></xsl:stylesheet>\[/code\]Output:\[code\]<Lowest> <Prices> <Price type="adt" ticket="15"/> <Price type="chd" ticket="10"/> <Price type="inf" ticket="10"/> <Prices/> </Prices></Lowest>\[/code\]Expected Output:\[code\]<Lowest> <Prices Total="15"> <Price type="adt" ticket="5"/> <Price type="chd" ticket="5"/> <Price type="inf" ticket="5"/> <Prices></Lowest>\[/code\]As shown above output should have the \[code\]Prices\[/code\] tag with lowest value as attribute also.Please help.