Mode processing question 2005-10-13 - By Matei Florescu
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 <eharris@(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" <matei.florescu@(protected)> > 10/12/2005 08:49 AM > > To > xalan-j-users@(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
|
|