Subject: [Ecrit] Recommended Changes to XML Schemas for draft-ietf-ecrit-additional-data-37

From: Hannes Tschofenig <[email-masked]>
Date: Fri, 15 Jan 2016 13:26:25 +0100

Hi all,

when we worked on the additional data draft we wanted to re-use the
vcard specification (or xcard more precisely). As it turned out the RFC
describing the spec contained a Relax NG schema and we decided to
convert it to an XML schema, which is what you find in the appendix of
the draft. We used a tool for this step and, as it turns out, the tool
made incorrect translation in the definition of the vcardType. We
unfortunately trusted the tool and none of us used the schema to produce
code (but we used it to validate instance documents against the schema
only).

Philip, who is on CC, noticed these mistakes since he used the XML
schemas to automatically produce code. Others who use the XML schema for
producing code may also recognize these bugs as well.

The authors of the additional data draft had an off-list discussion with
Philip off-list end of last year to confirm the discovered issues and
with this mail I would like to bring them to your attention.

I am proposing changes to the vcard.xsd schema and the new as well as
the old XML schema are attached to this mail.

Additionally, there SubscriberInfo and provided-by schemas can also be
simplified. Those changes are, however, minor.

Note that the examples (i.e., instance documents) are not affected by
this change!

We know that these changes come very late in the process but I feel it
is worthwhile to take this implementation experience provided by Philip
into account.

Please let me know if you object to the changes within the next 2 weeks.
I will talk to the AD, IANA, and RFC Editor to make the necessary
changes (if the group agrees).

A big thanks goes to Philip for spotting the bug and for reaching out to us!

Ciao
Hannes

--- Detailed List of Schema Changes ---

**** vcard.xsd Changes ****
1.) Changed the <xs:choice> tag to a <xs:sequence> tag in the "property"
group of elements.
2.) Changed the <xs:choice> tag to a <xs:sequence> tag in the
"vcardType" type.
3.) Removed the <xs:complexContent> and <xs:restriction base="anyType">
tags from the "vcardType" type.
4.) Added in cardinality attributes (minOccurs and maxOccurs) to all of
the elements so that the schema meets the cardinality requirements
specified in the text of Sections 6.1 through 6.9 of RFC 6350 and in the
text of Section 5.2 of RFC 6351.
5.) Added an <xs:any namespace-"##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded"> element to the "vcardType" so that
the schema can be more easily extended I the future. I'm not sure if
this is the best place to add it. The other alternative is to add it to
the "property" group of elements.
6.) Modified the "kind" type to remove the complicated union structure
and replaced it with a much simpler complexType structure.

**** SubscriberInfo.xsd Changes ****
Removed the <xs:complexContent> and <xs:restriction base="anyType"> tags
from the "SubscriberInfoType" type.

**** provided-by.xsd Changes ****
Removed the <xs:complexContent> and <xs:restriction base="anyType"> tags
from the "ByRefType" type.