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 - PHP Tutorial
From the course: PHP: Exporting Data to Files
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
(Locked)
Creating a .docx file to use as a template3m 37s
-
(Locked)
Extracting the main content file from a Word document5m 28s
-
(Locked)
Formatting the main content file3m 38s
-
(Locked)
Converting the main content file to XSLT6m 18s
-
(Locked)
Outputting the database result as a .docx file6m 4s
-
(Locked)
Offering a choice of download formats3m 55s
-
(Locked)
-