From the course: PHP: Exporting Data to Files

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Formatting the main content file

Formatting the main content file - PHP Tutorial

From the course: PHP: Exporting Data to Files

Start my 1-month free trial

Formatting the main content file

We need to convert the main content file from the Word document to an XSLT style sheet. The process is basically the same as we did with the open document text file in the previous chapter. However, it's extremely important to format the XML correctly. Otherwise, Microsoft Word will treat the final document as corrupt. In your editing program, open flowers_word.xslt in the output folder. As with the file that was created from the OpenDocument text file in the previous chapter, all the white space has been removed. So we need to format this file before we can start working on it. But Microsoft Word is extremely fussy about the way the file is formatted. Let me show you what I mean. I'm using Zen Studio which is an Eclipse based program. So if I go to source, and then format. It formats it. It looks very nice. It was fine when we worked on the open document text file in the previous chapter, but Microsoft Word doesn't like the way that it's formatted. Let's scroll down to see what the…

Contents