|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: conditionally outputting with different encodings
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@xxxxxxxxx]
> Sent: 19 October 2006 20:14
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








