| XDC - v. 0.6.1 | |||||
PREV FILE NEXT FILE | FRAMES NO FRAMES |
<xsl:stylesheet version="1.0"> <xsl:import href="util.xsl"/> </xsl:stylesheet>
Parameter Summary |
---|
<xsl:param name="configuration"/>
The |
Template Summary |
---|
<xsl:template match="/" mode="config.getValueFromConfig"> <xsl:param name="tableName"/> <xsl:param name="key"/> <xsl:param name="default"/> </xsl:template> This template is used to retrieve a value for a given key from a list of tables of key-value pair entries which is passed to the stylesheet as a global parameter. |
<xsl:template match="/" mode="config.getConfigValue"> <xsl:param name="tableName"/> <xsl:param name="key"/> <xsl:param name="default"/> </xsl:template> This template is merely a workaround for an MSXSL bug. |
<xsl:template match="/|*" mode="config.getPiValue"> <xsl:param name="key"/> <xsl:param name="default"/> <xsl:param name="forceDefault"/> </xsl:template> This template is used to extract a configuration parameter from a processing instruction (named "xdc") within the source file. |
<xsl:template match="/|*" mode="config.getValue"> <xsl:param name="tableName"/> <xsl:param name="key"/> </xsl:template> This template retrieves a configuration value from either the XML file or the XDC configuration or a set of default values according to the following rules (first rule satisfied applies). |
<xsl:template match="/|*" mode="config.getDictionaryValue"> <xsl:param name="key"/> </xsl:template> This template retrieves a dictionary value from either the XML file or the XDC configuration. |
<xsl:template match="/|*" mode="config.getPatternValue"> <xsl:param name="key"/> </xsl:template> This template retrieves an XPath pattern value (i.e. |
Parameter Detail |
---|
<xsl:param name="configuration"/>
The configuration
stylesheet parameter may be passed to the
stylesheet processing an XML file. It is expected to be a DOM element
containing subelements named entry
with a (required)
attribute named key
and an (optional) attribute named
value
.
Template Detail |
---|
<xsl:template match="/" mode="config.getValueFromConfig"> <xsl:param name="tableName"/> <xsl:param name="key"/> <xsl:param name="default"/> </xsl:template>
This template is used to retrieve a value for a given key from a list of tables of key-value pair entries which is passed to the stylesheet as a global parameter.
table
- The name of the table containing <entry>
subelements with key-value pairs (realized as <key>
resp. <value>
subelements). If omitted, the table name "config" is used as the default.key
- The key for which the value is retrieved from the given tabledefault
- A default value which is "returned" if either the table parameter is not set or does not contain a key-value pair with the given key
<xsl:template match="/" mode="config.getConfigValue"> <xsl:param name="tableName"/> <xsl:param name="key"/> <xsl:param name="default"/> </xsl:template>
This template is merely a workaround for an MSXSL bug. It provides a
simple indirection for the unnamed template with
mode="config.getValueFromConfig"
.
<xsl:template match="/|*" mode="config.getPiValue"> <xsl:param name="key"/> <xsl:param name="default"/> <xsl:param name="forceDefault"/> </xsl:template>
This template is used to extract a configuration parameter from a
processing instruction (named "xdc") within the source file. These
parameters may be specified in the form
<?xdc key1="value1" key2="value2" ... ?>
.
key
- The key of the configuration parameter to be readdefault
- A default value which is returned if the specified key is not set in an "xdc" processing instruction (or if it is forced by the forceDefault
parameter)forceDefault
- If this equals 1, it forces this template to return the default value (unless no default is specified).
<xsl:template match="/|*" mode="config.getValue"> <xsl:param name="tableName"/> <xsl:param name="key"/> </xsl:template>
This template retrieves a configuration value from either the XML file or the XDC configuration or a set of default values according to the following rules (first rule satisfied applies).
key
- The key for which a value is to be retrieved.
<xsl:template match="/|*" mode="config.getDictionaryValue"> <xsl:param name="key"/> </xsl:template>
This template retrieves a dictionary value from either the XML file or the XDC configuration.
key
- The key for which a value is to be retrieved.
<xsl:template match="/|*" mode="config.getPatternValue"> <xsl:param name="key"/> </xsl:template>
This template retrieves an XPath pattern value (i.e. a valid HTML link) from either the XML file or the XDC configuration.
key
- The key for which a value is to be retrieved.
| XDC - v. 0.6.1 | |||||
PREV FILE NEXT FILE | FRAMES NO FRAMES |