[Yanel-dev] New XMLDB repository

Michael Wechner michael.wechner at wyona.com
Mon Feb 12 22:43:35 CET 2007


Andreas Wuest wrote:

> Hi
>
> On 12.2.2007 21:02 Uhr, Michael Wechner wrote:
>
>> This is also because one should use application/xml and not text/xml
>
>
> No, the reason is the following:


thanks for clarifying, but let me make sure that I understand what that 
means:

mime-type=text/xml but no charset

AND

<?xml encoding="UTF-8"?>

means encoding="us-ascii", right?

But in the case of mime-type=application/xml the XML declaration is 
authoritative also when the charset header is missing?

Or otherwise can you give some examples to really understand what 
sentence below actually means?

Thanks

Michi

>
> "Authors should also be aware of the difference between
> 'application/xml' (and for that matter 'application/xhtml+xml' as well)
> and 'text/xml' with regard to the treatment of character encoding.
> According to "3.1 Text/xml Registration" of
> [RFC3023],
> if a text/xml entity
> is received with the charset parameter omitted, MIME processors and XML
> processors MUST use the default charset value of
> "us-ascii"[ASCII].
> This default value is authoritative over the encoding information
> specified in the XML declaration, or the XML default encodings of
> UTF-8 and UTF-16 when no encoding declaration is supplied, so omitting
> the charset parameter of a 'text/xml' entity might cause an unexpected
> result.
> As mentioned in [RFC3023], the use of the charset
> parameter is STRONGLY RECOMMENDED."
>
> HTH.
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management   -    Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner at wyona.com                        michi at apache.org
+41 44 272 91 61




More information about the Yanel-development mailing list