RE: Test suite: quoting of charset parameters

Hi Norm,

If you look at the grammar section of RFC2046 (Appendix A), it says that
the parameter value is defined as follows:

parameter := attribute "=" value
value := token / quoted-string

Further down it also says that:

"Thus the following two forms
     Content-type: text/plain; charset=us-ascii (Plain text)
     Content-type: text/plain; charset="us-ascii"
are completely equivalent."

But the main reason why I added quotes to the charset parameter in
p:data tests was to make it consistent with the p:http-request tests
(where the charset parameter value is quoted). In Calumet, if you use
HTTP, both p:data and p:http-request use the same underlying HTTP client
implementation. It is easy for me to either quote the charset everywhere
or don't quote it at all. Forcing the same code base to use quotes in
p:http-request but not in p:data seemed silly to me. (But that is an
implementation problem, so you can ignore me if you really think that
removing the quotes is the correct solution.)

Actually I think that both the tests with and without the quotes are
correct, and implementations shouldn't fail if the test expects a quoted
charset value and they produce a value without quotes (or vice versa).
So it is more a test result comparison issue, I think.

Regards,
Vojtech


> -----Original Message-----
> From: public-xml-processing-model-wg-request@w3.org
[mailto:public-xml-
> processing-model-wg-request@w3.org] On Behalf Of Norman Walsh
> Sent: Saturday, February 20, 2010 8:48 PM
> To: public-xml-processing-model-wg@w3.org
> Subject: Test suite: quoting of charset parameters
> 
> Vojtech,
> 
> For tests data-002 and data-006, you recorded the expected result of
the
> content-type attribute as
> 
>   text/plain; charset="utf-8"
> 
> I don't think that's correct. At least, I can't find it in RFC 2046
which
> gives the example
> 
>   text/plain; charset=utf-8
> 
> I took the quotes out of the tests.
> 
>                                         Be seeing you,
>                                           norm
> 
> --
> Norman Walsh <ndw@nwalsh.com> | The belief in a supernatural source of
> http://nwalsh.com/            | evil is not necessary; men alone are
>                               | quite capable of every
>                               | wickedness.--Joseph Conrad

Received on Monday, 22 February 2010 09:08:26 UTC