alternate stylesheets and Word 2003

 I have had a busy few days, hence the silence on my blog. I have been going through the initiation into the Microsoft “review process”. It’s actually reasonably fair compared to everywhere else I have worked. But, it’s still kind of like a professional hazing J


Anyway, so I have been working with generating WordML docs using XSL. This means becoming awfully frustrated with XSLT and its strange syntactical world. I know, I know, you XSLT gurus think its all simple, it’s so easy, that those of us who think the whole model kind of blows smoke are genuine dolts. Whatever, my ego is small enough that I can accept that. However, I still think XSLT conceptually is pretty cool, but the implementation is kind of sad.


So, here is an interesting behavior I just stumbled on. When I gen my word documents, I include a reference to a stylesheet so that when the doc opens and Word presents the little task pane for XML Data Views. Therein, as we all know, you can choose to see Data Only or select a stylesheet. I have referenced a stylesheet in my XML, so this one appears. Again, as we know, you can also browse for other stylesheets. However, if, in my XML, I add this:

<?xml-stylesheet type=”text/xsl” alternate=”yes” title=”alternate” type=”text/xsl” href=”Stylesheet2.xsl”?>

The second one does not appear in the list of possible transforms from which I can choose in the XML Data Views. It could be that I need to reference alternate stylesheets differently for Word to pick them up and make them available in the XML Data Views. I’m not sure. If I figure it out, I will post it to my blog.


Rock on.

Comments (3)

  1. Mary McRae says:

    Hi John,

    The only way I know how to do this is to define multiple solutions for the same schema in the Templates and Add-Ins … XML Schema … Schema Library.

    Select a schema, and then say "add solution". You can point to multiple XSLT files, and set one to be the default.

  2. Take Outs: The Digital Doggy Bag of Blog Bits for 18th and 19th February 2004