I am looking for some clarification regarding how to read the XSD that Amazon uses to validate their XML product feed.
This is the XSD used (and the inner Product one) and these are the docs .
When I submit a basic product feed without a description or BulletPoint feed I get this error:
A value was not provided for "bullet_point1". Please provide a value for "bullet_point1". This information appears on the product detail page and helps customers evaluate products.
A value was not provided for "product_description". Please provide a value for "product_description". This information appears on the product detail page and helps customers evaluate products.
Here are the relevant XSD sections:
<xsd:element name="Description" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:normalizedString">
<xsd:maxLength value="2000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="BulletPoint" type="LongStringNotNull" minOccurs="0" maxOccurs="5"/>
My understanding is that minOccurs="0"
means its not required yet it clearly is. I have looked through a few other inner XSD (such as Base ) for these fields in case they were overridden but did not see anything.
Is this the wrong XSD? Am I reading this wrong?
Yes, minOccurs="0"
means optional, however...
In general, applications often have additional requirements beyond those specified in the XSD of its XML input. When parameters are required only in certain circumstances, an XSD will list them as optional in the general case but then check them out-of-band wrt the XSD. (XSD 1.1 provides some additional expressiveness via xs:assertion
for conditionally requiring elements/attributes, but it's not widely adopted yet.)
Note that bullet_point1
does not appear in any of the XSDs or documentation you've linked to your question. If bullet_point1
is derived from BulletPoint
in the XSD, then it clearly is a downstream application that's making the additional requirement and issuing the error when it's unmet.
I asked to the amazon developers this question and they answered to me:
xsd of categories are not correctly updated so some elements would be required but not reflected in the .xsd document thaty's the problem.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.