Configuration file: magazine.mz3 file as supplied with the Binaries
The MegaZine3 folder already contains an index.html file and a megazine.mz3 configuration file. If you double click the index file your browser will open a single sheet with a grey front and back page. No content, no controls, no GUI. The bare minimum.
Content of the original megazine.mz3 file; with explanation of the elements:
Adding pages and a background color
The first modifications are to add some more pages and to color the pages in the sandy yellow we choose in the planning phase.
List of actions; all done with a standard editor:
- delete the 2 empty pages "<page/>"
<page/> is a short form of the pair <page> </page>; an empty page since there is no element defined on that page, i.e. within the <page> and </page> tags - enter one "fully specified" empty page, i.e. an opening <page> tag and in a next row a closing </page> tag.
- Copy the 2 rows to create a 2nd empty page, then duplicate the 4 rows (2 pages) to achieve 4 pages.
Copy and paste as long as 24 pages are defined. - Save the changes and start index.html to verify that now there are more than just the original first 2 pages.
Windows comes with 2 basic text editors:
- notepad and
- wordpad
The simplest one is notepad, which is not a good choice because it does not show the megazine.mz3 file in a readable form. Single lines are not shown one beneath the other but all concatenated in one single row without line breaks.
Impossible to seriously work with ;-)
Reason:
The control character at the end of the line is a simple "LF" (line feed) character, the UNIX standard. THat control character is ignored by notepad. Which is not an error, because if only a line feed would be shown and no "carriage return", all lines would be simply printed above each other on the first row.
Wordpad is the better choice. All lines are shown in separate rows, and when saving the file, at the every end of line a pair of "CRLF" control characters is inserted. With the effect, that after a first save with wordpad also notepad will show the content "correctly".
We will not use notepad or wordpad in future, since other tools are a much better way to work with XML files; see the next chapter about such tools.
XML stands for "extensible markup language"; see wikipedia for details.
The two XML type files used for configuration of MegaZine3, namely .mz3 and .asul files, are text files that should be edited with special XML editors for increased comfort and error checking.
Also a validation with standard tools (validators) like http://validome.org is possible and highly recommended.
XML files consist of defined elements like >book>, <chapter> and <page>. And attributes that parametrize those elements. Examples of attributes are "pageheight" as book attribute and "position" as <img> attribute.
All elements and attributes are usually defined in Document Type Definition tables like the http://www.megazine3.de/megazine2.dtd. A link to that table is included in the megazine.mz3 file and tells validators and XML editors where to find the DTD tables so they can validate the XML file against that definition.
Next Chapter: Plugin selection


