Skip to content

Commit

Permalink
Changed dependency to use a ComplexType.
Browse files Browse the repository at this point in the history
Removed use of `ref` to a global element.  Details in issue #305.
  • Loading branch information
mbjones committed Jun 29, 2018
1 parent 595f1dc commit 07b4498
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 21 deletions.
54 changes: 54 additions & 0 deletions src/test/resources/eml-software-220.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<eml:eml xmlns:eml="eml://ecoinformatics.org/eml-2.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
packageId="eml-1.2" system="knb"
xsi:schemaLocation="eml://ecoinformatics.org/eml-2.2.0 xsd/eml.xsd">
<software>
<alternateIdentifier>eml2</alternateIdentifier>
<title>eml2: Create and Manipulate Data using the Ecological Metadata Language</title>
<creator id="http://orcid.org/0000-0002-1642-628X">
<individualName>
<givenName>Carl</givenName>
<surName>Boettiger</surName>
</individualName>
<address/>
<electronicMailAddress>cboettig@gmail.com</electronicMailAddress>
</creator>
<abstract>A successor to the 'EML' R package which provides the same high level
functions for creating and extracting data from 'EML' files, while
providing a simpler and more user friendly lower level interface.
</abstract>
<implementation>
<distribution>
<online>
<url>https://github.com/cboettig/eml2</url>
</online>
</distribution>
<size>466.612KB</size>
<programmingLanguage>R 3.5.0</programmingLanguage>
</implementation>
<dependency>
<action>install</action>
<software>
<alternateIdentifier>xml2</alternateIdentifier>
<title>xml2</title>
<creator>
<references>http://orcid.org/0000-0002-1642-628X</references>
</creator>
<implementation>
<distribution>
<online>
<url>https://github.com/cboettig/eml2</url>
</online>
</distribution>
<size>466.612KB</size>
<programmingLanguage>R 3.5.0</programmingLanguage>
</implementation>
<licenseURL>https://spdx.org/licenses/MIT</licenseURL>
<version>1.4</version>
</software>
</dependency>
<licenseURL>https://spdx.org/licenses/MIT</licenseURL>
<version>xxx</version>
</software>
</eml:eml>
41 changes: 20 additions & 21 deletions xsd/eml-software.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element ref="dependency" minOccurs="0" maxOccurs="unbounded">
<xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<doc:tooltip>dependency</doc:tooltip>
Expand All @@ -299,7 +299,7 @@
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element ref="dependency" minOccurs="0" maxOccurs="unbounded">
<xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:appinfo>
<doc:tooltip>dependency</doc:tooltip>
Expand Down Expand Up @@ -380,22 +380,21 @@
<xs:enumeration value="assert"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="dependency">
<xs:annotation>
<xs:appinfo>
<doc:tooltip>Dependency</doc:tooltip>
<doc:summary>Dependency describes the software package(s) that the
software package is dependent upon.</doc:summary>
<doc:description>The dependency element is recursive. It is a
sub-element of the software Element but it also has as a sub-element
its parent element Software Package. Dependency has been made optional
because to make it mandatory does not allow the recursion to end.
Dependency has also been made a sub-element of implementation because
there can be both implementation and package level dependencies within
a package.</doc:description>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:complexType name="DependencyType">
<xs:annotation>
<xs:appinfo>
<doc:tooltip>Dependency</doc:tooltip>
<doc:summary>Dependency describes the software package(s) that the
software package is dependent upon.</doc:summary>
<doc:description>The dependency element is recursive. It is a
sub-element of the software Element but it also has as a sub-element
its parent element Software Package. Dependency has been made optional
because to make it mandatory does not allow the recursion to end.
Dependency has also been made a sub-element of implementation because
there can be both implementation and package level dependencies within
a package.</doc:description>
</xs:appinfo>
</xs:annotation>
<xs:sequence>
<xs:element name="action" type="Action">
<xs:annotation>
Expand All @@ -415,8 +414,8 @@
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element ref="software"/>
<xs:element name="software" type="SoftwareType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:complexType>
<xs:element name="dependency" type="DependencyType"/>
</xs:schema>

0 comments on commit 07b4498

Please sign in to comment.