# XML schema for ISO 11179 Part 3, Edition 2, # derived from the XMDR OWL ontology for ISO 11179: # http://hpcrd.lbl.gov/SDM/XMDR/ont/iso11179-3e2.owl # # See the XMDR XML Schema Guide for more information: # http://hpcrd.lbl.gov/SDM/XMDR/doc/schema.html # # *Almost complete* # This schema currently does not accommodate the # "specificDefinition"/"specificDesignation" property pair, # because doing so would require use of rdf:nodeID, which # is disallowed in property-and-node elements. Since this # is a little-used property pair, we're just not worrying # about it right now. # # Authored in RELAX NG (compact syntax), using GNU Emacs RNC Mode: # http://www.pantor.com/download.html # # Translated into XML syntax and W3C XML Schema using trang: # http://thaiopensource.com/relaxng/trang.html # # Kevin D. Keck, Lawrence Berkeley National Lab # kdkeck@lbl.gov default namespace mdr = "http://hpcrd.lbl.gov/SDM/XMDR/ont/iso11179-3e2.owl#" namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" # implicit: # datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes" # A document (aka resource) can be an AdministeredItem, # a ValueMeaning, a ReferenceDocument, a Contact, # an Organization (which subsumes RegistrationAuthority), # or a ClassificationSchemeItem. start = administeredItem | valueMeaning | referenceDocument | contact | organization | classificationSchemeItem contact = element Contact { base, # xml:base and rdf:about="" element name { Any }, element title { Any }?, element information { Any } } organization = element Organization { organizationContent } | element RegistrationAuthority { RegistrationAuthorityIdentifier, organizationContent, element languageUsed { LanguageIdentification }+ } organizationContent = base, # xml:base and rdf:about="" element name { Any }, element mailingAddress { Any }? RegistrationAuthorityIdentifier = element registrationAuthorityIdentifier { attribute rdf:parseType { "Resource" }, element internationalCodeDesignator { String }, element organizationIdentifier { String }, element organizationPartIdentifier { String }?, element opiSource { String }? } classificationSchemeItem = element ClassificationSchemeItem { base, element source { resource }, # A ClassificationScheme ((TypeName, Value?) | Value), Relationship* } TypeName = element typeName { String } Value = element value { String } Relationship = element relationship { # This does not follow the normal schema form, # in that a choice has not been made between "item" # and "relationship" as the explicit property. # This is because the ontology is broken; # a better ontology, as will be developed for # Edition 3, will eliminate the need for this kludge. # # Note also that this kludge is not being used for # ConceptRelationships, which are AdministeredItems. attribute rdf:parseType { "Resource" }, element typeDescription { Any }, element item { resource } # of same class as parent of relationship } administeredItem = ConceptualDomain | ValueDomain | ObjectClass | Property | ClassificationScheme | DerivationRule | RepresentationClass | element Context { itemContent } | element DataElement { itemContent, element type { resource }, # a RepresentationClass element domain { resource }, # a ValueDomain element meaning { resource }?, # a DataElementConcept dataElementDerivation?, element example { String }* } | element DataElementConcept { itemContent, element domain { resource }, # a ConceptualDomain element objectClass { resource }?, # an ObjectClass element objectClassQualifier { resource }?, # an ObjectClassQualifier element property { resource }?, # a Property element propertyQualifier { resource }?, # a PropertyQualifier Relationship* } dataElementDerivation = element derivation { attribute rdf:parseType { "Resource" }, element rule { resource }, # a DerivationRule element input { resource }+ # input DataElements } ConceptualDomain = element EnumeratedConceptualDomain { itemContent, Relationship*, memberValueMeaning+ } | element NonEnumeratedConceptualDomain { itemContent, Relationship* } memberValueMeaning = element memberValue { resource } ValueDomain = element EnumeratedValueDomain { valueDomainContent, memberPermissibleValue+ } | element NonEnumeratedValueDomain { valueDomainContent } valueDomainContent = itemContent, element type { resource }?, # a RepresentationClass element meaning { resource }?, # a ConceptualDomain element datatype { datatypeContent }, element format { String }?, element maximumCharacterQuantity { Int }?, element unit { unitContent }?, Relationship* datatypeContent = attribute rdf:parseType { "Resource" }, element name { Any }, element description { Any }?, element datatypeSchemeReference { String }, element annotation { Any }? unitContent = attribute rdf:parseType { "Resource" }, element name { Any }, element precision { Int } memberPermissibleValue = element memberValue { attribute rdf:parseType { "Resource" }, Value, element meaning { resource }, # a ValueMeaning dates } ObjectClass = element Concept { itemContent } | element ConceptRelationship { itemContent, # Exactly two items: Item, Item } Item = element item { resource } Property = element Property { itemContent } ClassificationScheme = element ClassificationScheme { itemContent, TypeName } DerivationRule = element DerivationRule { itemContent, element ruleSpecification { String } } RepresentationClass = element RepresentationClass { itemContent } itemContent = base, element identifier { # ItemIdentifier attribute rdf:parseType { "Resource" }, RegistrationAuthorityIdentifier, element dataIdentifier { String }, element version { String } }, element registrationAuthority { resource }, # a RegistrationAuthority element administrationRecord { attribute rdf:parseType { "Resource" }, element registrationStatus { String }, element administrativeStatus { String }, element creationDate { xsd:date }, element lastChangeDate { xsd:date }?, element effectiveDate { xsd:date }?, element untilDate { xsd:date }?, element changeDescription { Any }?, element administrativeNote { Any }?, element explanatoryComment { Any }?, element unresolvedIssue { Any }?, element origin { String }? }, element steward { stewardContent }, element submitter { # same as steward stewardContent }*, # spec says one, but EDR has any number element terminologicalEntry { attribute rdf:parseType { "Resource" }, element entryContext { resource }, # a Context element section { LanguageSection }+ }+, element reference { resource }*, element classification { resource }* LanguageSection = attribute rdf:parseType { "Resource" }, element sectionLanguage { LanguageIdentification }, ((Designation+, Definition*) | Definition+) Designation = element designation { attribute rdf:parseType { "Resource" }, element name { Any }, element isPreferred { Boolean }? } Definition = element definition { attribute rdf:parseType { "Resource" }, element source { resource }?, # a ReferenceDocument element text { Any }, element isPreferred { Boolean }? } stewardContent = attribute rdf:parseType { "Resource" }, element organization { resource }, # an Organization element contact { resource } # a Contact valueMeaning = element ValueMeaning { base, element identifier { # a ValueMeaningIdentifier attribute rdf:parseType { "Resource" }, element string { String } }, dates, element description { Any }? } referenceDocument = element ReferenceDocument { base, element title { Any }?, element referenceDocumentTypeDescription { Any }?, element identifier { # a DocumentIdentifier attribute rdf:parseType { "Resource" }, element string { String } }, element languageUsed { LanguageIdentification }* } LanguageIdentification = attribute rdf:parseType { "Resource" }, element language { String }, element countryIdentifier { String }? dates = element beginDate { Date }, element endDate { Date }? base = attribute xml:base { xsd:anyURI }, attribute rdf:about { string "" } # *must* match base # (the about="" idiom is also commonly used in OWL for the Ontology header) resource = # attribute rdfs:label { string }?, attribute rdf:resource { xsd:anyURI } # Literal types # Include rdf:datatype to support RDF parsing: String = attribute rdf:datatype { "http://www.w3.org/2001/XMLSchema#string" }, xsd:string Date = attribute rdf:datatype { "http://www.w3.org/2001/XMLSchema#date" }, xsd:date Int = attribute rdf:datatype { "http://www.w3.org/2001/XMLSchema#int" }, xsd:int Boolean = attribute rdf:datatype { "http://www.w3.org/2001/XMLSchema#boolean" }, xsd:boolean # "untyped" literal; allows an xml:lang qualifier # use of string builtin type blocks whitespace normalization Any = attribute xml:lang { "http://www.w3.org/2001/XMLSchema#language" }?, string