If you take this approach, the workflow that you will run will look like this:
- SQL Server -> Internal View
- Internal View -> XML View (possibly using Linq to XML)
- XML + XSLT -> Output View.
Basically, what XSLT does allows you to take XML and generate text from it according to a set of rules that are more functional than procedural ones, different. Having emerged from a learning curve, I had great success with XSLT (mainly creating HTML documents). The book in which I talked a lot about getting started was the first edition: XSLT: Mastering XML Transformations. For beginners and advanced users, Doug Tidwell (which with this long title is now the second edition).
Practical question: do you want to create a document from a template - that is, you will have a data set, can you create the necessary document by mechanically dumping data into a structure? The good news in this regard is that you can do a lot with XSLT. The best news is that you can store XLST separately from the application, this simplifies setup, and also gives you the opportunity to have several templates that can be applied as needed.
Since RTF is a text document format (?), You should be able to create what you need from XLST.
The problem with PDF - if you go along the XSLT route, you need to convert XSL-FO to a PDF document, not only that it will introduce more complexity and - in terms of quick victory - a little more to study.
Your alternative is to generate RTF or PDF directly from your internal model. You are losing the power of templates, but approaching your basic comfort (code) - in this regard, I have nice things that are mentioned here.
I agree with the w3schools stuff.
I did a bit of work, but the fact is that yes, this should allow you to do what you need and will be a positive and flexible addition to your toolbox, but you may experience some pain along the way (XSLT is not procedural code if you try to process it that way, you will fight).
Murph source share