You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2003/02/20 19:30:15 UTC
cvs commit: xml-cocoon2/src/blocks/python/samples hello.xsp
stefano 2003/02/20 10:30:15
Added: src/blocks/python/conf python.samplesxpipe
src/blocks/python/samples hello.xsp
Removed: src/blocks/python python.samplesxpipe
Log:
Refactoring Samples
Revision Changes Path
1.1 xml-cocoon2/src/blocks/python/conf/python.samplesxpipe
Index: python.samplesxpipe
===================================================================
<?xml version="1.0"?>
<samplesxpipe xpath="/sitemap/pipelines/pipeline[@id='optional']"
unless="match[@pattern='xsp-py/*']">
<!-- XSP pages written in Python -->
<map:match pattern="xsp-py/*">
<map:generate type="serverpages" src="docs/samples/xsp-py/{1}.xsp">
<map:parameter name="programming-language" value="python"/>
</map:generate>
<map:transform src="stylesheets/dynamic-page2html.xsl">
<map:parameter name="view-source" value="docs/samples/xsp-py/{1}.xsp"/>
</map:transform>
<map:serialize/>
</map:match>
</samplesxpipe>
1.1 xml-cocoon2/src/blocks/python/samples/hello.xsp
Index: hello.xsp
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsp:page language="python" xmlns:xsp="http://apache.org/xsp">
<page>
<title>Hello from XSP page in Python</title>
<para>
<b>This</b> is my first <b>Cocoon</b> page!
</para>
<xsp:element>
<xsp:param name="name">para</xsp:param>
With the help of XSP and Python!
</xsp:element>
<para>
<xsp:logic>
align = "center";
<p>
<xsp:attribute name="align"><xsp:expr>align</xsp:expr></xsp:attribute>
<xsp:logic>
msg = "Executed at: "
import time
now = time.asctime(time.localtime())
<xsp:content>
Executed at:
<xsp:expr>now</xsp:expr>
</xsp:content>
</xsp:logic>
</p>
</xsp:logic>
</para>
</page>
</xsp:page>
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org