Index of /rep/ssx

[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[   ]README30-Nov-2008 20:22 1.7K 
[TXT]README.html30-Nov-2008 20:22 7.7K 
[TXT]__init__.py30-Nov-2008 20:22 82  
[   ]ajax.js30-Nov-2008 20:22 2.2K 
[   ]example.php30-Nov-2008 20:22 582  
[   ]ssx-lib.xslt30-Nov-2008 20:22 2.0K 
[TXT]ssx.css30-Nov-2008 20:22 432  
[   ]ssx.php30-Nov-2008 20:22 1.5K 
[TXT]ssx.py30-Nov-2008 20:22 3.1K 
[   ]ssx.xml30-Nov-2008 20:22 329  
[   ]ssx.xslt30-Nov-2008 20:22 3.9K 
[TXT]ssxcgi.py30-Nov-2008 20:22 3.1K 

Server Side XSLT

What is it?

Background

This project was created in the middle of 2006 as php server-side transformation helper. Then python helper was created and finally all script-specific work was abandoned since I migrated to based web-applicatoins.

Now

SSX is a simple set of XSL templates that simplify XHTML output

Usage

Simple variant

When You don't bother with domain-specific extensions or local templates you have only to point xslt engine to ssx.xslt

<?xml version='1.0' encoding='utf-8'?>
<div>
  <h1>Header</h1>
  Body
</div>

XHTML with ssx tags

If you want to use some templates defined in ssx.xslt add xmlns:ssx declaration with namespace http://asp.mexmat.net/xmlns/ssx

<?xml version='1.0' encoding='utf-8'?>
<div xmlns:ssx='http://asp.mexmat.net/xmlns/ssx'>
  <h1>Error</h1>
  <ssx:error>Error message</ssx:error>
  Body
</div>

XHTML with local tags

If you have your local namespace but still want to use ssx you must add line

<xsl:import href='path-to-ssx/ssx.xslt'/>

and then point xslt engine to yours xsl file.

<?xml version='1.0' encoding='utf-8'?>
<items xmlns='urn:example.com:webapp'>
  <item id='1'>Item 1</item>
  <item id='2'>Item 2</item>
</items>

Source

Source is browsable via gitweb http://psha.org.ru/git/?p=ssx/.git or may be downloaded with

git clone git://psha.org.ru/ssx

Reference

  1. [WSGI] http://www.python.org/dev/peps/pep-0333/