MUGL Schema

This page gives the XML schema for MUGL files in the RELAX NG Compact syntax, which is a simple, easy to read syntax for expressing XML schemas. For more information about the RELAX NG Compact syntax, see the RELAX NG Compact Syntax Tutorial.
start = (
   mugl
)

mugl = element mugl {
   graphcontents
 |
   element graph {
      attribute x       { xsd:integer }?&
      attribute y       { xsd:integer }?&
      attribute width   { xsd:integer }?&
      attribute height  { xsd:integer }?&
      graphcontents
   }+
}

graphcontents = (
   element background {
      attribute color   { text }?&
      element img {
         attribute frame    { text }?&
         attribute anchor   { text }?&
         attribute base     { text }?&
         attribute position { text }?&
         attribute src      { text }?
      }?
   }?&
   element ui {
      attribute eventhandler { text }?
   }?&
   element window {
      attribute width   { xsd:integer }?&
      attribute height  { xsd:integer }?&
      attribute margin  { xsd:integer }?&               # default: 2
      attribute border  { xsd:integer }?&               # default: 2
      attribute padding { xsd:integer }?                # default: 5
   }?&
   element legend {
      attribute visible      { text }?&
      attribute frame        { text }?&
      attribute base         { text }?&
      attribute anchor       { text }?&
      attribute position     { text }?&
      attribute color        { text }?&
      attribute bordercolor  { text }?&
      attribute opacity      { text }?&
      attribute border       { xsd:integer }?&
      attribute rows         { xsd:integer }?&
      attribute columns      { xsd:integer }?&
      attribute cornerradius { xsd:integer }?&
      element icon {
         attribute height      { xsd:integer }?&
         attribute width       { xsd:integer }?&
         attribute border      { xsd:integer }?
      }?
   }?&
   element title {
      attribute frame        { text }?&
      attribute base         { text }?&
      attribute anchor       { text }?&
      attribute position     { text }?&
      attribute color        { text }?&
      attribute bordercolor  { text }?&
      attribute opacity      { text }?&
      attribute border       { xsd:integer }?&
      attribute fontsize     { xsd:integer }?&
      attribute padding      { xsd:integer }?&
      attribute cornerradius { text }?&
      text
   }?&
   element networkmonitor {
      attribute visible { text }?&
      attribute fixed { text }?
   }?&
   element debugger {
      attribute visible { text }?&
      attribute fixed { text }?
   }?&
   element plotarea {
      attribute marginbottom { xsd:integer }?&
      attribute marginleft   { xsd:integer }?&
      attribute marginright  { xsd:integer }?&
      attribute margintop    { xsd:integer }?
   }?&
   (
        horizontalaxis*&
        verticalaxis*
   )&
   plot*&
   data+
)

horizontalaxis = element horizontalaxis {
   axis
}

verticalaxis = element verticalaxis {
   axis
}

axis = (
   attribute id       { text }?&
   attribute type     { text }?&		# 'number' or 'datetime' (default: 'number')
   attribute position { xsd:integer }?&		# default: 0
   attribute positionbase { text }?&		# default: null
   attribute pregap   { xsd:integer }?&		# default: 0
   attribute postgap  { xsd:integer }?&		# default: 0
   attribute min      { text }?&		# number or 'auto'; default: 'auto'
   attribute max      { text }?&		# number or 'auto'; default: 'auto'
   attribute minoffset { text }?&		# number; default: 0
   attribute maxoffset { text }?&		# number; default: 0
   attribute minposition { text }?&
   attribute maxposition { text }?&
   attribute length { text }?&
   attribute anchor { text }?&
   attribute base { text }?&
   attribute tickmin   { text }?&
   attribute tickmax   { text }?&
   attribute linewidth  { xsd:integer }?&
   attribute highlightstyle   { text }?&
   element title {
      attribute position   { text }?&		# pair of numbers, separated by spaces; default '0 -30' for horiz, '-20 0' for vert
      attribute anchor     { text }?&		# pair of numbers, separated by spaces
      attribute angle      { xsd:integer }?&	# number; default: 0
      text					# default: id
   }?&
   element axiscontrols {
      attribute visible   { text }
   }?&
   element grid {
      attribute visible { text }?&
      attribute color   { text }?
   }?&
   element labels {
      (
         attribute format   { text }?&		# default: '%1d'
         attribute start    { text }?&		# default: 0
         attribute angle    { text }?&		# default: 0
         attribute position { text }?&		# pair of numbers, separated by spaces; default: '3 -15' for horiz, '-5 -3' for vert
         attribute anchor   { text }?&		# pair of numbers, separated by spaces; default: '-1 -1'
         attribute spacing  { text }?		# list of x-axis distances, separated by spaces.
         					#    default: '10000 5000 2000 1000 500 200 100 50 20 10 5 2 1 0.1 0.01 0.001'
      )
    |
      (
         attribute format   { text }?&		# see above
         attribute start    { text }?&		# see above
         attribute angle    { text }?&		# see above
         attribute position { text }?&		# see above
         attribute anchor   { text }?&		# see above
         element label {
            attribute format   { text }?&	# same as for 'labels' element; default is value from containing 'labels' element
            attribute start    { text }?&	# same as for 'labels' element; default is value from containing 'labels' element
            attribute angle    { text }?&	# same as for 'labels' element; default is value from containing 'labels' element
            attribute position { text }?&	# same as for 'labels' element; default is value from containing 'labels' element
            attribute anchor   { text }?&	# same as for 'labels' element; default is value from containing 'labels' element
            attribute spacing  { text }		# x-axis distance
         }+
      )
   }?&
   element pan {
      attribute allowed { text }?&		# 'yes' or 'no'; default: 'yes'
      attribute min { text }?&			# default: null
      attribute max { text }?			# default: null
   }?&
   element zoom {
      attribute allowed { text }?&		# 'yes' or 'no'; default: 'yes'
      attribute min { text }?&			# default: null
      attribute max { text }?&			# default: null
      attribute anchor { text }?		# number; default: null
   }?&
   element binding {
      attribute id  { text }&
      attribute min { text }&
      attribute max { text }
   }?
)

plot = element plot {
   element legend {
      attribute label { text }?&
      attribute visible { text }?
   }?&
   element horizontalaxis {
      plotaxis
   }?&
   element verticalaxis {
      plotaxis
   }?&
   element renderer {
      attribute type { text },
      element option {
         attribute name { text }&
         attribute value { text }&
         attribute min { text }?&
         attribute max { text }?
      }*
   }
}

plotaxis = (
   attribute ref { text },
   (
      element variable {
         attribute ref { text }
      }*
   |
      element constant {
         attribute value { text }
      }
   )
)

data = element data {
   element variables {
      attribute missingvalue { text }?&
      attribute missingop    { text }?&
      element variable {
         attribute id           { text }&
         attribute column       { text }?&
         attribute type         { text }?&
         attribute missingvalue { text }?&
         attribute missingop    { text }?
      }+
   }?,
   (
      element values { text }
      |
      element csv {
         attribute location { text }
      }
      |
      element service {
         attribute location { text }
      }
   )
}
Note: this web site is for the old, Flash-based, version of Multigraph. Starting in December 2012, there is a new JavaScript/HTML5 version of Multigraph, which is distributed from the site multigraph.github.io. Future projects should use the new JavaScript/HTML5 version of Multigraph rather than the Flash version described here.