Re: minOccurs="0" means can have many?

Curt is correct, the default value for minOccurs and MaxOccurs is 1.

--Stephan

On Dec 12, 2012, at 7:46 PM, Curt Tilmes <Curt.Tilmes@nasa.gov> wrote:

> I'll double check the spec, but I'm pretty sure default for both
> minOccurs and maxOccurs is 1.
> 
> Setting minOccurs="0" just makes it optional.
> 
> Curt
> 
> On 12/12/12 4:59 PM, Timothy Lebo wrote:
>> XMLers,
>> 
>> http://www.w3.org/TR/prov-xml/#term-Activity
>> 
>> says:
>> 
>> <xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Activity">
>>   <xs:sequence>
>>     <xs:element name="startTime" type="xs:dateTime" minOccurs="0"/>
>>     <xs:element name="endTime" type="xs:dateTime" minOccurs="0"/>
>>     <xs:choice minOccurs="0" maxOccurs="unbounded">
>>       <xs:element ref="prov:location"/>
>>       <xs:element ref="prov:label"/>
>>       <xs:element ref="prov:type"/>
>>       <xs:any namespace="##other"/>
>>     </xs:choice>
>>   </xs:sequence>
>>   <xs:attribute ref="prov:id"/>
>> </xs:complexType>
>> 
>> 
>> Does this indicate that I can have multiple startTimes and endTimes?
>> I think the intent is that there should only be one, but PROV-O had to
>> skip this axiom for RL considerations.
>> 
>> Perhaps add a maxOccurs="1" on both?
>> 
>> Thanks,
>> Tim
> 
> 
> -- 
> Curt Tilmes, Ph.D.
> U.S. Global Change Research Program
> 1717 Pennsylvania Avenue NW, Suite 250
> Washington, D.C. 20006, USA
> 
> +1 202-419-3479 (office)
> +1 443-987-6228 (cell)
> globalchange.gov
> 
> 

Received on Thursday, 13 December 2012 03:32:04 UTC