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

Křištof Želechovski giecrilj at stegny.2a.pl
Wed Aug 15 11:43:18 PDT 2007


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 at 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/





More information about the whatwg mailing list