For a XalanJ-specific solution, have a look at the evaluate extension function.
http://xml.apache.org/xalan-j/extensionslib.html#evaluate Gary > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Monday, November 26, 2001 12:29 PM > To: [EMAIL PROTECTED] > Subject: Possible to parameterize <xsl:output encoding>? > > > Hi... > > I've been toying with some stylesheets and i was > thinking it would be very nice to be able to pass in a > parameter to control what the output encoding of a transform > would be, but i can't seem to get it to work... I've tried > the following but the version i'm using (xalan 1.0.1, > admittedly quite old) doesn't seem to do any variable > evaluation for the encoding attribute; i always get an error > with whatever the variable string is saying "i don't know > that encoding". Is this prohibited? have i just got the > wrong syntax? > > <xsl:param name="output_enc" select="'iso-8859-1'"/> > <xsl:output encoding="$output_enc"/> > > <xsl:param name="output_enc" select="iso-8859-1"/> > <xsl:output encoding="$output_enc"/> > > <xsl:param name="output_enc" select="'iso-8859-1'"/> > <xsl:output encoding="{$output_enc}"/> > > <xsl:param name="output_enc" select="iso-8859-1"/> > <xsl:output encoding="{$output_enc}"/> > > > Thanks > -mark > > > >
