My favorites | Sign in
Project Home
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 7: individualName element
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  htobon
Closed:  Oct 2010
Cc:  daniel.amariles88, wixner@gmail.com


 
Project Member Reported by htobon, Sep 28, 2010
Sub-elements of individualName have a wrong data type.

From xs:string to NonEmptyStringType.


GBIF EML Echema:

<xs:element name="individualName">
...
   <xs:element name="givenName" type="xs:string" minOccurs="0">
...
   <xs:element name="surName" type="xs:string">
...
</xs:element>


Official EML Schema:

<xs:complexType name="Person">
...
   <xs:element name="givenName" type="res:NonEmptyStringType" minOccurs="0" maxOccurs="unbounded">
...
   <xs:element name="surName" type="res:NonEmptyStringType">
...
  </xs:complexType>


NOTE: (maxOccurs="unbounded") should be added for the givenName element?
Sep 28, 2010
Project Member #1 htobon
positionName element has the same problem.

<xs:element name="positionName" type="xs:string" minOccurs="0">
Sep 30, 2010
Project Member #2 htobon
(No comment was entered for this change.)
Cc: wixner
Sep 30, 2010
Project Member #3 htobon
Also, the positionName element should be inside the "xs:choice" indicator.

GBIF EML Schema:
<xs:sequence>
   <xs:choice maxOccurs="unbounded" minOccurs="1">
      <xs:element name="organizationName" type="xs:string">
      ...    
      <xs:element ref="individualName"/>
   </xs:choice>
   <xs:element name="positionName" type="xs:string" minOccurs="0">
   ...     
   </xs:element>
...
</xs:sequence>


Official EML Eschema:
<xs:sequence>
   <xs:choice maxOccurs="unbounded">
      <xs:element name="individualName" type="Person">
      ...
      <xs:element name="organizationName" type="res:NonEmptyStringType">
      ...
      <xs:element name="positionName" type="res:NonEmptyStringType">
   ...
   </xs:choice>
...
</xs:sequence>

Sep 30, 2010
Project Member #4 wixner@gmail.com
use the NonEmptyStringType, yes.
We dont want given name to be repeated, so please leave it with a max=1.

We dont want our schema to be exactly like the eml one, we just need to make sure that anything that validates against ours also does so for the official one.

Regarding the choices we need to look at that in detail again.
I dont think we want it to be like the original where you can have multiple names, positions or organizationNames. We want only one for each I believe.

The construcut of sequence/choice(unbounded) is often found when you want the actual elements not to be in a specific order. The sideeffect is that you can repeat them. This sometimes can be accomplished with the xs:all tag instead that allows each child element to occurr exactly once in any order. I think that could fit our purpuse best to be honst and would be compatible with an unbounded choice in the official schema.

Try to validate this:

<xs:all minOccurs="1">
      <xs:element name="organizationName" type="xs:string">
      <xs:element ref="individualName"/>
      <xs:element name="positionName" type="xs:string" minOccurs="0">
      ...    
</xs:all>

Labels: -Priority-Low Priority-Medium
Oct 4, 2010
Project Member #6 wixner@gmail.com
(No comment was entered for this change.)
Status: Accepted
Labels: -Priority-Critical Priority-Medium
Oct 4, 2010
Project Member #7 htobon
I tried to validate this:

<xs:complexType name="agentType">
   <xs:sequence>
      <xs:all minOccurs="1">
         <xs:element name="organizationName" type="NonEmptyStringType">
         ...        
         <xs:element ref="individualName"/>
         <xs:element name="positionName" type="NonEmptyStringType" minOccurs="0">
         ...
         </xs:element>
      </xs:all>      
      <xs:element ref="address" minOccurs="0"/>
      <xs:element ref="phone" minOccurs="0"/>
      <xs:element ref="electronicMailAddress" minOccurs="0"/>
      <xs:element ref="onlineUrl" minOccurs="0"/>
   </xs:sequence>
</xs:complexType>

xs:all should not be inside a xs:sequence.

This was the error: "The content of 'sequence' must match (annotation?, (element | group \ choice \ sequence \ any)*). A problem was found starting at: all."

so...
I left everything as it was, but I changed the data types to NonEmptyStringType.

fixed in r151.
Status: Fixed

Powered by Google Project Hosting