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 |
|
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
