xsl-list
[Top] [All Lists]

Re: [xsl] (Auto-)detecting which XML encoding is necessary/required ?

2007-12-27 10:57:15
"Ben" == Ben Stover <bxstover(_at_)yahoo(_dot_)co(_dot_)uk> writes:

    Ben> Sometimes the situation occurs that an XML document does not
    Ben> fit to its own encoding setting in the first line.  Is there
    Ben> a way to find out the best/necessary/required encoding
    Ben> setting for an XML doc resp. what I have to write in the
    Ben> first line:

    Ben> <?xml version="1.0" encoding="iso-8859-1"?>

    Ben> or

    Ben> <?xml version="1.0" encoding="UTF-8"?>

    Ben> or simply

    Ben> <?xml version="1.0"?>

Just write:

<xsl:output method="xml" encoding="UTF-8"/>

and the XSLT processor will ensure both that the correct XML
declaration is written, and that the document is produced in the
correct encoding.
-- 
Colin Adams
Preston Lancashire

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