Most of the Rexsel syntax uses familiar keywords that have a direct analogue within XSLT. However, there are certain restrictions and enhancements which, while not onerous, must be borne in mind when writing Rexsel stylesheets.
Templates in XSLT can be either a named or pattern match template. The former is effectively a procedure/macro that can be called from elsewhere in the stylesheet, while match is a means of matching the input against a pattern. Rexsel explicitly distinguishes between these two types by using different keywords: 'proc' and 'match'.
Having a distinction between 'proc' and 'match' ensures that there is never confusion and fulfils the requirement that the 'name' and 'match' attributes should never occur together in a <xsl:template> tag.
As an example, the 'match' below matches the input against the XPath 'p' within the scope (mode) of inline-text.
This would translate to
Procedures are simpler
would translate to
This proc could be called as
As an aside, note the use of names and string above. In general items that will appear in the output after XSLT processing is held within quote marks, while items such as proc names that are used by the XSLT processor do not.
Within 'match' templates there is concept of mode which defines a context or scope for that match (see example above). Rexsel uses the 'scope' keyword which, I believe, more accurately describes the concept.
When describing text strings it is important to "escape" control characters such as '\'.
When not a simple piece of text, such as in 'attribute', text must be entered using the 'text' keyword. For example
would have to be written as
or as
Rexsel does not allow "naked" non-XSLT elements. For example if the XSLT contained
this would have to be written in Rexsel as