Real Examples of Rexsel
The following are examples of Rexsel code. The first is the source code for this site.
Scripts for Rexsel Site
This site uses a Paloose sitemaps to translate XML pages to HTML delivered to the browser. As part of this process there are a set of
XSLT scripts to provide the translation. Rather than define these scripts in XSLT the site uses Rexsel. The sitemap scrap is
<map:match pattern="**.html">
<map:aggregate element="root" label="aggr-content">
<map:part src="cocoon:/headings.xml" element="headings" strip-root="true"/>
<map:part src="cocoon:/menus.xml" element="menus" strip-root="true"/>
<map:part src="cocoon:/newsArticles.xml" element="news-articles" strip-root="true"/>
<map:part src="cocoon:/{1}.xml" element="content" strip-root="true"/>
</map:aggregate>
<map:transform src="context://resources/transforms/page2xhtml.xsl" label="page-transform">
<map:parameter name="page" value="{1}"/>
</map:transform>
<map:transform type="scss" label="scss-content"/>
<map:serialize type="xhtml"/>
</map:match>
Within the match the transform 'page2xhtml.xsl' provides all the necessary to convert the XML into XHTML. The
Rexsel source file for this is 'page2xhtml.rxsl'.
Copyright 2024 Hugh Field-Richards. All Rights Reserved.