[DataCache] Some Corrections

- 4.1.1 Examples
http://dev.w3.org/2006/webapi/DataCache/#examples
Last code example is improperly indented.


- 4.2.1 Opening a Cache has a typo in Step 3.2
http://dev.w3.org/2006/webapi/DataCache/#opening-cache
"If data cache group does not exist, the perform the following substeps:"  
should be:
"If data cache group does not exist, then perform the following substeps:"
also, maybe "substeps" should be "sub-steps" ?


- 4.2.1. Opening a cache is missing step?
http://dev.w3.org/2006/webapi/DataCache/#opening-cache

Both arms of step 3 don't specify the `data cache` to use if the `data cache group` is defined / exists. For example, the first arm of step 3 is:

[[
1. If there is an unsecure data cache group for origin origin, let data cache group be that existing data cache group.
2. If data cache group does not exist, the perform the following substeps:
  1. Create a new data cache, called data cache, in a new unsecure data cache group for origin origin called data cache group.
  2. Set the completeness flag of data cache to incomplete.
  3. Set the update status of data cache group to idle.
]]

Sub-step 2 is the only step that creates a `data cache`. Thus, if a data cache group exists, the current text does not specify what the `data cache` should be. I suggest this be clarified, in both arms, like so (adding a new step #2):

1. If there is an unsecure data cache group for origin origin, let data cache group be that existing data cache group.
2. If data cache group exists let data cache be the effective data cache of data cache group.
3. If data cache group does not exist, then perform the following substeps:
  1. Create a new data cache, called data cache, in a new unsecure data cache group for origin origin called data cache group.
  2. Set the completeness flag of data cache to incomplete.
  3. Set the update status of data cache group to idle.

Where "effective data cache" can be a link to:
http://dev.w3.org/2006/webapi/DataCache/#effective-data-cache

On the same note, "effective cache" [1 time] and "effective data cache" [9 times] are both used throughout the draft to mean the same thing. I would suggest that "effective cache" be updated to "effective data cache" for consistency.


- 4.2.2.1. Starting a transaction - Rules should be switched.
http://dev.w3.org/2006/webapi/DataCache/#starting-a-transaction

  first arm: (these should be swapped)
    3.3 - Mark transaction as off-line.
    3.4 - Create a new cache transaction called transaction and set data cache to be its data cache.

  second arm: (these should be swapped)
    3.4 - Mark transaction as not off-line.
    3.5 - Create a new cache transaction called transaction and set data cache to be its data cache.


- 4.2.5 Asynchronous Data Cache API typo three times:
http://dev.w3.org/2006/webapi/DataCache/#cache-status

"This DataCache object's cache host is aassociated with a..."
s/aassociated/associated/; // 3 times


Cheers,
Joseph Pecoraro

Received on Friday, 4 December 2009 17:42:31 UTC