# Formats

This section describes the data formats used for the feed file.

## NonEmptyString

An element or attribute of type NonEmptyString contains character data of type
[xs:string](https://www.w3.org/TR/xmlschema-2/#string) with the additional restriction
that the character data must have at least one non-whitespace character.

## Id

An element or attribute of type Id contains character data of type [xs:string](https://www.w3.org/TR/xmlschema-2/#string)
with the additional restrictions that the character data must be shorter than 256 characters and must not contain any whitespace characters.

NOTE: We allow [CharMatcher.javaLetterOrDigit()](https://guava.dev/releases/21.0/api/docs/com/google/common/base/CharMatcher.html#javaLetterOrDigit--) and "-._" so anything other that that will fail the feed.

## CollectionMethodType

An element of type CollectionMethodType must be of type
[xs:string](https://www.w3.org/TR/xmlschema-2/#string) with the additional restriction
that it can only be one of following values: "unsolicited", "point_of_sale" or "after_fulfillment".

## CountryCode

An element of type CountryCode must be of type
[xs:string](https://www.w3.org/TR/xmlschema-2/#string) with the additional restriction
that it must be a valid country code in [ISO 3166-1 alpha-2](https://www.iso.org/obp/ui/#search/code/) format.

## DateTimeWithTimeZone

The value must be of type [xs:dateTime](https://www.w3.org/TR/xmlschema-2/#dateTime) in the format specified by the
[W3C profile of ISO 8601](https://www.w3.org/TR/NOTE-datetime). A time zone designator
is required after the time. The time zone designator may be "Z" to indicate UTC or it may have
the format "+hh:mm" or "-hh:mm" to indicate an offset from UTC.

### Examples

```
2016-04-03T18:37:32Z
2016-05-30T09:30:10-06:00
```

## RatingRange

### Description

Elements of type RatingRange must contain a single rating. This rating should not be aggregated
from multiple ratings. Do not use "0" or any other value to specify "no rating". If no rating is
available, then the particular rating element should not appear in the feed.

The rating should be in [xs:decimal](https://www.w3.org/TR/xmlschema-2/#decimal) format
and is a required field.

### Attributes

Elements of type RatingRange have the following two attributes.

| Name | Format | Occurrences | Description |
|---|---|---|---|
| `min` | [xs:nonNegativeInteger](http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger) | Required (1) | The minimum possible number for the rating. This should be the worst possible rating and should not be a value for "no rating". If your ratings scale starts from 1, please do not enter 0 for this attribute. |
| `max` | [xs:nonNegativeInteger](http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger) | Required (1) | The maximum possible number for the rating. This should be the best possible rating. |

### Example

```
<overall min="1" max="10">9</overall>
```