W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > April 2012

RE: ISSUE-134 (processing step clarification): Section 7.5, Step 11 Ambiguity in RDFa Core 1.1 [RDFa Core, Lite, and XTHML+RDFa CR comments]

From: Grant Robertson <grantsr@gmail.com>
Date: Tue, 24 Apr 2012 20:50:40 -0700
To: "'RDF Web Applications Working Group'" <public-rdfa-wg@w3.org>
Message-ID: <44D482D6A6AB4A1581E9CBC96F4776A9@grantdesk>
Ivan, I don't know if I have a vote on this issue but:

ABSTRACT:
I don't think you need to modify the wording at all. If you do: Then, by
that logic, you would have to modify many of the other steps in the
specification which use the same "phraseology." 

ARGUMENT:
The original sentence reads as follows:

"otherwise, if the @rel, @rev, and @content attributes are not present, as a
resource obtained from one of the following:"

... and then you proceed to list three things. By saying, "... from one of
the following:" you are - in essence - specifying a switch statement. If
none of the items in the list exist then that "otherwise," that switch
statement, is not satisfied and the logic simply flows down to the next
bullet item, a test for @typeof. One does not generally test for the
presence of all possibilities within a switch statement before executing
said switch statement. The switch statement itself does that testing for
you. 

Now, I confess that I was also confused by this sentence at first (as can be
seen by my highlighted question in the lower-right corner of the second
table in
http://lists.w3.org/Archives/Public/public-rdfa-wg/2012Apr/att-0013/RDFa_Sub
ject-Object_Variables_Determination.pdf, posted previously).  However, upon
one more reading of the sentence I have decided that it makes perfect sense,
as is. 


If you were to make this change here - essentially accepting the notion that
one should test for all conditions of a switch statement BEFORE actually
executing said switch statement - then consistency would dictate that you
also change many other steps within Section 7.5. For instance:

Step 5.1 says, "... then new subject is set to the resource obtained from
the first match from the following rule:" without specifying all the
possible conditions within that same sentence. Nor does it specify what to
do when none of the conditions are met. However, earlier in the spec it says
that [new subject] is set to null. So an astute reader knows that if none of
the conditions are met then nothing is done and [new subject] remains set to
null. 

Later, Step 5.1 also says, "If @typeof is present then typed resource is set
to the resource obtained from the first match from the following rules:" and
then proceeds to list the exact same list of attributes - which concerned
Alex Milowski in Step 11 - to check for in the subsequent bullet items. Now,
in this situation, you also list an additional "otherwise" which creates a
new bNode if none of the previous conditions are met. However, this also
falls well within the standard paradigm of a switch or case statement in
programming. 

There are many other examples. Sometimes no conditions are met and the logic
"falls through" to the next step in the procedure and sometimes a default is
listed as the last condition in the switch statement. In fact, within the
specification, sometimes you "pre-test" for the switch conditions and
sometimes you don't. But, again, there is never really a need for this
"pre-test." However, to go through the entire specification and fix it so
that all the processing steps are worded consistently would require many,
many changes - whether we switched to using the pre-test in all such
circumstances or whether we removed the pre-test from all the steps that
currently include it. A large part of this procedure is composed of switch
statements nested within switch statements. To insert a "pre-test" before
each and every one of these would add considerable unnecessary bulk to the
specification.


CONCLUSION:
Therefore, I highly-recommend that you DO NOT change the wording of this
sentence.


 
Grant S. Robertson
www.demml.org
www.ideationizing.com
 

> -----Original Message-----
> From: RDF Web Applications Working Group Issue Tracker 
> [mailto:sysbot+tracker@w3.org] 
> Sent: Monday, April 23, 2012 1:33 AM
> To: public-rdfa-wg@w3.org
> Subject: ISSUE-134 (processing step clarification): Section 
> 7.5, Step 11 Ambiguity in RDFa Core 1.1 [RDFa Core, Lite, and 
> XTHML+RDFa CR comments]
> 
> ISSUE-134 (processing step clarification): Section 7.5, Step 
> 11 Ambiguity in RDFa Core 1.1 [RDFa Core, Lite, and 
> XTHML+RDFa CR comments]
> 
> http://www.w3.org/2010/02/rdfa/track/issues/134
> 
> Raised by: Ivan Herman
> On product: RDFa Core, Lite, and XTHML+RDFa CR comments
> 
> Raised on behalf of Alex Milowski, see his mail:
> 
> http://www.w3.org/mid/CABp3FNJ9FWvWiBwYJp0ybEDuEC4430OuyrnTOmD
> =UkQUzmLD6A@mail.gmail.com
> 
> The request is to modify one of the clauses in the processing 
> step descriptions as follows:
> 
> "if the @rel, @rev, and @content attributes are not present 
> and one of @resource, @href, or @src are present, as a 
> resource obtained from one of the following:"
> 
> 
> 
Received on Wednesday, 25 April 2012 03:51:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 27 April 2012 04:55:20 GMT