xsl-list
[Top] [All Lists]

RE: [xsl] conditionally outputting with different encodings

2006-10-19 14:24:52
3 suggestions:

The JAXP interface allows you to override xsl:output settings from the
application.

Saxon allows you to do so from the command line (add !encoding=xyz).

In XSLT 2.0 you can use <xsl:result-document encoding="{$param}"/> 

Michael Kay
http://www.saxonica.com/

-----Original Message-----
From: Stephen Ciscola [mailto:cravenblackbird(_at_)yahoo(_dot_)com] 
Sent: 19 October 2006 20:14
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] conditionally outputting with different encodings

Hi!

I'm transforming a number of xml documents into html.
They're all exactly the same, except that their encoding can vary.

What i want to do be able to do is use the same stylesheet 
for each one, just telling the processor to output to 
encoding xxx conditionally, based on whatever the encoding of 
doc being transformed is.

I don't see anyway to do this however.. I wish I could just 
do something as simple as this, and pass the processor a 
parameter each transform:

<xsl:param name="target_enc" select="'Shift_JIS'"/> 
<xsl:ouput method="html" encoding="{$target_enc}" />

But that appears unsupported.

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.

Any help appreciated, this is for xslt 1.0 I should add.

thanks!
S.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection 
around http://mail.yahoo.com 

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



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