Thank you for your answer. It helps a bit but it's not quite what I was
looking for. I was thinking about something like the initialMode
parameter that one can pass to Saxon for example in order to
process the only a mode from all those defined in the stylesheet.
I tried to find the same feature in Xalan, but with no luck so far.

Matei Florescu


On Wed, 12 Oct 2005 21:07:02 +0300, Erin Harris <[EMAIL PROTECTED]> wrote:

Do you want to be able to change the mode from the command line or from
Java?  If so you could try something like the following where the
parameter "mode" can be set through the PARAM command line option or by
calling Transformer.setParameter(String name, Object value) from Java:

<xsl:param name="mode" select="'A'"/>

<xsl:template match="/">
    <xsl:choose>
        <xsl:when test="$mode='A'">
            <xsl:apply-templates mode="A"/>
        </xsl:when>
        <xsl:otherwise>
            <xsl:apply-templates mode="B"/>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>


Erin Harris





"Matei Florescu" <[EMAIL PROTECTED]>
10/12/2005 08:49 AM

To
[email protected]
cc

Subject
Mode processing question






Hello,

  I have a XSL stylesheet with templates defined in multiple modes. How
can I get
Xalan to process templates with single mode in a transformation?
Ex. I have templates with mode="A" and mode="B", and I want to apply only
those
with mode="A".




--
Matei Florescu

Reply via email to