Skip to content

Commit d99804c

Browse files
committed
Modify the ID element to handle multiple sources
The `Primary` sub-element should be used for the primary source of metadata. The `Alternative` sub-element should be used for linking purposes with other sources of information.
1 parent d86766f commit d99804c

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

drafts/v1.0/MetronInfo.xsd

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- Complex Types -->
66
<xs:complexType name="metroninfoType">
77
<xs:all>
8-
<xs:element name="ID" type="sourceType" minOccurs="0" />
8+
<xs:element name="ID" type="sourcesType" minOccurs="0" />
99
<xs:element name="Publisher" type="resourceType" />
1010
<xs:element name="Series" type="seriesType" />
1111
<xs:element name="CollectionTitle" type="xs:string" minOccurs="0" />
@@ -33,6 +33,15 @@
3333
</xs:all>
3434
</xs:complexType>
3535

36+
<xs:complexType name="sourcesType">
37+
<xs:sequence>
38+
<!-- The following element should be used for the primary source of metadata information. -->
39+
<xs:element name="Primary" type="sourceType" />
40+
<!-- The following should be used for linking to other resources for the same issue. -->
41+
<xs:element name="Alternative" type="sourceType" minOccurs="0" maxOccurs="unbounded" />
42+
</xs:sequence>
43+
</xs:complexType>
44+
3645
<xs:complexType name="sourceType">
3746
<xs:simpleContent>
3847
<xs:extension base="xs:positiveInteger">

drafts/v1.0/Sample.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<MetronInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MetronInfo.xsd">
3-
<ID source="Comic Vine">290431</ID>
3+
<ID>
4+
<Primary source="Metron">290431</Primary>
5+
<Alternative source="Comic Vine">12345</Alternative>
6+
<Alternative source="Grand Comics Database">543</Alternative>
7+
</ID>
48
<Publisher id="12345">DC Comics</Publisher>
59
<Series id="65478" lang="en">
610
<Name>Justice League</Name>

0 commit comments

Comments
 (0)