Hi, 

I have tried to run some measurements with the new XSD but it seems that it is 
not valid : 

``` 
xmlschema.validators.exceptions.XMLSchemaParseError: attribute 
maxOccurs='unbounded': value must be one of [0, 1]: 
``` 

The complex type "ReportMetadataType" has a <xs:all> (see below). 
However the Python library i am using refuses the XSD files as, according to 
W3, macOccurs unbounded are not accepted in all : 

``` 
Schema Component Constraint: All Group Limited 
When a model group has {compositor} all, then all of the following must be 
true: 
1 It appears only as the value of one or both of the following properties: 
1.1 the {model group} property of a model group definition. 
1.2 the {term} property of a particle with {max occurs}=1which is part of a 
pair which constitutes the {content type} of a complex type definition. 
2 The {max occurs} of all the particles in the {particles} of the group must be 
0 or 1. 
``` 
[ https://www.w3.org/TR/xmlschema-1/#cos-all-limited | 
https://www.w3.org/TR/xmlschema-1/#cos-all-limited ] [ 
https://www.w3.org/TR/xmlschema-1/#cos-all-limited ] 

Shouldn't we remove the maxOccurs for the error element ? 


------ 


OLD 
``` 
<xs:complexType name="ReportMetadataType"> 
<xs:all> 
<xs:element name="org_name" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="email" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="extra_contact_info" type="xs:string" 
minOccurs="0" maxOccurs="1"/> 
<xs:element name="report_id" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="date_range" type="DateRangeType" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="error" type="xs:string" 
minOccurs="0" maxOccurs="unbounded"/> 
</xs:all> 
</xs:complexType> 
``` 



NEW 
``` 
<xs:complexType name="ReportMetadataType"> 
<xs:all> 
<xs:element name="org_name" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="email" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="extra_contact_info" type="xs:string" 
minOccurs="0" maxOccurs="1"/> 
<xs:element name="report_id" type="xs:string" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="date_range" type="DateRangeType" 
minOccurs="1" maxOccurs="1"/> 
<xs:element name="error" type="xs:string" 
minOccurs="0"/> 
</xs:all> 
</xs:complexType> 
``` 





------------------------------------------------- 
Olivier HUREAU 
PhD Student 
Laboratoire Informatique Grenoble - UGA - Drakkar 
[ https://hureau.com/ | hureau.com ] 
_______________________________________________
dmarc mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/dmarc

Reply via email to