W3C home > Mailing lists > Public > www-html-editor@w3.org > April to June 2004

Re: XP> xhtml-print: RFC3391 interpretation question: how much visual sep aration ends a chunk?

From: Michael Sweet <mike@easysw.com>
Date: Mon, 19 Apr 2004 10:58:29 -0400
Message-ID: <4083E915.7070101@easysw.com>
To: "BIGELOW,JIM (HP-Boise,ex1)" <jim.bigelow@hp.com>
Cc: www-html-editor@w3.org, Elliott Bradshaw <Elliott.Bradshaw@Zoran.com>, don@lexmark.com, xp@pwg.org

BIGELOW,JIM (HP-Boise,ex1) wrote:
> I'm looking for opinions on the interpretation of RFC3391 [1] since it is
> normatively referenced by XHTML-Print [2].
> RFC 3391 says, 
>    An Application/Vnd.pwg-multiplexed entity contains a sequence of
>    chunks.  Each chunk consists of a chunk header, a chunk payload and a
>    CRLF.
>      - The chunk header consists of a "CHK" keyword followed by the
>        message number, the chunk payload length, whether the chunk is
>        the last chunk of a message and, finally, a CRLF.  The length
>        field removes the need for boundary strings that Multipart uses.
>        (See section 3.1 for the syntax of a chunk header).
>      - The chunk payload is a sequence of octets that is either a
>        complete message or a part of a message.
>      - The CRLF provides visual separation from the following chunk.
> There are several situations where a single CRLF does not provide visual
> separation since the CRLF added to the document simply terminates a line
> rather than adding a empty line.  For example in an XHTML-Print document
> didn't contain a terminating CRLF and adding a single CRLF  would give the
> result shown below in example 1:
> </body>
> </html>
> CHK 0 0 LAST
> Rather than the following, example 2, I expected from reading the spec:
> </body>
> </html>
> CHK 0 0 LAST
> This could also occur when interleaving images and the root document.  

As others have said, be liberal with what you accept but follow the
spec to the letter for your output.  The chunking works just like
HTTP chunking - one pair of CR + LF follows the chunk data regardless
of the contents of the chunk - the visual separation is just the
start of a new line, not actual whitespace (although that could be
the case for chunk payloads that end with a newline...)

Michael Sweet, Easy Software Products           mike at easysw dot com
Printing Software for UNIX                       http://www.easysw.com
Received on Monday, 19 April 2004 10:58:45 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:08:52 UTC