XSPP program is a list of declarations.
Is used to set 'encoding' attribute in
<?xml ...>.
'template'
match-string
[ attributes ]
'{' actions '}'
|
is translated into:
<xsl:template
match="match-string" attributes>
actions </xsl:template>
|
'def'
name
'('
arg-1 '=' simple-action-1
','
...
','
arg-N '=' simple-action-N
')'
[ attributes ]
'{' actions '}'
|
is translated into:
<xsl:template
name="name" attributes>
<xsl:param name="arg-1">simple-action-1</xsl:param>
...
<xsl:param name="arg-N">simple-action-N</xsl:param>
actions </xsl:template>
|
N >= 0.
is translated into:
'var'
name
'='
simple-action
|
is translated into:
<xsl:variable name="name">simple-action</xsl:variable>
|
'variable' can be used instead of 'var'.
'mode'
name
'{'
declarations
'}'
|
Set default mode for declarations. It applies to
'template' and 'apply'. Mode can be always
overridden with explicit 'mode="..."' setting.
'macro'
name
'('
arg-1 '=' simple-action-1
','
...
','
arg-N '=' simple-action-N
')'
'{' actions '}'
|
Define macro named name. Arguments can be referred to
with 'macro-arg' command. Macro can be called
with '%' command.
simple-action is either a quoted string,
a-, e- or v-quotation or list
of zero or more actions enclosed in '{' and
'}'.
action is either simple-action, markup or
one of things below.
Quoted strings and markup are copied into output as is.
is translated into:
<xsl:apply-templates attributes/>
|
'{ }' can be used instead of ';'.
'%' name attributes
'{' actions '}'
|
is translated into:
<name attributes>actions</name>
|
'%' name
'('
arg-1 '=' simple-action-1
','
...
','
arg-N '=' simple-action-N
')'
|
Call macro name.
name
'('
arg-1 '=' simple-action-1
','
...
','
arg-N '=' simple-action-N
')'
|
is translated into:
<xsl:call-template
name="name" attributes>
<xsl:with-param name="arg-1">simple-action-1</xsl:with-param>
...
<xsl:with-param name="arg-N">simple-action-N</xsl:with-param>
</xsl:call-template>
|
N >= 0.
is translated into:
<xsl:text disable-output-escaping="yes">
&name;
</xsl:text>
|
If you know better way to insert into output, let me
know ;) D is delimeter.
is translated into:
<xsl:text disable-output-escaping="yes">
text
</xsl:text>
|
text is quoted. I.e. <, > and & are replaced
with <, > and & respectively.
Same as 'macro-arg'.
is translated into:
<xsl:value-of select="name"/>
|
Same as 'e{nbsp}'.
Refer to macro argument name.
'redirect' name
[ attributes ]
'{' actions '}'
|
Use xalan redirect extension to redirect output to file
name.
'if' test [ attrs ]
'{' actions '}'
[
'else'
'{' actions '}'
]
|
is translated into:
<xsl:if test="test" attrs>
actions
</xsl:if>
|
If there is 'else' part, it is translated into
'<xsl:choose ...>' appropriately.
'choose' [ attrs ]
'{' when-clauses '}'
|
is translated into:
<xsl:choose attrs>
when-clauses
</xsl:choose>
|
when-clause is one of 'when "foo" { ... }'
or 'otherwise { ... }' ('else' can be used instead
of 'otherwise').
Same as var declaration.
'for-each' select
[ attrs ]
'{' actions '}'
|
is translated into:
<xsl:for-each select="select" attrs>
actions
</xsl:for-each>
|