Giter Site home page Giter Site logo

xwg's Introduction

=====
 XWG
=====

XWG is a simple web site generator based on XSLT.  It creates (X)HTML
pages from XML files together with a menu tree and bread crumb line.

Requirements
============

In order to build the static (X)HTML sites a XSLT 1.0 processor is
needed.  The authors recommend xsltproc
(xmlsoft.org/XSLT/xsltproc.html).

How to build the static sites
=============================

Every XHTML file is generated from the corresponding XML file, which
has the same file name but .xml as file name extension instead of
.xhtml .  To create the static XHTML files run

  $ make

This uses the XSLT processor and the chosen XSLT style sheet to
transform every .xml file into a .(x)html file.  See the Makefile for
details on the output format and the used XSLT style sheet.

Instead of using an external XSLT processor to generate the sites one
can also just view the sites using a web browser with integrated XSLT
1.0 processor, e.g. firefox.  In order to do so simply open index.xml
(or any other .xml file) with your browser.  In this case the default
style sheet, which is written in the XML file, is used.

Adding XML pages
================

Any XML file contains a 'data' tag whose content is copied into the
output (X)HTML page.  Therefore the 'data' tag has to contain valid
(X)HTML code.  Furthermore the 'data' tag must have a 'filename'
attribute containing the name of this .xml file.

For example, a simple XML file 'page.xml' might look like this:

   <?xml version="1.0" encoding="UTF-8"?>
   <?xml-stylesheet type="text/xsl" href="system-xhtml11.xsl" ?>
   <data filename="page.xml" xmlns="http://www.w3.org/1999/xhtml">
     <h2>Page</h2>
     <p>
       This is a page.
     </p>
   </data>

Here 'system-xhtml11.xsl' is the default XSLT style sheet and
xmlns="http://www.w3.org/1999/xhtml" is the XHTML namespace which is
needed in case of an XHTML output file.

Menu tree
=========

The file menu.xml contains the information on the menu structure,
i.e. how the sites are arranged to each other.  All pages that should
appear in the menu must be listed here.  See menu.xml for more details
and an example.

COPYING
=======

XWG Copyright (C) 2011 Alexander Voigt
<[email protected]>

This file is part of XWG.

XWG is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your
option) any later version.

XWG is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with XWG.  If not, see <http://www.gnu.org/licenses/>.

xwg's People

Contributors

gregor-mittag avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.