Tree [303f34] master /
History



File Date Author Commit
admin 2010-12-28 alain-couthures alain-couthures [a83e9c] SVN transfer
build 2 days ago Alain Couthures Alain Couthures [303f34] Dynamic @xsi:type, itemset and console improvem...
jsunittest 2010-12-28 alain-couthures alain-couthures [a83e9c] SVN transfer
scripts 2011-10-28 alain-couthures alain-couthures [905cf1] TinyMCE Integration
src 2 days ago Alain Couthures Alain Couthures [303f34] Dynamic @xsi:type, itemset and console improvem...
testsuite 2014-02-23 Alain Couthures Alain Couthures [6160b5] 1.0RC2
txs 2 days ago Alain Couthures Alain Couthures [303f34] Dynamic @xsi:type, itemset and console improvem...
wiky 2010-12-28 alain-couthures alain-couthures [a83e9c] SVN transfer
.htaccess 2014-02-23 Alain Couthures Alain Couthures [6160b5] 1.0RC2
lgpl-2.1.txt 2010-12-28 alain-couthures alain-couthures [a83e9c] SVN transfer
readme.txt 2010-12-28 alain-couthures alain-couthures [a83e9c] SVN transfer

Read Me

XSLTForms Source Management
=====================

1. Source files
----------------

XSLTForms is composed of the following files :

"xsltforms.xsl"
"xsltforms.js"
"xsltforms.css"

Those files are relatively big and complex. They are generated from numerous
components.


2. Components
-----------------

Components are elementary source elements. Each is stored as an XML document
with metadata, unit tests and the source itself.

Components can be composed of other components.

The main components for XSLTForms are :

"xsltforms.xsl.xml"
"xsltforms.js.xml"
"xsltforms.css.xml"


3. tXs
------

tXs is an XML script engine written in PHP 5. It is composed of an unique file
named "txs.php" while scripts usually have a ".txs" extension.

First, install Apache+PHP5 locally, and activate the Rewrite Module.

Get all the XSLTForms files from SVN server into a subfolder (named
"XSLTFormsRoot" for example) of the DocumentRoot folder (a ".htaccess" file
should be present in the "XSLTFormsRoot" folder).

To check that tXs is correctly installed, get
"http://localhost/XSLTFormsRoot/txs/txs.php" with a browser : the default
script, named "echo.txs" should run and the response should be an XHTML page
with "tXs Echo Script" as title.

To check that URL rewriting is correctly installed, get
"http:/localhost/XSLTFormsRoot/txs/echo.txs" with a browser : the response
should be an XHTML page with "tXs Echo Script" as title.


4. Dynamic build of XSLTForms files
-----------------------------------------

Because of URL rewriting, .js, .xsl and .css files are not directly delivered.
Instead, the "cm.txs" script is run : it collects every source within the
corresponding component and sub-components. For the browser, it's exactly as
if it was a real file.

So, main files are obtains with URLs like those :
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.xsl"
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.js"
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.css"


5. Static build of XSLTForms files
-------------------------------------

To build a component, just add "?build" at the end of the
component URI. The resulting file is written in the "build" folder at the
same level as the "src" folder.

So, main files are built with URLs like those :
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.xsl?build"
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.js?build"
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.css?build"


6. Unit tests
--------------

Unit tests are based on JsUnitTest (http://jsunittest.com/).

To run associated unit tests for a component, just add "?ut" at the end of the
component URI.

Examples :
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.js?ut"
"http://localhost/XSLTFormsRoot/trunk/src/xsltforms.xsl?ut"
"http://localhost/XSLTFormsRoot/trunk/src/js/types/TypeDefs.js?ut"


7. Test Suites
---------------

Test Suites are stored separately from components in the "testsuite" folder.

To run tests with trunk or branches components, the "testsuite" path has to be
added after the "src" path to main components ("xsltforms.*.xml").
tXs scripts are there to adapt each test to XSLTForms requirements (add the
processing instruction for the XSLT transformation, change the submission
links, ...).

Examples :
"http://localhost/XSLTFormsRoot/trunk/src/testsuite/Xforms1.1/Edition1/driverPages/html/"
"http://localhost/XSLTFormsRoot/trunk/src/testsuite/Xforms1.1/Edition1/Chapt02/2.4.a.xhtml"


8. Feature switching
----------------------

Feature switching is based on files named "*-options.xml" to be placed in the
same folder as main components ("xsltforms.*.xml"). Options are processing
instructions to add in the XML document to permit the XSLT transformation to
interpret them.

Example :
"http://localhost/XSLTFormsRoot/trunk/src/nocss-options.xml".

Then, "/*-options" has to be put just before "/testsuite" in the URL to
activate the corresponding options.

Example :
"http://localhost/XSLTFormsRoot/trunk/src/nocss-options/testsuite/Xforms1.1/Edition1/Chapt02/2.4.a.xhtml"