RE: LC124: Ignore Unknowns, some proposed text

The first type of the Last doesn't allow attribute extensions, therefore
the <last role="alternate-spelling"/> would not be found in the content
model, and ignored.  

If the Last did allow attribute extensions - via an "anyAttribute" decl
- then the alternate-spelling version would be matched and the 2nd would
be ignored.  

Thus, I think the definition of whether it is a backwards compatible
change is dependent upon the treatment of the extension attribute AND
the location in the sequence.

I would say that the change you'd probably want to make is to guarantee
the ordering, so have the first last name without alternate-spelling,
and the second to have alternate-spelling, ie 

  <xs:complexType>
    <xs:sequence>
      <xs:element name="first"/>
      <xs:element name="last">
        <xs:complexType>
          <xs:attribute name="role" type="xs:token" use="optional"
default="primary"/>
        </xs:complexType>
      <xs:element name="last" minOccurs="0">
        <xs:complexType>
          <xs:attribute name="role" type="xs:token" use="required"
default="alternate-spelling"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

Now this isn't *quite* right, as you want the first occurrence to be
either blank or primary only, and the 2nd occurrence to be filled in and
not primary, but it's closer.

Also, the algorithm that XML Schema uses for determining "notKnown" is
quite rigorous.  It will take the first matched element, and then mark
the rest as notKnown.  Hence why I mentioned that it's important to know
whether the element is attribute extensible or not.

Cheers,
Dave

> -----Original Message-----
> From: paul.downey@bt.com [mailto:paul.downey@bt.com]
> Sent: Thursday, June 16, 2005 7:59 AM
> To: jmarsh@microsoft.com; David Orchard
> Cc: www-ws-desc@w3.org
> Subject: RE: LC124: Ignore Unknowns, some proposed text
> 
> //bah, rouge mail demons appear to have stolen my reply from last
night,
> from the wire and my outbox, and a power-cut this morning in
Berkhamsted
> prevented me spotting  the loss until a moment ago :-(
> 
> I see two things happening in this evolution:
> 
> 1) adding an 'alternative-spelling' attribute changes the meaning
>     of  the 'last' element. This isn't a backwards compatible change.
> 
>     I've tried to avoid specifying the compatibility rules:
>         1) don't remove stuff
>         2) make new stuff you add optional
>         3) don't change the meaning of stuff
> 
>      and attempted to find a more precise way to embody them,
>      but the semantic change is hard to enforce at the schema/XML
level
>      and possibly needs stating, though it's not testable.
> 
> 2) the cardinality of the 'last' element has changed from '1' to '2'
>    I was trying to suggest that in this case the new element had been
>    inserted before the existing element, so hence moving from
'sequence'
>    to an 'all'.
> 
> So the removal algorithm does need to be more precise. Henry's
technique
> uses the schema validation processor to mark the PSVI with 'notKnown'
> attributes. We could cite that algorithm should be used for resolving
> conflicts, which I think is easily embodied in non-validating code
> processing the message - basically when an presented with an ambiguous
> repeated element, take the first one encountered and ignore the
others.
> 
> UPA does tend to prevent such conflicts happening when trying to write
the
> v2 schema.
> 
> -----Original Message-----
> From:	Jonathan Marsh [mailto:jmarsh@microsoft.com]
> Sent:	Wed 6/15/2005 8:57 PM
> To:	Downey,PS,Paul,CXMA C; dorchard@bea.com
> Cc:	www-ws-desc@w3.org
> Subject:	RE: LC124: Ignore Unknowns, some proposed text
> 
> Would this be a valid schema that accommodates both the original and
the
> extended structure?
> 
>   <xs:complexType>
>     <xs:sequence>
>       <xs:element name="first"/>
>       <xs:element name="last" maxOccurs="unbounded">
>         <xs:complexType>
>           <xs:attribute name="role" type="xs:token" use="optional"
> default="primary"/>
>         </xs:complexType>
>       </xs:element>
>     </xs:sequence>
>   </xs:complexType>
> 

Received on Friday, 17 June 2005 17:26:37 UTC