Arthlol / bpswg

Automatically exported from code.google.com/p/bpswg
0 stars 0 forks source link

UserDistribution schema warning #112

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I open the XSD (BPSim v1.0RC.xsd) in Visual Studio 2012 I get the 
following schema waning for the UserDistribution type: 

"Complex content restriction or extension should consist of zero or one of 
'group', 'choice', 'sequence', or 'all'; followed by zero or more 'attribute' 
or 'attributeGroup'; followed by zero or one 'anyAttribute'."

<xs:element name="UserDistribution" .. >
 <xs:complexType>
  <xs:complexContent>
   <xs:extension base="bpsim:DistributionParameter">
    <xs:attribute name="discrete" type="xs:boolean" default="false"/>
    <xs:sequence maxOccurs="unbounded">
      <xs:element ref="bpsim:UserDistributionDataPoint"/>
    </xs:sequence>
   </xs:extension>
  </xs:complexContent>
 </xs:complexType>
</xs:element>

Fix: move the discrete attribute definition after the xs:sequence element, for 
example:

   <xs:extension base="bpsim:DistributionParameter">
    <xs:sequence maxOccurs="unbounded">
      <xs:element ref="bpsim:UserDistributionDataPoint"/>
    </xs:sequence>
    <xs:attribute name="discrete" type="xs:boolean" default="false"/>
   </xs:extension>

Original issue reported on code.google.com by jhor...@lanner.co.uk on 28 Nov 2012 at 2:42

GoogleCodeExporter commented 9 years ago
Applied to 1.0 RC2

Original comment by sringue...@trisotech.com on 11 Jan 2013 at 9:46