About | How it works | Examples | Download | Author


This application for offline generation. From xml documents by xslt transformation.

How to run
Directory structure
How to make self pages

How to run

To generate run script generateSite.py in directory bin. Output are stored in directory output.

You can use other XSLT application - modify XSLT.py file.

Directory structure

Dir structure:

  bin/ - script for generation
  content/ - content for site
      common.xml - common information 
                   about site: year, name, email
      news.xml - news of site, are showed
                 on first page
      pages.xml - list of site's pages
    pages/ - directory with page's content
      fp.xml - first page
      about.xml - this page :)
        pages2text.xsl - xslt for load array pageId in
      fp-page.xsl - xslt for first page
      site-page.xsl - xslt for any other page
  include/ - py classes
  output/ - here are stored generated pages

How to make self pages

To make self page, you must:

Create xml-content for page. F.e. I want to add page 'Poems':

  1. add to file pages.xml (in dir 'db-xml') - <page id="poems" name="Poems" descr="My Poems"/> inside tag <pages> (in this case page will be on top) or inside any <page>.
  2. create poems.xml in dir /content/pages/. f.e.
    <?xml vesrion="1.0"?>
    <p>This is my poem</p>
  3. it all. Run generateSite.py
  4. Next step if you want to add specific tags, f.e. <myTagInPoemPage/>:
    <?xml vesrion="1.0"?>
    <p>This is my poem.
    in this case you must to write xslt-transformation for this tag in file site-page.xsl (content/xslt) f.e.
    <xsl:template match="myTagInPoemPage" mode="content">
    <xsl:text>to be or not to be</xsl:text>
  5. it all. Run generateSite.py
  6. Next step (or first) - changing desing - change site-page.xsl and fp-page.xsl files.
  7. Next steps - you can add you specific pages classes as PageFP, but this is other story :)...


2003, xmlSiteMakerPy, inem@hotbox.ru on top page | How it works >>

SourceForge.net Logo