W3C home > Mailing lists > Public > whatwg@whatwg.org > August 2007

[whatwg] Serialising HTML to Files in Non-Unicode Encodings

From: Křištof Želechovski <giecrilj@stegny.2a.pl>
Date: Wed, 15 Aug 2007 20:43:18 +0200
Message-ID: <000801c7df6c$2aa24c90$4d01010a@IBM42F76C011DF>
You can store additional information in the resource fork and the fragment
in the data fork.  The server must be configured to accept such fragments;
the server configuration should specify how these fragments should be used
and interpreted.  It need not involve modifying the fragment.  The
recommendations are about universal things that do not depend on the use
case but can be applied to different situations in a portable way.  Since
the ability to handle HTML fragments is completely server-specific, I do not
see much point in making provisions for such a situation in the
recommendation.
If you insist on storing your fragments as well-formed HTML, there is
nothing to prevent you from doing it: you can embed the fragment as the only
child of the document body and extract it from there.  However, I still
think it is impractical.
Best regards
Chris

-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Lachlan Hunt
Sent: Wednesday, August 15, 2007 6:40 PM
To: K?i?tof ?elechovski
Cc: 'whatwg'
Subject: Re: [whatwg] Serialising HTML to Files in Non-Unicode Encodings

K?i?tof ?elechovski wrote:
> Any serializer that needs an exotic character set should also have a way
of
> retrieving the character set.  This character set need not be specified
> within the fragment stored because it would probably be the same for many
> fragments.  The serializer should rather store it elsewhere without
> modifying the original HTML text: as a record attribute, a column
property,
> an optional parameter or built-in configuration parameter.

That doesn't work if the serialiser is saving it as a file that is 
intended to be viewed from the local file system, or put onto a server 
where the author can't (or doesn't know how to) configure the 
Content-Type header properly.  It depends entirely on the use case and 
environment for which the serialiser is designed and configured.

-- 
Lachlan Hunt
http://lachy.id.au/
Received on Wednesday, 15 August 2007 11:43:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:36 UTC