<?xml version='1.0'?>
<page>
  <meta>
    <title>Managing web site content with XML</title>
    <author>Diederik van der Boor</author>
    <created>19 september 2005</created>
    <modified/>
    <abstract>A different way to create web pages with XML.</abstract>
  </meta>

  <section>
    <title>Introduction</title>
    <par>
      Many static web pages are generated with PHP and MySQL.
      Static content can also be stored as XML,
      which is what this site does.
    </par>
    <par>
      I wouldn't recommend this to anyone.
      It was however, a fun experiment.
    </par>

    <par>
      This allowed me to...
    </par>
    <list class="no_bullets">
      <item>...write content without the overhead of HTML markup.</item>
      <item>...adjust the entire HTML output of the site any time.</item>
      <item>...introduce your own simpler "HTML" tags.</item>
      <item>...automatically generate sitemaps, breadcrumbs, and indexes.</item>
      <item>...focus on writing good articles instead of article markup.</item>
      <item>...improve the access times of the web site.</item>
    </list>
  </section>

  <section>
    <title>Putting it together</title>
    <par>
      The contents of this site is written in pure XML.
      Instead of using the standard HTML tags, any tag names can be chosen.
      These tags are converted to the final HTML page with use of XSL.
      XSL is a XML-transformation language.
    </par>

    <subtitle>A small example</subtitle>
    <par>
      Let's take the following page:
    </par>
<config title="A sample page"
><![CDATA[<?xml version='1.0'?>
<page>
  <meta>
    <title>Managing web site content with XML</title>
    <author>Diederik van der Boor</author>
    <created>19 september 2005</created>
    <modified/>
    <abstract>A different way to create web pages with XML.</abstract>
  </meta>

  <section>
    <title>Introduction</title>
    <par>
      Many static web pages are generated with PHP and MySQL.
      Static content can also be stored as XML,
      which is what this site does.
    </par>
  </section>
</page>]]></config>
    <par>
      <link href="index.xml">this entire article</link> is written that way.
    </par>

    <subtitle>Adding some ingrediets</subtitle>
    <sidenote title="Linux scripting">
      The <file>Makefile</file> of this web site currently works in Linux only.
      It's each to create a file (or script) that supports other platforms as well though.
    </sidenote>
    <par>
      To HTML is generated by:
    </par>
    <list>
      <item>A <link href="/resources/xsl/codingdomain.xsl">XSLT transformation sheet</link>.</item>
      <item>A <link href="http://xmlsoft.org/XSLT/xsltproc.html">XSLT processor</link> (installed by default on Linux).</item>
      <item>A <link href="/resources/scripts/Makefile.site">Makefile</link> to start the XSLT processor.</item>
    </list>
    <par>
      And finally, the web site is styled with a <link href="/resources/css/codingdomain.css">CSS stylesheet</link>.
    </par>


    <title>Inventing new tags</title>
    <par>
      The beauty of this system is inventing new tags. For example:
    </par>

    <shell><![CDATA[
<par>
  The <file>Makefile</file> runs <command>xsltproc</command> to start the conversion.
</par>

<image src="conversion-small.png" largesrc="conversion.png" width="200" height="150" alt="">A caption</image>

<shell title="Uploading data">make upload   <comment># sends the files</comment></shell>]]></shell>
    <par>
      This saved me a lot of headaches in a WYSIWYG editor ;-)
    </par>
    <par>
      Unfortunately, getting from here to an interactive site is challenging - not impossible however, mind you!
    </par>
    <par>
      Therefore, my next version will be written in <link href="http://www.djangoproject.com/">Django</link>.
      It's a good tool for meshing concepts together, in a consistent look. 
    </par>
  </section>

</page>
