namespace xlink = “http://www.w3.org/1999/xlink” namespace dc = “http://purl.org/dc/elements/1.1/” ## XML schema for xmalesia project. $Revision: 1.4 $ $Date: 2008/12/11 12:08:02 $ grammar { start = ## xmal: the containing element element xmal { ## Release version of the xmal schema. Currently 0.1 attribute version { text } & ## Revision version of this instance – use RCS or SVN keywords element revision { text }? & ## Revision date of this instance – use RCS or SVN keywords element revdate { text }? & ## The main individual records database element indivs { ## Each individual organism gets a record element indiv { ## with an integer id code attribute id { xsd:ID } & element notes { richtext }? & element legal { element sit { attribute ref {xsd:IDREF }, empty }+ }? & ## Permanent marking of the individual element tagged { ## Tag code element tag { text }? & ## Plot code (could be linked later to a plots element) element plot { text }? }? & ## Location information element locn { attribute ref { xsd:IDREF } & element notes { richtext }? & ## Microhabitat information element microhab { “dry” | “saltwater”| “swampy”| “rocks” | “riverbank” }? & ## Elevation at the plant (m) element elev { “xsd:float” }? } & element pheno { element obs { element repro { “flower” | “fruit” | “bud” }+ & element date { xsd:date } & element notes { richtext }? }+ }? & ## Diameter (optional) element ontogeny { ## Measurement event (one or more) element meas { ## Date (mand) element date { xsd:date }? & element habit { “seedling” | “sapling” | “shrub” | “tree” | “liana” | “epiphyte ” | “herb” | “hemiepi” } & ## Diameter in cm element diam { attribute prec { xsd:float}? & attribute multiplestem { xsd:boolean }? & ## Information from memory? attribute mem { xsd:boolean }? & xsd:float? }? & ## Height in m element heightm { attribute prec { xsd:float}? & ## Information from memory? attribute mem { xsd:boolean }? & xsd:float? }? & element abund { “common” | “rare” }? & element dead { empty }? & element notes { richtext }? }+ }? & element ident { ( ( element taxon { attribute ref { xsd:IDREF } & attribute confid { “f-” | “f+” | “g-” |”g+” |”s-” |”s+” } & element date { xsd:date }? & element by { text }? & element email { text }? & element using { element memory { empty } | element doc { attribute ref { xsd:IDREF }, empty } | element internet { text? | element url {xsd:anyURI}? } | element match { ## One or more specimens element specimen { ( ## The herbarium acquistion code element herbcode { text } | ## The original collectors code element collcode { text } | ( element herbcode { text } & element collcode { text } ) ) & ## The collector element collby { text }? & ## Collection date element colldate { xsd:date }? & ## The herbarium housing the specimen element herb { text } & ## Determined by element detby { text }? & ## Determation date element detdate { xsd:date }? & element notes { richtext }? }+ & ## Matching notes element notes { richtext }? } }* & element notes { richtext }? }* & element mtdef { attribute id { xsd:ID } & element by { text } & element date { xsd:date } }? ) | element indivmatch { attribute ref { xsd:IDREF } & attribute confid { “lo” | “med” | “hi” } & element by { text } & element date { xsd:date } & element notes { richtext }? }* | element mtmatch { attribute ref { xsd:IDREF } & attribute confid { “lo” | “med” | “hi” } & element by { text } & element date { xsd:date } & element notes { richtext }? }* ) & element local { element lang { “malay” }, element name { text } }* & element notes { richtext }? }? & element colls { element coll { attribute collno { text } & element by { text } & element date { xsd:date }? & element notes { richtext }? & ( element repro { “bud” | “flower” | “fruit” | “sterile” }+ | element sterile { empty } )? & ## Number of replicates element reps { attribute type { “leaf” | “fruit” | “twig” | “dna” | “barkdna” | “flower” } & xsd:integer }+ }+ }? & element images { element image { attribute imgno { text } & attribute of { “flower” | “fruit” | “twig” | “seed” | “infl” | “bole” | “leaf” }? & element by { text }? & element date { xsd:date }? & element url { xsd:anyURI }? }+ }? & element charstates { element charstate { attribute char { xsd:IDREF }, attribute state { xsd:IDREF }, empty }* & element notes { text }? }? & element dna { element seq { element name { text }? & element primers { element primer { attribute dir { “fwd” | “rev” } & element name { text } & element acgt { dna } }+ } & element seqby {text }? & element contigby { text }? & element acgt { dna } & element seqdate { xsd:date }? }+ }? & element todo { richtext }? & element uses { attribute med { xsd:boolean }? & attribute food { xsd:boolean }? & richtext }? }+ }? & element legal { element situation { attribute id { xsd:ID } & element letter { element domain { “specimens” | “ip” | “research” } & element datebegin { xsd:date } & element dateend { xsd:date }? & element shortdesc { richtext } & element desc { richtext } }+ }+ }? & element taxa { ## taxon info will link out to other resources element taxon { attribute id { xsd:ID } & ## A dummy family name for taxa not yet assigned to lower rank element tmpfam { text }? & element genus { text }? & element genauth { text }? & element species { text }? & element spauthor { text }? & element subtype { “var” | “ssp” | “forma” }? & element sub { text }? & element subauth { text }? & element local { element lang { “malay” | “english” }, element name { text } }* & element notes { richtext }? & element econ { richtext }? & element med { richtext }? & element info { element doc { attribute ref { xsd:IDREF }, empty } | element url { xsd:anyURI } }* }+ }? & element chars { element char { attribute id { xsd:ID } & element phrase { text } & element notes { richtext }? & element depends { attribute char { xsd:IDREF }, attribute state { xsd:IDREF }, empty }* & element state { attribute id { xsd:ID } & element phrase { text } & element notes { richtext }? & element depends { attribute char { xsd:IDREF }, attribute state { xsd:IDREF }, empty }* }+ }+ }? & element locns { element locn { attribute id { xsd:ID } & attribute parentlocn { xsd:IDREF }? & element notes { richtext }? & element todo { richtext }? & element inpa { “tngp” }? & element veg { “secondary forest” | “primary forest” | “shrubland” | “grassland” }? & element geomorph { richtext }? & ( ( ## long in d.ddddd. = DwC:DecimalLongitude element long { xsd:float } & ## lat in d.ddddd = DwC:DecimalLatitude element lat { xsd:float } ) | element vectorfrom { attribute ref { xsd:IDREF } & element distkm { xsd:float } & element bearing { xsd:float } } )? & ## precision or bounding box, in km element preckm { xsd:float } & ## elevation ( ( element minelev { xsd:float } & element maxelev { xsd:float } ) | element meanelev { xsd:float } )? & ## = DwC:Country element country { “Indonesia” | “Malaysia” }? & ## = Dwc:StateProvince, BioGeoMancer:adm1 element province { text }? & ## = Dwc:County, BioGeoMancer:adm2 element county { text }? & ## = Dwc:Locality element locality { text }? & ## = Dwc:Island element island { “Borneo” }? }+ }? & element watchlist { element taxon { attribute ref { xsd:IDREF } & element who { text } & element email { text } }+ }? & ## Citation list for citations (optional) element citations { ## Citation text string (one or more) element citation { ## code as attribute (mand) attribute id { xsd:ID } & ## Citation as free text string (mand) element free { text }? & element bibtex { ## = bibtex type; = dc:type element type { “book” | “article” | “incollection” } & ## = bibtex:author; = dc:creator element author { text } & ## = bibtex:editor; element editor { text }? & ## = bibtex:title; = dc:title element title { text } & ## = bibtex:booktitle; = dc:title element booktitle { text }? & ## = bibtex:year; = dc:date element year { xsd:integer } & ## = bibtex:journal; ~= dc:source element journal { text }? & ## = bibtex:volume element volume { xsd:integer }? & ## = bibtex:pages element pages { text }? & ## = bibtex:publisher; ~= dc:publisher element publisher { text }? & ## = bibtex:address element address { text }? & element doi { xsd:anyURI }? }? }+ }? } ## Richtext: the main text descriptions can contain interleaved: richtext = ## Plain text text* & ## Hypertext links to external URLs element url { attribute ref {xsd:anyURI}, text }* & ## Hypertext links to citation source codes (lowercase, one word) citex* & ## Paragraph breaks element pb { empty }* ## Citation link to citation source codes (lowercase, one word) citex = element cite { attribute ref { xsd:IDREF }, text? } dna = xsd:token { pattern = “[ACGTN-s]+” } }