# gdmxml - an XML schema for the GENTECH Genealogical Data Model # Copyright 2002 Hans Fugal default namespace = "http://gdmxml.fugal.net/1.0" start = element gdmxml { \activity* & \assertion* & \characteristic* & \characteristic-part-type* & \citation-part-type* & \event* & \event-type* & \group* & \group-type* & \persona* & \place* & \place-part-type* & \project* & \repository & \repository-source* & \representation-type* & \research-objective-activity* & \researcher* & \researcher-project* & \source* & \source-group* & \surety-scheme* } ## Administration Submodel ## ACTIVITY activity = element activity { attribute id { xsd:ID }, attribute researcher-ref { xsd:IDREF }, ( ## TypeCode is implied by which element is included here. ( \administrative-task | \search ) & element status { text } & element priority { text }? & element scheduled-date { \date }? & element completed-date { \date }? & element description { text } & element comments { text }? ) } ## ADMINISTRATIVE-TASK administrative-task = element administrative-task { empty } ## PROJECT project = element project { attribute id { xsd:ID }, attribute surety-scheme-ref { xsd:IDREF }?, ( element name { text } & element description { text }? & element client-data { text }? & \research-objective* ) } ## RESEARCH-OBJECTIVE research-objective = element research-objective { attribute id { xsd:ID }, ## project-ref is implied ## SequenceNumber is implied ( element name { text } & element description { text } & element priority { text } & element status { text } ) } ## RESEARCH-OBJECTIVE-ACTIVITY research-objective-activity = element research-objective-activity { attribute research-objective-ref { xsd:IDREF }, attribute activity-ref { xsd:IDREF } } ## RESEARCHER researcher = element researcher { attribute id { xsd:ID }, ( element name { text } & ( ## "A RESEARCHER lives in one PLACE.", and "Part of the address is connected to Place-ID in PLACE." (GDM, pg 71) Therefore connection is part of address. element address { text & attribute place-ref { xsd:IDREF } } ) & element comments { text }? ) } ## RESEARCHER-PROJECT researcher-project = element researcher-project { attribute researcher-ref { xsd:IDREF }, attribute project-ref { xsd:IDREF }, element role { text }? } ## SEARCH ## Changed from the GDM: refers to repository-source by repository-source-id instead of referring to repository and source directly. This cuts down on duplication. Likewise, activity is not referenced by repository-source search = element search { attribute repository-source-ref { xsd:IDREF }, element searched-for { text } } ## SOURCE-GROUP source-group = element source-group { attribute id { xsd:ID }, ( element name { text } & \source-group-source* ) } ## SOURCE-GROUP-SOURCE source-group-source = element source-group-source { ## source-group-ref is implied attribute source-ref { xsd:IDREF } } ## SURETY-SCHEME surety-scheme = element surety-scheme { attribute id { xsd:ID }, ( element name { text } & element description { text } & \surety-scheme-part+ ) } ## SURETY-SCHEME-PART surety-scheme-part = element surety-scheme-part { # The id is needed in spite of being embedded in surety-scheme because assertion references it attribute id { xsd:ID }, # surety-scheme-ref and SequenceNumber are implied ( element name { text } & element description { text } ) } ## Evidence Submodel ## CITATION-PART citation-part = element citation-part { attribute citation-part-type-ref { xsd:IDREF }, text } ## CITATION-PART-TYPE citation-part-type = element citation-part-type { attribute id { xsd:ID }, element name { text } } ## REPOSITORY repository = element repository { attribute id { xsd:ID }, attribute place-ref { xsd:IDREF }, ( element name { text } & element address { text }? & element phone { text }? & element hours { text }? & element comments { text }? ) } ## REPOSITORY-SOURCE # changed from gdm: Does not refer to activity and has an id attribute. SEARCH # refers to repository-source by this id. repository-source = element repository-source { attribute id { xsd:ID }, ( # This means one, the other, or both ( attribute source-ref { xsd:IDREF } ) | ( attribute repository-ref { xsd:IDREF } ) | ( attribute source-ref { xsd:IDREF }, attribute repository-ref { xsd:IDREF } ) ),( element call-number { text }? & element description { text }? ) } ## REPRESENTATION representation = element representation { # source-ref is implied attribute representation-type-ref { xsd:IDREF }, ( element medium { text }? & element content { text }? & element comments { text }? & element physical-file-code { text }? ) } ## REPRESENTATION-TYPE representation-type = element representation-type { ## "Contains a list of the types of representations of evidence, such as text, ## a TIF bitmap, a GIF bitmap, a WAV file, or other forms." attribute id { xsd:ID }, ( element name { text } & element description { text }? ) } ## SOURCE source = element source { attribute id { xsd:ID }, attribute higher-source-ref { xsd:IDREF }?, attribute subject-place-ref { xsd:IDREF }?, attribute jurisdiction-place-ref { xsd:IDREF }?, attribute researcher-ref { xsd:IDREF }?, ( \citation-part* & \representation* & element subject-date { \gen-date }? & element comments { text }? ) } ## Conclusional Submodel ## ASSERTION assertion = element assertion { attribute id { xsd:ID }, attribute surety-scheme-part-ref { xsd:IDREF }, attribute researcher-ref { xsd:IDREF }, ( ( ## An assertion is based either upon a source, or lower-level assertions. Note that ASSERTION-ASSERTION is implicit here. attribute source-ref { xsd:IDREF } | element assertion { attribute ref { xsd:IDREF } }+ ) & ( ## Note that the order of assertion-subject elements matters. \assertion-subject, \assertion-subject ) & element disproved { empty }? & element rationale { text } & element value { ## In some contexts, the 'value' is a role. Roles are either event-type or group-type, and they refer to an event-type-role or group-type-role element respectively. I am allowing both a role and text to coexist because the GDM is very vague about what restrictions, if any, are placed on the value field. element role { attribute type { "event-type" | "group-type" }, attribute ref { xsd:IDREF } }? & text? } ) } assertion-subject = element assertion-subject { attribute type { "persona" | "event" | "characteristic" | "group" }, attribute ref { xsd:IDREF } } ## CHARACTERISTIC characteristic = element characteristic { attribute id { xsd:ID }, ## changed from GDM: place-ref is not required (what place would you put for hair color?) attribute place-ref { xsd:IDREF }?, ( element date { \gen-date } & ( ## The order of the characteristic-part elements is important. \characteristic-part+ ) ) } ## CHARACTERISTIC-PART ## SequenceNum is implied. characteristic-part = element characteristic-part { attribute characteristic-part-type-ref { xsd:IDREF }, element name { text } } ## CHARACTERISTIC-PART-TYPE characteristic-part-type = element characteristic-part-type { attribute id { xsd:ID }, element name { text } } ## EVENT event = element event { attribute id { xsd:ID }, attribute event-type-ref { xsd:IDREF }, attribute place-ref { xsd:IDREF }, ( element name { text } & element date { \gen-date } ) } ## EVENT-TYPE event-type = element event-type { attribute id { xsd:ID }, ( element name { text } & \event-type-role* ) } ## EVENT-TYPE-ROLE event-type-role = element event-type-role { ## event-type-role needs an id even though it is embedded in event-type because it is referenced by the role element in assertion. attribute id { xsd:ID }, element name { text } } ## GROUP group = element group { attribute id { xsd:ID }, attribute group-type-ref { xsd:IDREF }, ## Changed from the GDM: place-ref is optional. It makes no sense to have a place-ref for a persona group intended to link personas from several places. attribute place-ref { xsd:IDREF }?, ( element name { text } & element date { \gen-date } & element criteria { text } ) } ## GROUP-TYPE group-type = element group-type { attribute id { xsd:ID }, ( element name { text } & ( ## The order of group-type-role elements is important. \group-type-role* ) ) } ## GROUP-TYPE-ROLE group-type-role = element group-type-role { ## group-type-role needs an id even though it is embedded in group-type because it is referenced by the role element in assertion. attribute id { xsd:ID }, element name { text } } ## PERSONA persona = element persona { attribute id { xsd:ID }, ( element name { text } & element description-comments { text }? ) } ## PLACE place = element place { attribute id { xsd:ID }, element existence-date { \gen-date-range }, ## The order of place-part elements is important. \place-part+ } ## PLACE-PART place-part = element place-part { attribute place-part-type-ref { xsd:IDREF }, element name { text } } ## PLACE-PART-TYPE place-part-type = element place-part-type { attribute id { xsd:ID }, element name { text } } gen-date = text gen-date-range = gen-date date = \gen-date # sequence-number seems to want alphanumeric rather than numeric in the GDM # descriptions. I suppose as long as it is sortable... sequence-number = text # $Id: gdmxml.rnc,v 1.21 2004/10/19 16:24:32 fugalh Exp $ # vim:shiftwidth=2:expandtab:softtabstop=2:filetype=rnc