# ############################################################## # # File: nmlbase.rnc - Main schema definition # Version: $Id$ # Purpose: This is the main schema file, it defines the # general topology elements of NML # # ############################################################## # ############################################################## # Namespace definitions # ############################################################## default namespace nml = "http://schemas.ogf.org/nml/base/201103/beta/" NetworkObject = ( Identifier & Name? & Relation* & Lifetime? ) | IdReference Identifier = attribute id { xsd:string } IdReference = attribute idRef { xsd:string } Name = element name { attribute type { xsd:string }? & xsd:string } Relation = element relation { attribute type { xsd:string } & IdReference* & anyElement* } Lifetime = element lifetime { StartTime & (EndTime | Duration)? } # ################################################################# # This sequence allows any element, attribute, or text (regardless # of name or namespace) into the document when invoked. # ################################################################# anyElement = element * { anyThing } anyAttribute = attribute * { text } anyThing = ( anyElement | anyAttribute | text )* ## ######################## ## Time elements ## ######################## StartTime = anyElement* EndTime = anyElement* Duration = anyElement* ## ######################## ## Generic location ## ######################## LocationContent = element continent { xsd:string }? & element country { xsd:string }? & element zipcode { xsd:integer }? & element state { xsd:string }? & element institution { xsd:string }? & element city { xsd:string }? & element streetAddress { xsd:string }? & element floor { xsd:string }? & element room { xsd:string }? & element cage { xsd:string }? & element rack { xsd:string }? & element shelf { xsd:string }? & element latitude { xsd:float }? & element longitude { xsd:float }? ## ######################## ## Generic link ## ######################## BaseLink = element link { BaseLinkContent } BaseLinkContent = NetworkObject & element type { xsd:string }? & element capacity { xsd:string }? & anyElement* ## ######################## ## Generic port ## ######################## BasePort = element port { BasePortContent } BasePortContent = NetworkObject & anyElement* ## ######################## ## Generic node ## ######################## BaseNode = element node { BaseNodeContent } BaseNodeContent = NetworkObject & element location { LocationContent }? & anyElement* ## ######################## ## Generic service ## ######################## BaseService = element service { BaseServiceContent } BaseServiceContent = NetworkObject & anyElement* ## ######################## ## Groups ## ######################## Group = Topology | Domain | Network ## ######################## ## Generic topology ## ######################## Topology = element topology { BaseTopologyContent } BaseTopologyContent = NetworkObject & BaseLink* & BasePort* & BaseNode* & anyElement* ## ######################## ## Generic domain ## ######################## Domain = element domain { BaseDomainContent } BaseDomainContent = NetworkObject & anyElement* ## ######################## ## Generic network ## ######################## Network = element network { BaseNetworkContent } BaseNetworkContent = NetworkObject & anyElement*