[Home] [By Thread] [By Date] [Recent Entries]

  • From: Andrew Welch <andrew.j.welch@g...>
  • To: "Costello, Roger L." <costello@m...>
  • Date: Fri, 28 Dec 2012 12:29:40 +0000

Hi Roger,

> Its encoding can be changed to another encoding using this simple XSLT program:
> ---------------------------------------------------
> <?xml version="1.0"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                            version="1.0">
>
>     <xsl:output method="xml"
>                          encoding="Shift_JIS"/>
>
>     <xsl:template match="node()|@*">
>         <xsl:copy>
>             <xsl:apply-templates select="node()|@*"/>
>         </xsl:copy>
>     </xsl:template>

For what its worth, you could just do:

<xsl:template match="/">
  <xsl:copy-of select="."/>

as there is no need to process the input a node at a time.

Also, you might be interested in this post the other day about "node()
| @*" vs "@* |  node()" vs "@*, node()":

http://markmail.org/message/srnwfokgwqnsmcwx

(see Mike's reply too)



-- 
Andrew Welch
http://andrewjwelch.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member