Skip navigation.
Home

MMOX LODS Object Type Schema Example

jwatte's picture
MMOX LODS Object Type Schema Example
Version 0.1, 2009-03-01
Jon Watte (jwatte@gmail.com)


An example schema of the LODS Object Type, as described in the MMOX LODS Schema specification. The object type schema makes reference to interfaces from the vocabulary schema, where it may additionally annotate/update the referenced interfaces with extensions. Additionally, it defines methods available on this particular type of object.

<?xml version="1.0"?>
<type>
  <schemaref uri="sampleschema.xml">
    <instance iid="13" cid="1"/><!-- sphere -->
    <instance iid="12" cid="2"/><!-- box -->
    <instance iid="12" cid="3"/><!-- another box -->
    <instance :iid="1" cid="4"><!-- root -->
      <required>
        <!-- this type will always have the interaction list (although it might be empty) -->
        <list pid="9" meaning="interactions" type="interaction"/>
        <!-- this object always has a lineage -->
        <property pid="7" meaning="lineage" type="uri" schema="lineage_schema"/>
        <!-- this object always has possible restrictions -->
        <property pid="8" meaning="restrictions" type="uri" schema="restrictions_schema"/>
      </required>
    </instance>
  </schemaref>

  <!-- this is perhaps a bad example, because it means that you can make me emote some text... -->
  <method mid="1" description="Emote some text" meaning="emote_text">
    <arguments min-count="1" max-count="2"> <!-- color is optional -->
      <argument aid="1" meaning="what" type="str"/>
      <argument aid="2" meaning="color" type="color"/>
    </arguments>
    <returns/>    <!-- returns void -->
  </method>

  <!-- this is perhaps a bad example, because it means that you can make me start an animation... -->
  <method mid="2" description="Start an animation" meaning="emote_animation">
    <arguments min-count="1" max-count="1">
      <argument aid="1" meaning="animation" type="enum_animation"/>
    </arguments>
    <returns/>    <!-- returns void -->
  </method>

  <!-- this is a better example, because it allows you to perform a reasonable action on me, which results in some data that presumably will be displayed to you. -->
  <method mid="3" description="Get temperature" meaning="get_temp">
    <arguments/>
    <returns>
      <argument aid="1" meaning="temperature" type="float(32)"/>
    </returns>
  </method>

  <!-- this is a good example, because it allows you to perform a common action on me -->
  <method mid="3" description="Explode" meaning="detonate">
    <arguments/>
    <returns/>
  </method>
</schema>