Support for Jasmin

Since Stubbles 1.1.0.

Stubbles provides XSL templates for using Jasmin natively.

Prerequisites

Jasmin should be installed in projects/$PROJECT/docroot/jasmin.

Using Jasmin XSL templates

The jasmin namespace xmlns:jasmin="http://bovigo.org/jasmin" needs to be added to the namespace declaration list of the XSL document in which Jasmin XSL templates should be used:

<stub:document 
  xmlns:stub="http://stubbles.net/stub" 
  xmlns:variant="http://stubbles.net/variant"
  xmlns:jasmin="http://bovigo.org/jasmin"
  xmlns:ixsl="http://www.w3.org/1999/XSL/Transform" 
  exclude-result-prefixes="stub ixsl" 
  method="xml" 
  omit-xml-declaration="yes" 
  doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" 
  doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

</stub:document>

Now you can make use of the Jasmin XSL templates. To load the stylesheet files use the following:

<jasmin:style>
  <jasmin:source>example</jasmin:source>
  <jasmin:source>ingrid</jasmin:source>
  <jasmin:source>stageassistant</jasmin:source>
</jasmin:style>

This will generate a stylesheet tag which looks like this: <link rel="stylesheet" type="text/css" href="/jasmin/__all__/style/def/lead/example+ingrid+stageassistant.css" />

For JavaScript files use jasmin:script:

<jasmin:script>
  <jasmin:source>example</jasmin:source>
  <jasmin:source>stageassistant</jasmin:source>
</jasmin:script>

This will generate a script tag which looks like this: <script type="text/javascript" src="/jasmin/__all__/script/def/lead/example+stageassistant.js"></script>

Both the Jasmin script and style tags support the pageOnly attribute. If set to true it will use the name of the current page instead of ___all___ within the generated Jasmin URL:

<jasmin:style pageOnly="true">
  <jasmin:source>example</jasmin:source>
  <jasmin:source>ingrid</jasmin:source>
  <jasmin:source>stageassistant</jasmin:source>
</jasmin:style>

Suppose the name of the current page is Imprint the generated stylesheet tag looks like this: <link rel="stylesheet" type="text/css" href="/jasmin/Imprint/style/def/lead/example+ingrid+stageassistant.css" />

Please note that the order of the single source elements matter: they determine the order in which the stylesheet or Javascript contents will appear in the document generated by Jasmin.