XSLT Improved for optimizing query for latest observation