Example of using XSLT to import DB info into Word

Here’s a blog entry I just came across where the user is building an XSLT that will transform their data into WordprocessingML (http://dbdesc.com/blog/?p=10). It’s followed up by another post that was made today (http://dbdesc.com/blog/?p=11). This is a cool example of how you can start playing around with the document generation capabilities that come with XML file formats. This is really just the start or course, which is why it’s fun to see.

We’re seeing a lot of people doing similar things. Like I said earlier, we currently have a huge community of developers building solutions on top of Office (about 1 million), and 1/3 of those people are using the XML functionality in Office 2003. That’s 330,000 people developing solutions using Office XML. I can’t wait until we get Office 12 out there, and people can rely on full fidelity XML formats in all three applications (Word, Excel, and PowerPoint).


Comments (5)

  1. Craig Ringer says:

    Personally, I can’t wait for Publisher to move to XML. I’d *love* to be able to generate preconfigured templates for customers on demand, with embedded job tracking info and pre-configured PDF export settings. The amount of back-and-forth with Publisher-using customers this would eliminate would be amazing.

  2. Julie says:

    I’d still love to see some examples posted of repeating elements that also use ancestor nodes and stuff of the sort that is much, much easier to do using xslt than it ever was before. I’m a bit worried that some really great functionality that exists in Word 2003 is being done away with. Of course, I don’t have the beta yet so I’m just squirming in fear here 😉

  3. Craig – You can definitely see that this is an evolution and that not everything is going to happen overnight. We actually started all of this back in Office 2000 with the HTML format, and we’ve finally arrived to a point where three major applications are using XML as their default format. I think you can expect to see this trend continue as there are some really great scenarios in the other applications as well.

    Julie – I’m wondering what you think would go away that was in Office 2003? We’ll continue to support all those older scenarios, and XSLT will definitely still play an important role. As we talked about at PDC though, we’ve done a lot of work so that a large portion of the scenarios that required XSLT will no longer need them (the mappings can just be built directly into the Word document). That doesn’t mean XSLT will go away though, it just won’t always be necessary.


  4. I’m one of those people using SpreadsheetML generated by my own code. One worry I have: whether some of the "neat" features like Tables will be supported by Office 12 using the old Excel 2003 SpreadsheetML format. Why do I care? Because I want my apps to emit pure XML for an entire workbook, NOT have to create multiple files on the server and zip them, etc.

  5. Richard, there will also be a single XML file equivalent for the new format. Instead of a ZIP package with multiple "parts" (ie files), you can use an XML file as the package and just store each "part" in it’s own node. Binary parts would have to be base64 encoded, and the XML parts would just be XML. Will that get you what you want?