This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Another way to make that input document into well-formed XML would be to surround it with start and end tags to act as the root element.
Anyway, once you have valid XML as your input, your next step in writing your XSLT program is to identify rules which map parts of the input to parts of the output. You are going to have to have a rule which refers to every part of the output document, but not necessarily a rule which refers to every part of the input document (as some parts of the input might be ignored). It's also better if those rules don't depend on context, because that makes it easier to write templates which map input to output, but that isn't always possible.