Easy Web Content Management with XMLcmNOW (2/2) - exploring XML
Easy Web Content Management with XMLcmNOW
How it works
The program looks like one of those wizard's chain of dialogs. At first it prompts the user for his homepage address:
Then it tries to load the configuration file called 'redindex.xml' from the entered location via HTTP. The configuration file contains information about the different parts of the homepage and which XSL/XML files are associated with them. The user selects the part of the homepage he wants to update.
The program creates a temporary folder in the system's temp directory. The program loads the XML/XSL files to the temporary folder via HTTP and opens the editor showing the XML-File:
The user edits the file. He can see what the changes look like using the Preview button. Pressing Preview or Continue in the editor saves the XML file to the temp folder. It starts the optional XML validation and the XSLT transformation. The resulting HTML files are stored in the temporary folder. When Preview was chosen, the program tries to show the resulting HTML in a Web browser. When Continue was chosen: The XSL file is deleted from the temporary folder because it was not changed and uploading it would be pointless. The FTP password has to be entered by the user. All files in the temp folder, the HTML files and the XML content, are then uploaded to the specified FTP server.
The temporary folder is finally removed from the system's temp directory.
Files Overview
- The Site Configuration File - the default should be called "redindex.xml" (the program looks for a file with this name by default).
- The XML file which contains the homepage information (the changeable contents), for example "myhomepage.xml"
- An optional DTD-File which defines tags and the structure of the XML file for validation, if switched on.
- The xsl file which contains the layout, for example "myhomepage.xsl"
The configuration file is like a batch file. It tells the content management software
- which files to load from the server to a temporary directory on the client.
- which file to edit in the editor
- which XML file and XSL file to translate to HTML.
- the HTML file to show when hitting the Preview button.
- the name of the FTP server and the username for uploading files from the temporary directory.
- which files not to upload from the temp directory, to be dropped.
The easiest way to start is to download the provided sample site configuration, XML and XSLT files and modify them for one's own needs.
Conclusion
XML and XSLT can also be used for statically creating HTML files. The separation of content and layout cleanly divides the work between the content manager and the Web designer in a convenient way. More information can be found at:
- The XMLcmNOW homepage
- XMLcmNOW examples
- Our column on XSLT
Produced by Michael Claßen
URL: https://www.webreference.com/xml/column40/2.html
Created: Oct 01, 2001
Revised: Oct 01, 2001