xsl-list
[Top] [All Lists]

[xsl] name of the current mode

2009-11-14 14:26:04
Hello,

is there any way to detect the name of the current mode during the
processing of the input document? I tried a approach over several
matching templates for each mode:

<xsl:function name="test:detect-mode">
        <xsl:variable name="temp_element" as="element()">
                <test:detect/>
        </xsl:variable>
        <xsl:apply-templates select="$temp_element" mode="#current"/>
</xsl:function>

<xsl:template match="test:detect" mode="#default">#default</xsl:template>
<xsl:template match="test:detect" mode="Mode_A">Mode_A</xsl:template>
<xsl:template match="test:detect" mode="Mode_B">Mode_B</xsl:template>
<xsl:template match="test:detect" mode="#all"
priority="-1">#not_detected</xsl:template>

Unfotunately, this only works if I know all possible modes in advance.

Best regards,

Stefan


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>