W3C home > Mailing lists > Public > public-html@w3.org > January 2010

spec verbosity and algorithms

From: Julian Reschke <julian.reschke@gmx.de>
Date: Fri, 22 Jan 2010 17:43:32 +0100
Message-ID: <4B59D5B4.70403@gmx.de>
To: "public-html@w3.org" <public-html@w3.org>
Hi,

this issue has been raised before, and I realize that this is the way 
Ian likes to specify things. Anyway, I just came across:

"Two origins are said to be the same origin if the following algorithm 
returns true:

    1.

       Let A be the first origin being compared, and B be the second 
origin being compared.

    2.

       If A and B are both opaque identifiers, and their value is equal, 
then return true.

    3.

       Otherwise, if either A or B or both are opaque identifiers, 
return false.

    4.

       If A and B have scheme components that are not identical, return 
false.

    5.

       If A and B have host components that are not identical, return false.

    6.

       If A and B have port components that are not identical, return false.

    7.

       If either A or B have additional data, but that data is not 
identical for both, return false.

    8.

       Return true. "

This seems to be equivalent with

"Two origins A and B are said to be the same if they are of identical 
type (opaque identifier or tuple), and all of their components have 
identical values.".

(at least if we define the tuple variant always to have the same number 
of components)

Best regards, Julian
Received on Friday, 22 January 2010 16:44:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:17:00 GMT