xsl-list
[Top] [All Lists]

Re: [xsl] conditionally outputting with different encodings

2006-10-19 12:23:44

In xslt2 you have more flexibility but in 1.0 you may need to use
multiple stylesheets. 

  Right now I'm using numerous stylesheets, with only
  one element changed, <xsl:output encoding="xxx" ..../>
  which really seems like quite a kludge, and is a
  hassle to keep them synced. The style sheets all use
  the same encoding, Shift_JIS.

The stylesheets don't need to be copies that you need to keep in sync,
they just need to be 2 line stylesheets that 
a) set the output encoding and b) xsl:import the stylesheet that does
the work.

Alternatively to using these wrapper stylesheets many xslt 1 engines will
allow the encoding to be specified in the API that's calling the
transform, effecively overriding the xsl:output attributes.
details depend on the xsl engine and api of course.

David

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