OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xacml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Issue: Ambiguity in defn of <StatusCode>


To TC:

This issue might also be posed as question:
    When is a "sequence", not a "sequence", and yet, still is a "sequence"?
One answer is:
    When XML Schema is used to define the XACML <StatusCode>.

While examining the defn of <StatusCode> (in both 2.0 and 3.0,
but will confine comments to 3.0), it was not clear to me, at first,
how to implement the "minor" status codes.

The first point I should make to avoid anyone wasting their time on what
turns out to be a relatively trivial matter, is that when all is said and
done, the definition actually works. All one has to do is not think
about the definition and just implement it as is.

The whole text pertaining to this matter is from line 3025 to line 3039
(where emphasis has been added to help discussion):
"The <StatusCode> element contains a major status code value and
  an optional "sequence" of minor status codes.
    <xs:element name="StatusCode" type="xacml:StatusCodeType"/>
    <xs:complexType name="StatusCodeType">
      <xs:sequence>
        <xs:element ref="xacml:StatusCode" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="Value" type="xs:anyURI" use="required"/>
    </xs:complexType>
  The <StatusCode> element is of StatusCodeType complex type.
  The <StatusCode> element contains the following attributes
   and elements:
Value [Required]
    See Section B.8 for a list of values.
<StatusCode> [Any Number]
    Minor status code.
    This status code qualifies its parent status code."
When one looks at this defn, esp the last 3 lines, everything seems ok,
until one realizes that the phrase in brackets "[Any Number]" is
inconsistent with the schema definition, and, in fact, I assert, wrong.

According to the xml schema defn above, the <StatusCode> element
can only contain "zero" or "one" <StatusCode> elements!! This is
because the default maxOccurs value is "1".

Therefore, even the first statement is wrong: i.e.
    "The <StatusCode> element contains a major status code value and
      an optional "sequence" of minor status codes"
is not true because the <StatusCode> can only contain at most "one"
minor status code. And one element is not a sequence, because a
sequence implies order, and there is no meaning to the order of
one element, except that order is N/A.

What I suggest can be done to fix this problem is to disambiguate
the use of the term "sequence".

I suggest that we call the succession of minor status codes a
"recursive sequence", which actually jumps to the next lower
level of the hierarchy for each new member of the recursive
sequence. By comparison the "xs:sequence" refers to the
"horizontal" aspect of the hierarchy, namely peer elements
that share the same parent.

That way my suggestion for new proposed text would be:
"The <StatusCode> element contains a major status code value and
  an optional "recursive sequence" of minor status codes.
    <xs:element name="StatusCode" type="xacml:StatusCodeType"/>
    <xs:complexType name="StatusCodeType">
      <xs:sequence>
        <xs:element ref="xacml:StatusCode" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="Value" type="xs:anyURI" use="required"/>
    </xs:complexType>
  The <StatusCode> element is of StatusCodeType complex type.
  The <StatusCode> element contains the following attributes
   and elements:
Value [Required]
    See Section B.8 for a list of values.
<StatusCode> [Optional]
    Minor status code.
    This first optional minor status code qualifies the
     original parent major status code.
    Subsequent optional minor status codes may be added
     one at a time as the child of the previous minor status
     code and may be considered as refining the qualification
     of the major status code."
where the proposed changes are underlined.

I expect that the xml for such a sequence would look like this:
<StatusCode
    >major-value<StatusCode
        >minor-value-01<StatusCode
            >minor-value-02</StatusCode>
     </StatusCode>
</StatusCode>
A final note is that hierarchies are 2 dimensional structures, and I think
the ambiguity in this case arose from the fact that there is a language
element, "xs:sequence" that refers to potential sequences in the
horizontal dimension (common parent) of the hierarchy, whereas
the potential recursive sequence of status codes
is in the vertical dimension (a sequence of descendants).

    Thanks,
    Rich



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]