The WordML tool enables you to create content for ECEn Web Template XML pages using Microsoft Word 2003, using headings, styles, tables and
the like.
On this page, we'll go over what the WordML tool is and how you can use it to easily create
ECEn XML web page content.
What is the WordML tool?
Since Microsoft Word 2003 can save your document as an XML file and can even run XSLT transformations on that XML to change it into other XML formats, it is now possible to transform the XML Word produces, or WordML, into the ECEn Web XML. In a nutshell, to take advantage of the WordML tool you’ll need to create web page content in Microsoft Word 2003, save it as an XML file, run a special script, and you’re content will be almost ready to go. It is important to realize that the WordML tool currently creates a large chunk of an ECEn XML web page's content---but not a full web page. You’ll have to add some of the header information, such as the name and title of your web page, by hand after the transformation.
What the WordML tool can do
Enable you to create most of your web page content using Microsoft Word 2003, as long as you keep in mind that you are creating an ECEn XML web page.
Save you time by removing a lot of the XML typing, copying and pasting work, allowing you to focus on your web content.
Hopefully make it faster and easier to generate XML web pages.
Enable you to copy and paste content from a web browser into Word 2003 and easily transform it into ECEn XML.
What the WordML tool can’t do
You can’t convert just any Microsoft Word 2003 document, complete with wacky styles, colors, unusual tables, etc., into an equivalent ECEn XML web page using the WordML tool. Although some of the content may come through, much of it will probably be mangled. In general, for the WordML tool to work, you have to design your content with the WordML tool and ECEn Template XML in mind. We’ll go into more detail about what that means later on, but in general you should stick to basic styles like bold, italic, and underlined, Word’s Heading Styles, basic lists and tables.
As of right now, there is no support in the WordML tool to insert
pictures into your web page content. However, it is quite easy to hand craft
the XML for pictures yourself after you've created most of your text content.
The ECEnWordML tool will only work with Microsoft Word 2003. If you have an older version of Word (like Word XP) it won't work. Talk to the sysops to get your Microsoft Office upgraded to the latest version (note that Office 2003 will run on Windows XP---don't be fooled by the fact that Office XP shares the 'XP' version name with Windows XP).
The WordML tool will not allow you to define your page’s title, name or other heading information. You will need to hand edit the XML yourself to make these changes. The changes you’ll need to make after the WordML tool has finished are usually pretty minor, though.
You can’t create main pages, like the ECEn home page, using the WordML tool. However, if you have content chunks that you would like to include on a main page, you can create those content chunks using the WordML tool and then include the files as you need to.
Just like you can’t create main pages, you can’t use the WordML tool to create many of the features on main and secondary pages such as features, news boxes, menus, etc. The WordML tool is designed mainly to help you generate the main content for your web pages.
What do I need to use the WordML tool?
1Basic Understanding of the ECEn XML Templates
You need a least a basic understanding of how the ECEn XML templates work. Basically, you should know:
What files you need in order to create a working ECEn XML web page
How XML tags work (in general)
What tags are essential to ECEn XML web pages
If you’re not sure you know all this, have a look at the Hello World Tutorial, which is designed to give you just enough information about the ECEn XML templates to get a basic page going.
2Microsoft Word 2003
You must be working on a Windows machine using Microsoft Word 2003. All the XML features that we use to make the WordML tool work are not supported in earlier versions of Word and thus the tool will not work. The tutorials assume
that you understand the basics about Microsoft Word: you should know how to create new files, save files, etc.
What if I’m not sure what version of Word I’m using? MS Office 2003 is, by default, quite verbose about which version it is. So, when you look for the program in the start menu, under ‘All Programs’ and ‘Microsoft Office,’ you should see ‘Microsoft Office Word 2003.’ If you don’t, there is a good chance you are not using Office 2003.
Starting up Microsoft Word 2003
Alternatively, you can open up your version of Word and go to the ‘Help’ menu along the top menu bar. Select ‘About Microsoft Office Word.’ A dialog box will pop up and in the very top line of text, you’ll see exactly what version of Word you are using.
Finding 'About Microsoft Office Word'
About Microsoft Office Word 2003
What if I’m not using Word 2003? Contact the ECEn SysOps and they’ll be happy to help you install it on your machine or give you the CDs so you can do it yourself.
3Space on the ECEn Web Server
You need to access to some space on the ECEn web server so you can post your XML web pages.
Tutorial
A Hello World Example
For this first tutorial, we’ll create a basic XML web page using the WordML tool, to give you a feel of the logistics.
1
Download from_wordml.xsl. (Right click and choose Save Link Target As…). Save it in the same directory you plan to save your XML files in.
2
Start up Microsoft Word 2003.
3
Create a new document. Word might suggest that you create a new XML document. Make sure you choose a new Blank Document.
Creating a new Blank Document
4
Before we get started typing, open up the Styles and Formatting palette. Along the top menu, look for Format. In the Format Menu, select ‘Styles and Formatting.’
Finding 'Styles and Formatting'
A Styles and Formatting palette should appear to the right of your document work space.
The Styles and Formatting Palette
5
Type ‘Hello World’ on your page.
6
Select the text you typed. While the text is selected, click on the ‘Heading 1’ in the Styles and Formatting Palette.
Using the Heading 1 style
Alternatively, you can select Heading 1 from the Styles and Formatting Palette and then type Hello World.
7
Underneath the Hello World heading, type some more text. It should
look like normal text, but if it doesn't, select Normal from the Styles
and Formatting Palette.
8
That's all the content we’re going to produce during this simple tutorial. Feel free
to add all the extra text you'd like, using the styles available in the Styles and Formatting
menu or bold, italic or underlined text. For best results, only include one Heading 1 in your document. Now we’re ready to create ECEn Web Template XML from our Word 2003 document.
9
If you want to work on your web content later in Word using the Styles and Formatting along
with the other word processor features you're used to, you'll need to save your document before
transforming it into ECEn XML.
9.1
From the File menu, choose Save As… Give the file a name, preferably without spaces.
9.2
In the bottom Save As Type: box, choose XML Document. Click Save.
Saving a document as XML
You can open this WordML document up in Word 2003 later and continue working on it using the Headings and normal text as we’ve explained here.
10
Now, we are ready to transform the WordML into the ECEn Web XML.
10.1
Choose Save As… once again. Give the file a new name (don't use the same one as before or you'll lose the other page. You need that page in case you want to make further edits in Word and then re-transform it into ECEn XML).
10.2
Now, check the box next to the filename that says ‘Apply Transform. Once you click the box, the ‘Transform…’ button will be available. Click on it.
Choosing to apply an XSL Transform
10.3
Once you click the Transform button, another dialog box will pop up asking you to Choose an XSL Transformation. Browse to the from_wordml.xsl you downloaded earlier.
10.4
Once you’ve selected from_wordml.xsl, click Save. Word will warn you about saving files using XSL transformations. Don’t worry— Word is doing exactly what you want.
Selecting the XSL Transform and Saving the XML document
11
Create a .phtml file for your newly created ECEn Web XML page. You can download this one, renaming it to match the name of your XML file of course, or you can copy an existing .phtml
you have, rename it, and use that.
12
Look at your web page you created in Word 2003 online!
The Finished Masterpiece
13
Looking at our 'Finished Masterpiece', you can see that the web page isn't really quite
finished. We'll need to edit the XML by hand to change Put Page Name Here to your real page name.
You'll also need to change the Page Title. If you're unsure how to edit the XML by hand, in this case, it is really simple. Just open the XML file and replace Put Page Name Here with your text. To learn more about editing XML by hand check out some ECEn XML Common Tasks.
I don't think I get it...
If you are having trouble using the WordML tool, let the ECEn Web Team know and we'll help you as soon as we can and try to make the online documentation better.