I have created a template to extract and format the informaiton I need out of an XML file. Can I use the template to create a new document such as a PDF?
Not easily, templates can only really output text based data formats. However the javascript API supports calling the various transformation services including PDF generation. So you could in theory use a template to generate the first state of your output and then execute a script against that to transform it to PDF.
Then maybe I'm looking at this the wrong way. My XML data presents properly when I preview it in a template but when browsing the space if I open the XML document the template is not applie, rather it opens in the browser with the XML tree. I have defined the custom view to apply the template. Am I using the wrong method to view the document if I want the template used?