aboutsummaryrefslogtreecommitdiff
path: root/xsd
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-03-15 14:55:15 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-03-15 14:55:15 +0100
commit237a6faa8a23826e68bbc00bc107b2d6f97235d0 (patch)
treefe1a6a6b1a4ed991a6eacd9ec6960325db3f9e4f /xsd
parent3523190bb7ca1c38caea3a1aae51062d22e56b09 (diff)
downloadee-python-237a6faa8a23826e68bbc00bc107b2d6f97235d0.tar.gz
ee-python-237a6faa8a23826e68bbc00bc107b2d6f97235d0.tar.bz2
ee-python-237a6faa8a23826e68bbc00bc107b2d6f97235d0.tar.xz
ee-python-237a6faa8a23826e68bbc00bc107b2d6f97235d0.zip
Refactoring:
o Renaming part.id to part.uri. Changing to URIs and use that as an identifier if the part is known. Schematic part does not have an URI. o Merging <schema-reference> and <part-numbers> into <references> o Creating <part-uri> as a possible <reference>. Used by order to point to other parts.
Diffstat (limited to 'xsd')
-rw-r--r--xsd/ee.xsd37
1 files changed, 30 insertions, 7 deletions
diff --git a/xsd/ee.xsd b/xsd/ee.xsd
index 3e0d024..64d0f11 100644
--- a/xsd/ee.xsd
+++ b/xsd/ee.xsd
@@ -31,7 +31,7 @@ TODO: rename 'id' to 'url'.
targetNamespace="http://purl.org/ee/bom-file"
xmlns="http://purl.org/ee/bom-file">
- <xs:attribute name="id" type="xs:string"/>
+ <xs:attribute name="uri" type="xs:anyURI"/>
<xs:element name="part-db" type="PartDb"/>
<xs:element name="part" type="Part"/>
@@ -44,14 +44,14 @@ TODO: rename 'id' to 'url'.
<xs:complexType name="Part">
<xs:sequence>
- <xs:element name="schema-reference" type="xs:string"/>
+ <!-- TODO: this should be a fact -->
<xs:element name="part-type" type="xs:anyURI"/>
- <xs:element name="part-numbers" type="PartNumberList"/>
+ <xs:element name="references" type="ReferencesList"/>
<xs:element name="distributor-info" type="DistributorInfo"/>
<xs:element name="facts" type="FactList"/>
<xs:element name="price-breaks" type="PriceBreakList"/>
</xs:sequence>
- <xs:attribute ref="id" use="required"/>
+ <xs:attribute ref="uri"/>
</xs:complexType>
<xs:complexType name="PartList">
@@ -60,16 +60,39 @@ TODO: rename 'id' to 'url'.
</xs:sequence>
</xs:complexType>
+ <xs:complexType name="PartUri">
+ <xs:sequence>
+ <xs:element name="value" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+
<xs:complexType name="PartNumber">
<xs:sequence>
<xs:element name="value" type="xs:string"/>
- <xs:element name="distributor" type="xs:anyURI"/>
</xs:sequence>
</xs:complexType>
- <xs:complexType name="PartNumberList">
+ <xs:complexType name="SupplierPartNumber">
+ <xs:sequence>
+ <xs:element name="value" type="xs:string"/>
+ <xs:element name="supplier" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="SchematicReference">
+ <xs:sequence>
+ <xs:element name="reference" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="ReferencesList">
<xs:sequence>
- <xs:element name="part-number" type="PartNumber" maxOccurs="unbounded"/>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="schematic-reference" type="SchematicReference"/>
+ <xs:element name="part-uri" type="PartUri"/>
+ <xs:element name="part-number" type="PartNumber"/>
+ <xs:element name="supplier-part-number" type="SupplierPartNumber"/>
+ </xs:choice>
</xs:sequence>
</xs:complexType>