Microsoft Word 2003 – one XML InfoSet, many renditions

How to write your thoughts once and produce as many renditions as you want? Here is one way using Microsoft Word 2003 XML capabilities:


Start with the structure of your thoughts as a XML schema, let’s say:


<?xml version="1.0" encoding="utf-8" ?>








<xs:element name="Doc1">



      <xs:element name="title" type="xs:string" minOccurs="1" maxOccurs="1" />

      <xs:element name="section" minOccurs="0" maxOccurs="unbounded">



            <xs:element name="subtitle" type="xs:string" minOccurs="0" maxOccurs="unbounded" />

            <xs:element name="p" type="xs:string" minOccurs="0" maxOccurs="unbounded" />









An XML instance for such a structure is for example:


<Doc1 xmlns="">

  <title>doc1 instance1</title>


















A basic HTML rendition could be produced by this XSLT stylesheet:


<?xml version="1.0" encoding="UTF-8" ?>


  version="1.0" xmlns:x=



<x:output method="html" />


<x:template match="/">



<title><x:value-of select="/t:Doc1/t:title" /></title>


 P {text-align:justify}




<h1><x:value-of select="/t:Doc1/t:title" /></h1>

<x:apply-templates select="/t:Doc1/t:section" />






<x:template match="t:section">


<h2><x:value-of select="t:subtitle" /></h2>

<x:apply-templates select="t:p" />



<x:template match="t:p">

<p><x:value-of select="." /></p>





Now, in Word 2003:


-Select File / New...

-In New Document Task Pane, select XML document

-Select Templates and Add-Ins...

-In the XML Schema tab, select Add Schema...

-Select the .xsd file for our schema above

-Type an alias for such a schema

-Now write down your ideas and tag them as appropriate with the “Choose an element to apply to your current selection:” section of the XML Structure Task Pane.

-Or select an element and write your intended content between the tags


Dump you mind as you wish

Save your abstractions often, they are on an .xml file and represent the XML InfoSet of your ideas (this file is the source).


Want a particular rendition?


-In the XML Structure Task Pane, select XML Options...

-Check Save data only

-Check Apply custom transform

-Browse to the .xslt file (like the one above)

-Select File / Save As... (Apply transform and Save data only checkboxes are set)

-Provide a filename for that particular rendition, as of this example it is an HTML file, so type the name between double quotes and with .html extension


That’s it!


Comments (0)

Skip to main content