Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section outlines general conventions that apply to the XSD as a whole.

Required Elements

A minimally populated XML file that adheres to the Snapp Data Standard has very few required entities (e.g., Name, ContactInfo) and a few required elements within those required entities (e.g., FirstName, LastName, Email). The Context entity is also required and contains a few metadata elements (e.g., Created date, CreatedBy, ApplicationLanguage).

We recommend implementers follow these guidelines:

  1. Do not send files before FirstName, LastName, and Email are available in your application context. 
  2. Do not send files with whitespace or other placeholder text in required fields. Some implementers find it useful to save initial versions of the XML file with placeholder values (e.g., to allow an early version of the file to pass validation even if the required information isn't yet known). That's fine, but we recommend that you not exchange files with containing placeholder information.
  3. Do not send optional entities containing whitespace or placeholder values in their required elements. Omit the optional entity instead. For example BirthPlace is an optional entity, but contains the required element StateOrProvince. If your application has not yet collected the StateOrProvince information at the time you send the XML data file, simply omit the whole BirthPlace entity rather than send the value with a space or a placeholder.

Overall File Size and Attachment

The Snapp Data Standard XSD itself doesn't enforce an overall file size. This isn't a problem for the vast majority of data in the standard – but since the standard allows for mime-encoded attachments, the file size could theoretically grow to a point where it causes problems for data exchange. To avoid the situation where implementers must handle files of an arbitrarily large size, we recommend that data exchange implementers follow these guidelines:

  1. Do not send Snapp XML Data Files exceeding 5mb, unless explicitly agreed upon with the recipient.
  2. Do offer the option to receive data without attachments, e.g., through an API.
  3. Do omit attachments by default, e.g., through an API.

The Scholar Snapp Central API adheres to these guidelines. We can receive bulk data exchanges containing larger files.

Honor Ye Olde Robustness Principle

Regarding the exchange of Snapp Data Files, we encourage implementers to follow the good advice:

  1. Do be liberal in what you accept and conservative in what you send.
  2. Do ensure Snapp XML Data Files validate against the intended XSD before sending.
  3. Notwithstanding your commitment to the above, do be forgiving of what you receive, and handle error conditions gracefully.

In practice, we've found that different XML libraries return different results, so there's always a chance your validation will return a different result than a sender's validation.