Re: HT's third example

C. M. Sperberg-McQueen writes:

>> ht writes:
>> 
>>> A third example follows in the next message.
>> 
>> Consider the following set of 4 schema documents.
>> ...
>> 
>> Algorithm O classifies this as OK starting from A, but not if starting
>> - From B, C or D.
>
> I agree that if one starts from B, C, or D one definitely
> end up with contradictory declarations and thus with
> a non-conforming schema.
>
> I'm not entirely convinced that it's plausible to require
> that the schema be accepted if one starts from schema
> document A.   It depends, I think, on how aggressive the
> processor wishes to be about detecting component 
> identity.  
>
> . . .
>
> The algebraic derivation of schema(A) goes on for a 
> long long time and involves several inclusions of
> overridden versions of B, C, and D with different 
> sets of children in the override.

Indeed -- at this point I gave up simulating the processing by hand
and implemented Algorithm O in XSLT!

> Requiring that a processor recognize that override(E1,B) and
> override(E1>E2, B) are the effectively the same resource (where
> 'E1>E2' denotes the overlay of E2 by E1) probably requires more
> intelligence than I think the rest of the spec has been inclined to
> require of a processor.
>
> So I think the status of the example is indeterminate
> in the status quo and probably should remain so:  we
> cannot provide a firmer footing here without a
> complete revision of the foundations of the spec.
> Unfortunately, I don't think we are in a position to do 
> that now.  

That seems to me unnecessarily pessimistic.  I attach herewith
 a) a crude display of the override graph produced by Algorithm O
     for this example;
 b) a package including
      a XSLT 2.0 stylesheet o.xsl which computes one iteration of algorithm O;
      an XProc pipeline o.xpl which points o.xsl at an initial schema doc.
       and iterates until the queue is empty;
      a stylesheet which displays the result;
      a collection of examples, namely over023 (start at P.xsd)
                                       over024 (start at over024.bad.xsd)
                                       example 3 (start at A.xsd)

for those interested in a demonstration that Algorithm O has the
necessary properties and does not require "over[much] intelligence".

ht
-- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]

Received on Tuesday, 15 March 2011 13:01:14 UTC