Skip to content

Commit

Permalink
Add support for id, system, and scope attribute on annotation elements
Browse files Browse the repository at this point in the history
Resolves #335
  • Loading branch information
amoeba committed Jul 12, 2019
1 parent 315726b commit 09ffc6b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
27 changes: 27 additions & 0 deletions src/test/resources/eml-with-annotations-with-ids.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<eml:eml packageId="test.1.4" system="KNB"
xmlns:eml="eml://ecoinformatics.org/eml-2.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="eml://ecoinformatics.org/eml-2.2.0 eml.xsd">
<dataset id="hi">
<title>Sample datset Description</title>
<creator id="23445" scope="document">
<individualName>
<surName>Smith</surName>
</individualName>
</creator>
<!-- Annotations can have id, system, and scope set on them -->
<annotation id="myanno" system="earth" scope="document">
<propertyURI label="Subject">http://purl.org/dc/elements/1.1/subject</propertyURI>
<valueURI label="grassland biome">http://purl.obolibrary.org/obo/ENVO_01000177</valueURI>
</annotation>
<contact id="b">
<individualName>
<surName>Johnson</surName>
</individualName>
</contact>
<contact>
<references>23445</references>
</contact>
</dataset>
</eml:eml>
6 changes: 5 additions & 1 deletion xsd/eml-semantics.xsd
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:doc="eml://ecoinformatics.org/documentation-2.2.0" xmlns="eml://ecoinformatics.org/semantics-2.2.0" targetNamespace="eml://ecoinformatics.org/semantics-2.2.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:doc="eml://ecoinformatics.org/documentation-2.2.0" xmlns="eml://ecoinformatics.org/semantics-2.2.0" xmlns:res="eml://ecoinformatics.org/resource-2.2.0" targetNamespace="eml://ecoinformatics.org/semantics-2.2.0">
<xs:import namespace="eml://ecoinformatics.org/documentation-2.2.0" schemaLocation="eml-documentation.xsd"/>
<xs:import namespace="eml://ecoinformatics.org/resource-2.2.0" schemaLocation="eml-resource.xsd"/>
<xs:annotation>
<xs:documentation>
Copyright: 2017 Regents of the University of California
Expand Down Expand Up @@ -210,6 +211,9 @@
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="id" type="res:IDType" use="optional"/>
<xs:attribute name="system" type="res:SystemType" use="optional"/>
<xs:attribute name="scope" type="res:ScopeType" use="optional" default="document"/>
</xs:complexType>
<xs:element name="annotation" type="SemanticAnnotation">
<xs:annotation>
Expand Down

0 comments on commit 09ffc6b

Please sign in to comment.