<?xml version="1.0" encoding="UTF-8"?>

<dm:page xmlns:dm="http://datamixer.org/config"
	 xmlns:dmio="http://datamixer.org/config/io">

<!-- semesters -->
<dmio:element name="semester" id="xmlSemesters" scope="application">
  <dmio:file-writer id="semesterWriter" path="xml/semesters.xml"/>
  <dmio:xml-format id="xmlSemesterFormatter"/>

  <!-- season, year -->
  <dmio:attribute name="season" value="semester.season"/>
  <dmio:attribute name="year" value="semester.year"/>

  <!-- classes -->
  <dmio:element name="class" value="semester.classes">
    <dmio:attribute name="name" value="class.name"/>
  </dmio:element>

</dmio:element>

<!-- classes -->
<dmio:element name="class" id="xmlClasses" scope="application">
  <dmio:file-writer id="classWriter" path="xml/classes.xml"/>
  <dmio:xml-format id="xmlClassFormatter"/>

  <!-- name, book -->
  <dmio:attribute name="name" value="class.name"/>
  <dmio:attribute name="book" value="class.book"/>

  <!-- room -->
  <dmio:element name="room">
    <dmio:attribute name="name" value="classroom.room_name"/>
    <dmio:attribute name="building" value="classroom.building.name"/>
  </dmio:element>

  <!-- teacher -->
  <dmio:element name="teacher">
    <dmio:attribute name="first" value="teacher.name.first"/>
    <dmio:attribute name="last" value="teacher.name.last"/>
  </dmio:element>

  <!-- students -->
  <dmio:element name="student" value="class.students">
    <dmio:attribute name="first" value="student.name.first"/>
    <dmio:attribute name="last" value="student.name.last"/>
  </dmio:element>

</dmio:element>

<!-- teachers -->
<dmio:element name="teacher" id="xmlTeachers" scope="application">
  <dmio:file-writer path="xml/teachers.xml"/>
  <dmio:xml-format/>

  <!-- hours -->
  <dmio:attribute name="hours" value="teacher.office_hours"/>

  <!-- name -->
  <dmio:element name="name">
    <dmio:attribute name="first" value="name.first"/>
    <dmio:attribute name="last" value="name.last"/>
  </dmio:element>

  <!-- office -->
  <dmio:element name="office">
    <dmio:attribute name="name" value="office.room_name"/>
    <dmio:attribute name="building" value="office.building.name"/>
  </dmio:element>

</dmio:element>

<!-- names -->
<dmio:element name="name" id="xmlNames" scope="application">
  <dmio:file-writer path="xml/names.xml"/>
  <dmio:xml-format/>
  <dmio:attribute name="first" value="name.first"/>
  <dmio:attribute name="last" value="name.last"/>
</dmio:element>

<!-- rooms -->
<dmio:element name="room" id="xmlRooms" scope="application">
  <dmio:file-writer path="xml/rooms.xml"/>
  <dmio:xml-format/>
  <dmio:attribute name="name" value="room_name"/>
  <dmio:attribute name="building" value="building.name"/>
</dmio:element>

<!-- buildings -->
<dmio:element name="building" id="xmlBuildings" scope="application">
  <dmio:file-writer path="xml/buildings.xml"/>
  <dmio:xml-format/>
  <dmio:attribute name="name" value="building.name"/>
</dmio:element>

</dm:page>
