Skip to content

Commit

Permalink
Modify the ID element to handle multiple sources (#30)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bpepple authored Apr 4, 2024
1 parent d86766f commit ddc1783
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion drafts/v1.0/MetronInfo.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- Complex Types -->
<xs:complexType name="metroninfoType">
<xs:all>
<xs:element name="ID" type="sourceType" minOccurs="0" />
<xs:element name="ID" type="sourcesType" minOccurs="0" />
<xs:element name="Publisher" type="resourceType" />
<xs:element name="Series" type="seriesType" />
<xs:element name="CollectionTitle" type="xs:string" minOccurs="0" />
Expand Down Expand Up @@ -33,6 +33,15 @@
</xs:all>
</xs:complexType>

<xs:complexType name="sourcesType">
<xs:sequence>
<!-- The following element should be used for the primary source of metadata information. -->
<xs:element name="Primary" type="sourceType" />
<!-- The following should be used for linking to other resources for the same issue. -->
<xs:element name="Alternative" type="sourceType" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>

<xs:complexType name="sourceType">
<xs:simpleContent>
<xs:extension base="xs:positiveInteger">
Expand Down
6 changes: 5 additions & 1 deletion drafts/v1.0/Sample.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<MetronInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MetronInfo.xsd">
<ID source="Comic Vine">290431</ID>
<ID>
<Primary source="Metron">290431</Primary>
<Alternative source="Comic Vine">12345</Alternative>
<Alternative source="Grand Comics Database">543</Alternative>
</ID>
<Publisher id="12345">DC Comics</Publisher>
<Series id="65478" lang="en">
<Name>Justice League</Name>
Expand Down

0 comments on commit ddc1783

Please sign in to comment.