/* This schema specifies the format for unit definitions. Definitions occur in special-purpose documents containing nothing else, that are made accessible on the internet. BrainML instance documents may refer to these by use of a 'unit' element that is defined in the main brainml schema. They may NOT define units themselves. If a unit needs to be added, a schema authority should submit a unit definitions document to the schema repository. */ targetNamespace "urn:bml/brainml.org:internal/BrainMetaL/1" namespace "urn:bml/brainml.org:internal/BrainMetaL/1" namespace xlink "http://www.w3.org/1999/xlink" import "http://brainml.org/schemas/internal/BrainMetaL/1/xlink.xsd" namespace "http://www.w3.org/1999/xlink" /* Allowable unit classes, representing the energy or characteristic being measured. Unit class allows applications to specify a restriction on the kinds of units that may occur in a given context. */ simpleType class-type { xs:token { /absorbed-dose|electric-current|dimensionless|electric-capacitance|electric-charge|electric-conductance|electric-potential|electric-resistance|energy|force|frequency|illuminance|inductance|length|luminous-intensity|magnetic-flux|magnetic-flux-density|mass|plane-angle|power|pressure|radioactive-activity|solid-angle|substance-amount|temperature|time|unknown/ } } /* Allowable unit base names. */ simpleType base-name-type { xs:token { /amp|becquerel|candela|coulomb|dimensionless|farad|gray|henry|hertz|joule|kelvin|gram|lumen|lux|meter|mole|newton|ohm|pascal|radian|second|siemens|steradian|tesla|volt|watt|weber|unknown/ } } /* Alternative format using enumerations. */ simpleType base-name-type-alt { xs:token { "ampere", "becquerel" } } /* Allowable unit prefixes, expressing powers of 10. */ simpleType prefix-type { xs:token { /atto|centi|deca|deci|exa|femto|giga|hecto|kilo|mega|micro|milli|nano|none|peta|pico|tera/ } } /* Single unit definition. This could be used outside of a special-purpose unit-definition document if desired. */ element unit-definition { ( /* Name of the unit. E.g., "millisecond". */ name, /* Quantity measured by unit. E.g., "electric-potential". */ class { class-type }, /* Symbol used for unit. E.g., "kg". */ symbol { xs:normalizedString }, /* Link to corresponding term or definition in an external system. */ external-equivalent? ) /* Name of a unit (composite). */ element name { ( /* Stem of unit name (e.g., "gram", "meter"). */ base-name { base-name-type } & /* Power-of-ten prefix (e.g., "kilo", "centi"). */ prefix { prefix-type }? ) } /* This is the identifier by which the unit will be referenced. Valid characters in identifiers are ONLY letters, numbers, underscore, period, and dash, and an identifier cannot start with a number. The identifier for a domain should be unique within its containing document among both domains and terms. */ required attribute id { xs:ID } } /* Supports linking of a unit declaration to a corresponding term or definition in an external system. */ element external-equivalent { required attribute xlink:href } /* Collection of unit definitions, and valid unit definition document root. */ element unit-definitions { ( unit-definition+, ) }