Commit ea53785efd79486ba2bcb0ad5c3c6d00265a2fa3

Authored by ankraft
1 parent 4c6327a9

- Copied from schema2.0

- Moved <Doc> elements to the top of each element.
- Added <Doc> to <Domain>
- DeviceDef is now directly included in SubDevice
- Added structured DataType and renamed element name in using elements
- Added unitOfMeasure attribute to DataType

Too many changes to show.

To preserve performance only 31 of 68 files are displayed.

  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +
  3 +<!-- - HGI Device Abstraction Layer - - - - - - - - - - - - - - - - - - - - -->
  4 +<!-- -->
  5 +<!-- Extends the standard build with targets for: -->
  6 +<!-- - generate XML schema the from Relax NG (xml) description -->
  7 +<!-- - validate DAL documents against the XML Schema -->
  8 +<!-- - generate HTML documentation from DAL documents -->
  9 +
  10 +<project name="importing" basedir="." default="schemas">
  11 + <import file="etc/common.xml"/>
  12 +
  13 + <!-- Read the namespace declarations from a file (to get linebreaks) - - - -->
  14 +
  15 + <loadfile property="schema.xmlns" srcFile="${basedir}/etc/schema.xmlns"/>
  16 +
  17 + <!-- The RNG file the XML and RNC schemas are generaed from - - - - - - - -->
  18 +
  19 + <property name="schema.name" value="domain"/>
  20 + <property name="schema.rng" value="${path.src}/${schema.name}.rng"/>
  21 +
  22 + <!-- HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  23 + <!-- -->
  24 + <!-- Generate HTML documentation from domain definitions in the test -->
  25 + <!-- directory. The module classes included via the extends tagged are -->
  26 + <!-- included in the documentation - so an xinclude capable XSL engine is -->
  27 + <!-- needed. -->
  28 + <!-- This needs Ant version 1.8+ and it must be augmented with an current -->
  29 + <!-- version of Xerces. Download the binray distribution and place the put -->
  30 + <!-- xml-apis.jar and xercesImpl.jar in the Ant lib directory. -->
  31 +
  32 + <target name="html">
  33 + <mkdir dir="${path.genbase}" />
  34 + <xslt basedir="${basedir}/test" destdir="${basedir}/gen/html"
  35 + style="${basedir}/style/html.xsl">
  36 + <param name="destdir" expression="${basedir}/gen/html"/>
  37 + <sysproperty
  38 + key="org.apache.xerces.xni.parser.XMLParserConfiguration"
  39 + value="org.apache.xerces.parsers.XIncludeParserConfiguration"/>
  40 + </xslt>
  41 + </target>
  42 +
  43 + <!-- Schemas - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  44 + <!-- -->
  45 + <!-- The schema is specified using Relax NG (xml) and trang is used to -->
  46 + <!-- generate the XML schema. The schema is also generated in Relay NG -->
  47 + <!-- compact syntax, which is used by some validating editors (e.g. emacs) -->
  48 + <!-- The resulting schemas need some additional patching before thy are -->
  49 + <!-- usable -->
  50 +
  51 + <target name="schemas">
  52 + <java jar="${basedir}/lib/trang.jar" fork="true">
  53 + <arg value="${schema.rng}"/>
  54 + <arg value="${basedir}/etc/${schema.name}.rnc"/>
  55 + </java>
  56 +
  57 + <!-- So that the editor does not complain about include directives, the -->
  58 + <!-- resulting schema is included in another schema, which includes the -->
  59 + <!-- necessary element definitions. To be able to do this the -->
  60 + <!-- definition for Imports must be deleted from this generated schema. -->
  61 +
  62 + <replace file="${basedir}/etc/${schema.name}.rnc"
  63 + token="Imports = element Imports { Domain* }?" value=""/>
  64 +
  65 + <java jar="${basedir}/lib/trang.jar" fork="true">
  66 + <arg value="${schema.rng}"/>
  67 + <arg value="${path.src}/${schema.name}.xsd"/>
  68 + </java>
  69 +
  70 + <!-- Can't validate against the generated schema unless we add the -->
  71 + <!-- target and default namespaces ... -->
  72 +
  73 + <replace file='${path.src}/domain.xsd'
  74 + token='xmlns:xs="http://www.w3.org/2001/XMLSchema"'
  75 + value='${schema.xmlns}'/>
  76 +
  77 + <!-- In addition the xml:base tag, which is added automatically when -->
  78 + <!-- including a document, must also be permitted by out schema. -->
  79 + <!-- The schema generated from RNG is almost correct schema ... but -->
  80 + <!-- the schemaLocation is wrong. -->
  81 +
  82 + <replace file='${path.src}/domain.xsd'
  83 + token="xml.xsd" value="http://www.w3.org/2001/03/xml.xsd"/>
  84 + </target>
  85 +
  86 + <!-- Validate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
  87 + <!-- -->
  88 + <!-- Check the Device Description conforms to the Device Abstraction -->
  89 + <!-- Schema. Note that we need to activate support for XML includes -->
  90 +
  91 + <target name="validate" depends="">
  92 + <schemavalidate warn="true">
  93 + <fileset dir="${basedir}/test" includes="*.xml"/>
  94 + <attribute name="http://apache.org/xml/features/xinclude" value="true"/>
  95 + <schema namespace="http://homegatewayinitiative.org/xml/dal/3.0"
  96 + file="${path.src}/domain.xsd" />
  97 + <schema namespace="http://www.w3.org/2001/XInclude"
  98 + file="${basedir}/etc/XInclude.xsd" />
  99 + <schema namespace="http://www.w3.org/2001/XMLSchema"
  100 + file="${basedir}/etc/XMLSchema.xsd" />
  101 + </schemavalidate>
  102 + </target>
  103 +
  104 +</project>
  105 +
... ...
  1 +# Backlog
  2 +To Be Discussed
  3 +
  4 +[Versions](#Versions)
  5 +[Namespace](#Namespace)
  6 +[Roles](#Roles)
  7 +[Optionals](#Optionals)
  8 +
  9 +
  10 +<a name="Versions"></a>
  11 +## Versions
  12 +### Rational
  13 +A device vendor is free to add new functionality to a device and to change or to remove existing functionality from a device by a firmware update or changes in the configuration. These changes may mean that the device functionality and a description in SDT become "out of sync" because currently an application developer has only little means to associate a specific firmware version or device configuration to a version of a SDT description.
  14 +
  15 +Even then the developer needs to manage different versions of the same SDT device description because there might be devices of the same type but with different firmware versions/configurations on a network.
  16 +
  17 +The version information must be available to applications at runtime.
  18 +
  19 +### Proposal
  20 +To solve this problem SDT components that can be influenced by firmware updates or configuration changes must be distinguishable by some kind of version scheme. Since different versions in the structure, attributes and elements of the SDT description as well as data types are already indicated by the "version number" of the SDT (e.g."http://hgi.org/xml/dal/3.0") only the components that are instantiated for the devices etc need to indicate their current version.
  21 +
  22 +The proposal is to add a *version* attribute to the following SDT components:
  23 +
  24 +- RootDevice
  25 +- Device
  26 +- ModuleClass
  27 +
  28 +*Event*, *Action* etc don't need an version number because a change in one of those components must be indicated by a different version in the ModuleClass.
  29 +
  30 +The *version* attribute is just a string value without a defined format.
  31 +
  32 +### Further Discussion
  33 +Does HGI define the version format? Or is this up to the vendors to provide their own?
  34 +
  35 +At least the governing entity that managed all the different needs to define this format since it must be in agreement between the device vendors, driver provider, DAL provider and application developer.
  36 +
  37 +Format suggestion: define the format of the version string as "major.minor.revision" with the following semantics for each number:
  38 +
  39 +- **revision**: minimal change, internal bugfix, no change to data, formats or API.
  40 +- **minor**: Change to the API that could be incompatible to the previous version. Added or removed interfaces or modules, changes in data formats.
  41 +- **major**: Redesign of the overall structure and architecture.
  42 +
  43 +The "numbers" could be just integer number, but may also contain letters, e.g. "1.0.1a".
  44 +
  45 +---
  46 +
  47 +<a name="Namespace"></a>
  48 +## Domain / Namespace
  49 +### Issue
  50 +The SDL now uses the namespace "homegatewayinitiative.org" as a namespace to identify the schema (also used for includes). The namespace is **not** a URL, but uniquely identifies the namespace and *should* be registered by HGI.
  51 +
  52 +That said, most validating parsers expect **that the namesapce IS a valid URL** or that at least there is a server on the other end rejecting the request. A timeout / no connection / no answer / ... leads to an error.
  53 +
  54 +Therefore, we cannot use the namespace "homegateway.org" because parsers don't get an answer from this address.
  55 +
  56 +---
  57 +
  58 +<a name="Roles"></a>
  59 +## Roles
  60 +### Proposal
  61 +The proposal is to add a *role* to *RootDevice* / *Device*. DECT ULE defines roles such as client and server for direct communication of appliances without a local hub. Depending on the assigned role a device might support different functions.
  62 +
  63 +Example:
  64 +
  65 + <RootDevice name id=”xyz” role=”something”>’
  66 + ...
  67 + </RootDevice>
  68 +
  69 +---
  70 +
  71 +<a name="Optionals"></a>
  72 +## Optionals
  73 +### Rational
  74 +Introduce optional *Actions* in *ModuleClasses* to reduce the number of possible combinations. Some technologies offers flexibility in defining requireed and optional *Actions*, *DataPoints* and *Events*´. The alternative is to define similar *ModuleClasses* that offers the variants of required and optional elements.
  75 +
  76 +DECT ULE, for example, has optional actions.
  77 +
  78 +### Proposal
  79 +Add an attribute to *Actions* to mark them as optional in a ModuleClass. Perhaps *DataPoints* and *Events* as well.
  80 +
  81 +Example:
  82 +
  83 + ...
  84 + <Action name=”abc” optional=”true”>
  85 + ...
  86 + </Action>
  87 +
  88 +The default without the optional attribute would be ``optional="false"``, meaning required).
  89 +
  90 +
  91 +
  92 +
... ...
  1 +# Examples and Contributions
  2 +
  3 +## HGI
  4 +### Multi Socket Electrical-Extension-Block
  5 +
  6 +[mseeb.xml](../test/mseeb.xml)
  7 +
  8 +![Multi Socket Electrical-Extension-Block Structure](images/examples/hgi_mseeb.png)
  9 +
  10 +## DECT ULE
  11 +
  12 +## Echonet
  13 +
  14 +## EnOcean
0 15 \ No newline at end of file
... ...
  1 +# Frequently Asked Questions
  2 +
  3 +## What is the HGI?
  4 +tbd
  5 +
  6 +## What is the SDT?
  7 +tbd
... ...
  1 +# Links & References
  2 +- **HGI** : [http://www.homegatewayinitiative.org](http://www.homegatewayinitiative.org)
  3 +
  4 +## XML
  5 +- **RELAX NG** : [http://relaxng.org](http://relaxng.org)
  6 + - **RELAX NG Tutorial** : [http://relaxng.org/tutorial-20011203.html](http://relaxng.org/tutorial-20011203.html)
  7 +
  8 +## Tools
  9 +- **UMLet** : [http://www.umlet.com](http://www.umlet.com)
  10 +The free UML drawing tool used to draw the UML file.
  11 +- **Apache Ant** : [http://ant.apache.org](http://ant.apache.org)
  12 +Build tool
  13 +
  14 +
... ...
  1 +# Build System Libraries and Licenses
  2 +The following libraries are used in the build system for the SDT.
  3 +
  4 +## trang.jar
  5 +
  6 +[http://www.thaiopensource.com/relaxng/trang-manual.html](http://www.thaiopensource.com/relaxng/trang-manual.html)
  7 +
  8 +Trang takes as input a schema written in any of the following formats:
  9 +
  10 +- RELAX NG (XML syntax)
  11 +- RELAX NG (compact syntax)
  12 +- XML 1.0 DTD
  13 +
  14 +and produces as output a schema written in any of the following formats:
  15 +
  16 +- RELAX NG (XML syntax)
  17 +- RELAX NG (compact syntax)
  18 +- XML 1.0 DTD
  19 +- W3C XML Schema
  20 +
  21 +Trang can also infer a schema from one or more example XML documents.
  22 +
  23 +
  24 +### License
  25 +Copyright (c) 2002, 2003, 2008 Thai Open Source Software Center Ltd
  26 +All rights reserved.
  27 +
  28 +Redistribution and use in source and binary forms, with or without
  29 +modification, are permitted provided that the following conditions are
  30 +met:
  31 +
  32 +- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  33 +- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  34 +- Neither the name of the Thai Open Source Software Center Ltd nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  35 +
  36 +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  37 +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  38 +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  39 +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
  40 +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  41 +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  42 +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  43 +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  44 +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  45 +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  46 +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  47 +
  48 +## Ant-Contrib Tasks
  49 +
  50 +[http://ant-contrib.sourceforge.net](http://ant-contrib.sourceforge.net)
  51 +
  52 +The Ant-Contrib project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant.
  53 +
  54 +### License
  55 +
  56 +This Software is distributed under the Apache Software License.
  57 +
  58 +## antSetLogLevel.jar
  59 +
  60 +GUI dialog for Ant tasks.
  61 +
  62 +Source: Deutsche Telekom
  63 +
  64 +
  65 +
... ...
  1 +# SDT Build System
  2 +This document describes the SDT build system and how to build the SDT and validate new contributions.
  3 +
  4 +The files referenced in this document point to version **3.0** of the SDT.
  5 +
  6 +## Directory Structure and Important Files
  7 +- [SDT/schema3.0/](../..) : Base directory
  8 +- [SDT/schema3.0/src/](../src/) : Source files of the SDT.
  9 + - [domain.rng](../src/domain.rng) : RELAX NG file with the SDT schema definition. This is the source file that is converted to the actual schema definition *domain.xsd* during the build. See also [http://en.wikipedia.org/wiki/RELAX_NG](http://en.wikipedia.org/wiki/RELAX_NG).
  10 + **Only edit this file when one wants to make changes to the SDT!**
  11 + - [domain.xsd](../src/domain.xsd) : The SDT schema defintion that is generated from *domain.rng*.
  12 + - [xml.xsd](../src/xml.xsd) : General schema definitions for the SDT
  13 +- [SDT/schema3.0/test/](../test/) : This directory contains all XML files with SDT definitions that should be validated whether they conform to the SDT schema. This could be example definitions or contributions.
  14 +- [SDT/schema3.0/build.xml](../build.xml) : This is the definition file for the ant build system.
  15 +- [SDT/schema3.0/etc/](../etc/), [SDT/schema3.0/style/](../style/) : internal directories for the build system. Please, don't make unnecessary changes to these files.
  16 +- [SDT/schema3.0/etc/](../etc), [SDT/schema3.0/style/](../style/) : internal directories for the build system. Please, don't make unnecessary changes to these files.
  17 + - [SDT/schema3.0/etc/dal.rnc](../etc/dal.rnc) : This file contains various configuration parameter to convert the file [domain.rng](../src/domain.rng) to schema file. **The important parameter to change when changing the namespace or the version number is**:
  18 +
  19 + default namespace xsl = "http://homegatewayinitiative.org/xml/dal/3.0"
  20 +
  21 + - [SDT/schema3.0/etc/schemas.xml](../etc/schemas.xml) : This file contains the header for the schema file. **This must be changed when changing the namespace or the version number.**
  22 +- [SDT/schema3.0/lib/](../lib/) : Tasks for the ant-based build system. See also [SDT Build System Components and Licenses](SDT%20Build%20System%20Components%20and%20Licenses.md).
  23 +
  24 +## Installation
  25 +- Install Java on your computer
  26 +- Download and install Apache ant from [http://ant.apache.org](http://ant.apache.org)
  27 +- Clone the SDT repository from GitHub:
  28 +
  29 + $ git clone https://github.com/Homegateway/RWD050.git
  30 +
  31 +## How to Use the Build System
  32 +After cloning the repository go to the directoy *SDT/schema* and run commands depending on what you want to achieve.
  33 +
  34 +### Build the Schema
  35 +Running *ant* without any parameter builds the schema definition from the rng-definition [SDT/schema3.0/src/domain.rng](../src/domain.rng) and writes it to [SDT/schema3.0/src/domain.xsd](../src/domain.xsd)
  36 +
  37 + $ cd SDT/schema
  38 + $ ant
  39 +
  40 +### Validate SDT Definitions
  41 +You can use the build system to validate new SDT definitions or changes made to existing ones by running the following command:
  42 +
  43 + $ cd SDT/schema
  44 + $ ant validate
  45 +
  46 +The output after a successful validation should look like this:
  47 +
  48 +>[schemavalidate] 2 file(s) have been successfully validated.
  49 +>BUILD SUCCESSFUL
  50 +>Total time: 1 second
  51 +
  52 +Otherwise you most likely receive a stacktrace or some other error messages. Search the output for the line *BUILD FAILED*. Above this line you will find some helpful hints for the filename and line number on which the error occured (here: file *mseeb.xml* on line 66) and a reason:
  53 +
  54 +>[schemavalidate] /Users/someone/Sources/git/RWD050/SDT/schema/test/mseeb.xml:66:18: cvc-elt.1: Cannot find the declaration of element 'Domain'.
  55 +>BUILD FAILED
  56 +
  57 +---
  58 +
  59 +## Editing
  60 +As mentioned above, the actual schema definition is defined in the file [domain.rng](../src/domain.rng) and converted to the XML schema definition [domain.xsd](../src/domain.xsd) during the build process.
  61 +
  62 +**All changes to the schema must therefore be made in [domain.rng](../src/domain.rng), NOT [domain.xsd](../src/domain.xsd) !**
  63 +
  64 +You may need to make additional changes in the following files, e.g. when the name space or the version number need to be adjusted.
  65 +
  66 +PLEASE ONLY EDIT THESE FILES IF NECESSARY.
  67 +
  68 +- [SDT/schema3.0/build.xml](../build.xml)
  69 +e.g. in the *ant* target "validate"
  70 +- [SDT/schema3.0/etc/dal.rnc](../etc/dal.rnc)
  71 +e.g. the entry "default namespace xsl"
  72 +- [SDT/schema3.0/etc/schema.xmlns](../etc/schema.xmlns)
  73 +- [SDT/schema3.0/etc/schemas.xml](../etc/schemas.xml)
... ...
  1 +# SDT Components
  2 +
  3 +In this document an overview about the SDT 3.0 definitions and component hierarchy is given.
  4 +
  5 +## Contents
  6 +
  7 +[Domain](#Domain)
  8 +[RootDevice](#RootDevice) | [Device](#Device)
  9 +&nbsp;&nbsp;&nbsp;[DeviceInfo](#DeviceInfo)
  10 +[ModuleClass](#ModuleClass)
  11 +&nbsp;&nbsp;&nbsp;[Action](#Action)
  12 +&nbsp;&nbsp;&nbsp;[Data / DataPoint](#Data)
  13 +&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[DataType](#DataType)
  14 +&nbsp;&nbsp;&nbsp;[Event](#Event)
  15 +[Doc](#Documentation)
  16 +
  17 +
  18 +## SDT Overview
  19 +The followng UML diagram presents an overview about the SDT components.
  20 +
  21 +![](images/SDT3.0_UML.png)
  22 +
  23 +The syntax used in the diagram to model an XML Schema Definition (XSD) as an UML diagram follows the following approaches:
  24 +
  25 +- [Design XML schemas using UML](http://www.ibm.com/developerworks/library/x-umlschem/)
  26 +- [UML For W3C XML Schema Design](http://www.xml.com/pub/a/2002/08/07/wxs_uml.html)
  27 +
  28 +
  29 +## Components
  30 +
  31 +<a name="Domain"></a>
  32 +### Domain
  33 +The *Domain* is the top-level component that defines all modules and devices of a domain. A *Domain* can import definitions of other domains.
  34 +
  35 +A *Domain* can define [Modules](#ModuleClass) or [RootDevices](#RootDevice) only, or may choose to provide both.
  36 +
  37 +![](images/Domain.png)
  38 +
  39 +#### Attributes
  40 +- **id** : The identifier for that *Domain*. Required.
  41 +
  42 +#### Elements
  43 +- **Imports** : XML import/include of other XML files. Optional.
  44 +- **Modules** : A list of [Module](#ModuleClass) components that are global to the whole domain. Optional.
  45 +- **RootDevices** : a List of [RootDevices](#RootDevice) components. Optional.
  46 +
  47 +#### Example
  48 +
  49 + <Domain xmlns:xi="http://www.w3.org/2001/XInclude"
  50 + xmlns="http://homegatewayinitiative.org/xml/dal/3.0"
  51 + id="org.homegatewayinitiative">
  52 + <Imports>
  53 + <xi:include href="./dal-core.xml" parse="xml" />
  54 + </Imports>
  55 + <Modules>
  56 + <!-- List of Domain global Modules goes here -->
  57 + </Modules>
  58 + <RootDevices>
  59 + <!-- List of RootDevices goes here -->
  60 + </RootDevices>
  61 + </Domain>
  62 +
  63 +
  64 +---
  65 +
  66 +<a name="RootDevice"/></a>
  67 +### RootDevice
  68 +
  69 +A *RootDevice* is the definition of a physical device that may contain optional embedded sub-devices. It represents the idea an appliance that is addressable on a Home Area Network where one or more sub-[Devices](#Devices) provide certain functionalities.
  70 +
  71 +For each physical device on the network at least one *RootDevice* **must** be defined. If the physical device is a simple device, ie. it does not contain embedded devices, e.g. a light switch, it does not include further *Devices*. On the other hand, if the pyhsical is a compound device, ie. it does contain embedded devices that can be addressed separately, the *RootDevice* **should** contain *Devices* for each of the identifiable embedded devices.
  72 +
  73 +There is also the possibility to have more than one *RootDevice* for one physical device if a physical device offers more than one distinguishable services or when it is for other reasons meaningful to deliberatly separate the device's services.
  74 +
  75 +An example for a compound device is a connected power-strip where each of the sockets can be switched on and off individually. The power-strip itself can provide functions such as "all sockets off" and "overall power consumption".
  76 +
  77 +If the *RootDevice* includes sub-[Devices](#Device) then each sub-device may be of the same type or of different types. The functionality ([Actions](#Action)) of the *RootDevice* may be different from the functionality of its sub-[Devices](#Device).
  78 +
  79 +If the *RootDevice* does not include sub-devices then the *RootDevice* is the actual adressable device that provides all the functionality of the connected appliance.
  80 +
  81 +*RootDevices* may define their own [ModuleClasses](#ModuleClass) or refer to predefined ModulesClasses of the same or another *Domain*.
  82 +
  83 +![](images/RootDevice.png)
  84 +
  85 +#### Attributes
  86 +- **id** : The identifier for that *RootDevice*. The identifier must be unique at least in the scope of the domain, but the final scope is also influenced by implementing technologies. Required.
  87 +
  88 +#### Elements
  89 +
  90 +- **[Doc](#Documentation)** : Documentation for the *RootDevice*. Optional.
  91 +- **Modules** : A list of [Module](#ModuleClass) components that are local to the *RootDevice*. Optional.
  92 +- **[DeviceInfo](#DeviceInfo)** : Further meta-data about the *RootDevice*. Optional.
  93 +- **Devices** : A list of [Device](#Device) components. Optional.
  94 +
  95 +#### Example
  96 +
  97 + <RootDevice id="aRootDevice">
  98 + <Doc>Some documentation</Doc>
  99 + <Modules>
  100 + <!-- List of Modules local to the RootDevice goes here-->
  101 + </Modules>
  102 + <DeviceInfo>
  103 + <!-- The DeviceInfos for the RootDevice goes here-->
  104 + </DeviceInfo>
  105 + <Devices>
  106 + <!-- List of Sub-Devices of the RootDevice goes here-->
  107 + </Devices>
  108 + </RootDevice>
  109 +
  110 +---
  111 +
  112 +### Device
  113 +*Devices* are optional components of a [RootDevice](#RootDevice). They represent physical sub-devices inside another device (the RootDevice).
  114 +
  115 +*Devices* may define their own [ModuleClasses](#ModuleClass) or extend ModulesClasses of its or another [Domain](#Domain).
  116 +
  117 +![](images/Device.png)
  118 +
  119 +#### Attributes
  120 +- **id** : The identifier for that *Device*. The identifier must be unique at least in the scope of the domain, but the final scope is also influenced by implementing technologies. Required.
  121 +
  122 +#### Elements
  123 +- **[Doc](#Documentation)** : Documentation for the *Device*. Optional.
  124 +- **Modules** : A list of [Module](#ModuleClass) components that are local to the *Device*. Optional.
  125 +- **[DeviceInfo](#DeviceInfo)** : Further meta-data about the *Device*. Optional.
  126 +
  127 +#### Example
  128 +
  129 + <Device id="aDevice">
  130 + <Doc>Some documentation</Doc>
  131 + <Modules>
  132 + <!-- List of Modules local to the Device goes here-->
  133 + </Modules>
  134 + <DeviceInfo>
  135 + <!-- The DeviceInfo for the Device goes here-->
  136 + </DeviceInfo>
  137 + </RootDevice>
  138 +
  139 +---
  140 +
  141 +<a name="DeviceInfo"/></a>
  142 +### DeviceInfo
  143 +The *DeviceInfo* is an element of [RootDevice](#RootDevice) or [Device](#Device) where a device vendor can provide metadata for a device that may be presented to an end-user.
  144 +
  145 +![](images/DeviceInfo.png)
  146 +
  147 +#### Attributes
  148 +None.
  149 +
  150 +#### Elements
  151 +- **Name** : Vendor-specific name of a device. Required.
  152 +- **Vendor** : Name of the vendor for the device. Required.
  153 +- **FirmwareVersion** : Current version number of the firmware or other version information. Optional.
  154 +- **VendorURL** : A URL that points to further information for that device. This might be the product page on the web or an URL to the device manual. Optional.
  155 +- **SerialNumber** : The serial number or serial string. Optional.
  156 +- **[Doc](#Documentation)** : Documentation for the *DeviceInfo*. Optional.
  157 +
  158 +
  159 +#### Example
  160 +
  161 + <DeviceInfo>
  162 + <Name>SomeDeviceName</Name>
  163 + <Vendor>ACME</Vendor>
  164 + <FirmwareVersion>1.0</FirmwareVersion>
  165 + <VendorURL>http://www.example.com/</VendorURL>
  166 + <SerialNumber>1234.5</SerialNumber>
  167 + </DeviceInfo>
  168 +
  169 +---
  170 +
  171 +<a name="ModuleClass"/></a>
  172 +### Module, ModuleClass
  173 +The *ModuleClass* represents the concept of a reusable module that defines the [Actions](#Action), [Data](#Data) and [Events](#Event) for a single functionality of a device. A connected device may contain or refer to single or multiple *ModuleClasses* to specify its inherent services it exposes for use by applications.
  174 +
  175 +*Modules* represent instantiations of *ModuleClasses*.
  176 +
  177 +*ModuleClasses* can be defined by a domain (on the level of the [Domain](#Domain) component) or in [RootDevices](#RootDevice)/[Devices](#Device): The first are global to a [Domain](#Domain) and can be used (refered to) by all [RootDevices](#RootDevice) resp. [Devices](#Device) of a [Domain](#Domain); the later are local to the [RootDevices](#RootDevice)/[Devices](#Device) where it is defined in. *ModuleClasses* defined on the [Domain](#Domain) level can be imported, extended and used by other domains.
  178 +
  179 +New *ModuleClasses* can be defined by extending existing *ModuleClasses* from the same or other domains to add new or overriding defined [Actions](#Action), [Data](#Data) and [Events](#Event).
  180 +
  181 +![](images/ModuleClass.png)
  182 +
  183 +#### Attributes
  184 +- **Name** : Name of the *ModuleClass*. The name must be unique in the scope of the [Domain](#Domain). Required.
  185 +
  186 +#### Elements
  187 +- **extends** : Reference to a another *ModuleClass* that is extended with this *ModuleClass*. Optional.
  188 +The element has the following attributes:
  189 + - **domain** : Identifier / Reference of the [Domain](#Domain) of the extended *ModuleClass*. Required when *extends* is specified.
  190 + - **class** : Name of the *ModuleClass* in the [Domain](#Domain) thet is extended.
  191 +- **[Doc](#Documentation)** : Documentation for the *ModuleClass*. Optional.
  192 +- **Actions** : A list of [Action](#Action) components, each defining a single action. Optional.
  193 +- **Data** : A list of [Data](#Data) components. Optional.
  194 +- **Events** : A list of [Event](#Event) components. Optional.
  195 +
  196 +#### Example
  197 +
  198 + <ModuleClass name="BooleanState">
  199 + <Doc>Some documentation</Doc>
  200 + <Actions>
  201 + <!-- List of Actions goes here-->
  202 + </Actions>
  203 + <Events>
  204 + <!-- List of Events goes here-->
  205 + </Events
  206 + <Data>
  207 + <!-- List of DataPoints goes here-->
  208 + </Data>
  209 + </ModuleClass>
  210 +
  211 +---
  212 +
  213 +<a name="Action"/></a>
  214 +### Action
  215 +An *Action* defines a single procedure call for a [ModuleClass](#ModuleClass). It is basically used for calling a function on a physical device in order to set or request data, or to invoke an action at a [Device](#Device). #
  216 +
  217 +It is also possible that an *Action* results in calling multiple functions on the device. Examples for this are the assembly of single function calls into one *Action* in order to provide sanity checks on the arguments, or for managing and fullfil transactional function calls on the device.
  218 +
  219 +![](images/Action.png)
  220 +
  221 +#### Attributes
  222 +- **name** : The name of the *Action*. The name must be unique in the scope of the [ModuleClass](#ModuleClass). Required.
  223 +- **type** : The return type of the *Action*. It must comply to one of the defined [DataTypes](#DataType). Optional. If no *type* is specified the *Action* does not return a value.
  224 +
  225 +#### Elements
  226 +- **[Doc](#Documentation)** : Documentation for the *Action*. Optional.
  227 +- **Arg** : Zero or more occurances of argument definitions for an *Action*. Optional.
  228 +The *Arg* has the following attributes and elements:
  229 + - **name** : The name of the *Arg*. Attribute. Required.
  230 + - **type** : The type of the *Arg*. It must comply to one of the defined [DataTypes](#DataType) Attribute. Required.
  231 + - **Doc** : Documentation for the *Arg* element. Optional.
  232 +
  233 +#### Example
  234 +The following are two examples for actions implementing a getter and a setter for boolean values.
  235 +
  236 + <Action name="get" type="boolean">
  237 + <Doc>Obtain the current associated state. Example of a getter.</Doc>
  238 + </Action>
  239 +
  240 + <Action name="setTarget">
  241 + <Doc>Set the associated state to the specified value. Example of a setter.</Doc>
  242 + <Arg name="value" type="boolean">
  243 + <Doc>The desired value of the associated state.</Doc>
  244 + </Arg>
  245 + </Action>
  246 +
  247 +---
  248 +
  249 +<a name="Data"/></a>
  250 +### Data
  251 +The *Data* component represents a list of *DataPoints* of a [ModuleClass](#ModuleClass).
  252 +
  253 +![](images/Data.png)
  254 +
  255 +
  256 +*DataPoints* serve to provide information to application developers about the internal structure, types and attributes of a device's data model. There are no implicite setter or getter actions to manipulate the data points directly. To do this, [Actions](#Action) must be defined and used explicitly.
  257 +
  258 +Though *DataPoints* only refer to single data points of a physical device it is possible to describe hierarchies by model the path to the data point in the hierarchy by a path-like structure like to the pathname of a UNIX file system. Here, the root node of the hierarchy is a slash (/ 0x2F) and the segments or nodes along the path are also separated by slashes. The actual datapoint is the last leaf at the path.
  259 +
  260 +In EBNF:
  261 +
  262 + name = dataPointName | "/" path ;
  263 + path = segment "/" path | dataPointName ;
  264 + segment = string ;
  265 + dataPointName = string ;
  266 + string = (* character string excluding the character "/" *) ;
  267 +
  268 +
  269 +#### Attributes
  270 +None.
  271 +
  272 +#### Elements
  273 +- **DataPoint** : Zero or more occurances of *DataPoints. Optional.
  274 +A *DataPoint* has the following attributes and elements:
  275 + - **name** : The name (and possible path in a hierarchical data model) of the *DataPoint*. Attribute. The name must be unique in the scope of the [ModuleClass](#ModuleClass).Required.
  276 + - **type** : The type of the *DataPoint*. It must comply to one of the defined *DataTypes*. Attribute. Required.
  277 + - **writable** : Boolean value that indicates whether this *DataPoint* is writable by an application. Attribute. Optional. Default: false.
  278 + - **readable** : Boolean value that indicates whether this *DataPoint* is readable by an application. Attribute. Optional. Default: false.
  279 + - **eventable** : Boolean value that indicates whether an internal or external change of this *DataPoint* raises an event. Attribute. Optional. Default: false.
  280 + - **[Doc](#Documentation)** : Documentation for the *DataPoint* element. Optional.
  281 +
  282 +
  283 +#### Example
  284 + <Data>
  285 + <DataPoint name="attributeName" type="string" writable="false">
  286 + <Doc>Some documentation for the DataPoint</Doc>
  287 + </DataPoint>
  288 + </Data>
  289 +
  290 +---
  291 +
  292 +
  293 +<a name="DataType"/></a>
  294 +### DataType
  295 +The following *DataTypes* can be used in the SDT's [Action](#Action), *Arg* and [DataPoint](#Data) elements and attributes. If not stated otherwise datatypes should comply to the equivalent datatypes defined in [XML Schema Part 2: Datatypes Second Edition](http://www.w3.org/TR/xmlschema-2/#boolean):
  296 +
  297 +- **boolean** : A boolean value as defined in [http://www.w3.org/TR/xmlschema-2/#boolean](http://www.w3.org/TR/xmlschema-2/#boolean) .
  298 +- **byte** : An integer datatype with the range of [0 - 255] as defined in [http://www.w3.org/TR/xmlschema-2/#unsignedByte](http://www.w3.org/TR/xmlschema-2/#unsignedByte) .
  299 +- **integer** : An integer value as defined in [http://www.w3.org/TR/xmlschema-2/#integer](http://www.w3.org/TR/xmlschema-2/#integer) .
  300 +- **float** : An IEEE single-precision 32-bit floating point type as defined in [http://www.w3.org/TR/xmlschema-2/#float](http://www.w3.org/TR/xmlschema-2/#float) .
  301 +- **string** : The string datatype represents character strings as defined in [http://www.w3.org/TR/xmlschema-2/#string](http://www.w3.org/TR/xmlschema-2/#string) .
  302 +- **enum** : A complete and orderd list of items in a collection. Items in an enumeration are separated by commas (, 0x2c) and must be of one of the datatypes defined here. Commas (, 0x2c) and backslashes (\ 0x5c) in enumaration items must be escaped by backslash.
  303 +- **date** : A date value as defined in [http://www.w3.org/TR/xmlschema-2/#date](http://www.w3.org/TR/xmlschema-2/#date) .
  304 +- **time** : A time value as defined in [http://www.w3.org/TR/xmlschema-2/#time](http://www.w3.org/TR/xmlschema-2/#time) .
  305 +- **datetime** : A time value as defined in [http://www.w3.org/TR/xmlschema-2/#dateTime](http://www.w3.org/TR/xmlschema-2/#dateTime) .
  306 +- **blob** : A blob value represents a binary object. The internal encoding is transparent and not defined here. The binary object must be encoded conforming to [http://www.w3.org/TR/xmlschema-2/#base64Binary](http://www.w3.org/TR/xmlschema-2/#base64Binary) .
  307 +- **uri** : A URI that represents a Uniform Resource Identifier Reference (URI) as defined by as defined in [RFC 2396](http://www.ietf.org/rfc/rfc2396.txt) and amended in [RFC 2732](http://www.ietf.org/rfc/rfc2732.txt) .
  308 +
  309 +---
  310 +
  311 +<a name="Event"/></a>
  312 +### Event
  313 +An *Event* is a component that defines properties for events that are raised as reactions to changes in [DataPoints](#Data) of a [Device](#Device)'s data model. These state changes can happen either through a device-internal change, e.g. a low battery level, or by external means, e.g. a user operates a switch or the temperature in a room rises beyond a certain threshold.
  314 +
  315 +![](images/Event.png)
  316 +
  317 +#### Attributes
  318 +- **name** : The name of the *Event*. The name must be unique in the scope of the [ModuleClass](#ModuleClass). Required.
  319 +
  320 +#### Elements
  321 +- **Data** : A list of [Data](#Data) components for an event's payload. Optional.
  322 +- **[Doc](#Documentation)** : Documentation for the *Event* Element. Optional.
  323 +
  324 +
  325 +#### Example
  326 +
  327 + <Event name="stateChanged">
  328 + <Data>
  329 + <DataPoint name="state" type="boolean">
  330 + </DataPoint>
  331 + </Data>
  332 + </Event>
  333 +
  334 +---
  335 +
  336 +<a name="Documentation"/></a>
  337 +# Documentation
  338 +The *Doc* documentation element is optionally available in most components of the SDT. Its purpose is to provide a short documentation for the respective element. The documentation language *should* be English.
  339 +
  340 +The text inside the *Doc* element can be structure using a very limited subset of HTML elements. The possible structuring is defined in EBNF as follows:
  341 +
  342 +
  343 + Doc = "<Doc>" docContent "</Doc" ;
  344 + docContent = docText | { paragraph | image } ;
  345 + docText = { text | emphasizedText | boldText | monotypeText } ;
  346 + emphasizedText = "<em>" text "</em>" ;
  347 + boldText = "<b>" text "</b>" ;
  348 + monotypeText = "<tt>" text "</tt>" ;
  349 + paragraph = "<p>" docText "</p>" ;
  350 + image = "<img src=" url ">" "<caption>" text "</caption>" "</img>" ;
  351 + url = "\"" (* valid URL *) "\"" ;
  352 + text = (* XML text element *) ;
  353 +
  354 +
  355 +The intended use for each element is:
  356 +
  357 +- **emphasizedText** : Emphasize the included text, e.g. printing it in italics font.
  358 +- **boldText** : Print the included text in bold font.
  359 +- **monotypeText** : Print the included text in a monospaced fonttype, e.g. to emphasize source code.
  360 +- **paragraph** : Structure the text in paragraphs.
  361 +- **image** : Include an image in the text. The image is loaded from the specified URL and must include a caption text.
  362 +
... ...
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<diagram program="umlet" version="13.2">
  3 + <zoom_level>9</zoom_level>
  4 + <element>
  5 + <id>UMLClass</id>
  6 + <coordinates>
  7 + <x>261</x>
  8 + <y>99</y>
  9 + <w>135</w>
  10 + <h>117</h>
  11 + </coordinates>
  12 + <panel_attributes>ModuleClass
  13 +--
  14 +*@ name : text*
  15 +/- extends: Extends/
  16 +/- Doc : Doc/
  17 +/- Actions : Actions/
  18 +/- Data : Data/
  19 +/- Events : Events/
  20 +fg=blue
  21 +</panel_attributes>
  22 + <additional_attributes/>
  23 + </element>
  24 + <element>
  25 + <id>UMLClass</id>
  26 + <coordinates>
  27 + <x>486</x>
  28 + <y>162</y>
  29 + <w>126</w>
  30 + <h>90</h>
  31 + </coordinates>
  32 + <panel_attributes>Action
  33 +--
  34 +*@ name : text*
  35 +/@ type : DataType/
  36 +/- Doc : Doc/
  37 +/* Arg : Arg/
  38 +fg=blue</panel_attributes>
  39 + <additional_attributes/>
  40 + </element>
  41 + <element>
  42 + <id>Relation</id>
  43 + <coordinates>
  44 + <x>387</x>
  45 + <y>81</y>
  46 + <w>117</w>
  47 + <h>81</h>
  48 + </coordinates>
  49 + <panel_attributes>lt=&lt;.
  50 +m1=0,1
  51 +</panel_attributes>
  52 + <additional_attributes>110.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes>
  53 + </element>
  54 + <element>
  55 + <id>UMLClass</id>
  56 + <coordinates>
  57 + <x>684</x>
  58 + <y>225</y>
  59 + <w>144</w>
  60 + <h>72</h>
  61 + </coordinates>
  62 + <panel_attributes>Arg
  63 +--
  64 +*@ name ; text*
  65 +*@ type : DataType*
  66 +/- Doc : Doc/
  67 +fg=blue</panel_attributes>
  68 + <additional_attributes/>
  69 + </element>
  70 + <element>
  71 + <id>Relation</id>
  72 + <coordinates>
  73 + <x>603</x>
  74 + <y>225</y>
  75 + <w>99</w>
  76 + <h>36</h>
  77 + </coordinates>
  78 + <panel_attributes>lt=&lt;.
  79 +m1=0..*</panel_attributes>
  80 + <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes>
  81 + </element>
  82 + <element>
  83 + <id>UMLClass</id>
  84 + <coordinates>
  85 + <x>18</x>
  86 + <y>198</y>
  87 + <w>180</w>
  88 + <h>90</h>
  89 + </coordinates>
  90 + <panel_attributes>Domain
  91 +--
  92 +*@ id : ID*
  93 +/- imports/
  94 +/- Modules : ModuleClass/
  95 +/- RootDevices : RootDevice/
  96 +fg=blue</panel_attributes>
  97 + <additional_attributes/>
  98 + </element>
  99 + <element>
  100 + <id>Relation</id>
  101 + <coordinates>
  102 + <x>189</x>
  103 + <y>99</y>
  104 + <w>90</w>
  105 + <h>180</h>
  106 + </coordinates>
  107 + <panel_attributes>lt=&lt;.
  108 +m1= 0..*</panel_attributes>
  109 + <additional_attributes>80.0;10.0;30.0;10.0;30.0;180.0;10.0;180.0</additional_attributes>
  110 + </element>
  111 + <element>
  112 + <id>UMLClass</id>
  113 + <coordinates>
  114 + <x>261</x>
  115 + <y>486</y>
  116 + <w>171</w>
  117 + <h>90</h>
  118 + </coordinates>
  119 + <panel_attributes>Device
  120 +--
  121 +*@ id : Name*
  122 +/- Doc : Doc/
  123 +/- Modules : Module/
  124 +/- DeviceInfo : DeviceInfo/
  125 +fg=blue</panel_attributes>
  126 + <additional_attributes/>
  127 + </element>
  128 + <element>
  129 + <id>Relation</id>
  130 + <coordinates>
  131 + <x>180</x>
  132 + <y>261</y>
  133 + <w>45</w>
  134 + <h>180</h>
  135 + </coordinates>
  136 + <panel_attributes>lt=&lt;.
  137 +m1=0..*
  138 +</panel_attributes>
  139 + <additional_attributes>10.0;180.0;10.0;140.0;30.0;140.0;30.0;10.0;20.0;10.0</additional_attributes>
  140 + </element>
  141 + <element>
  142 + <id>UMLClass</id>
  143 + <coordinates>
  144 + <x>495</x>
  145 + <y>495</y>
  146 + <w>162</w>
  147 + <h>117</h>
  148 + </coordinates>
  149 + <panel_attributes>DeviceInfo
  150 +--
  151 +*- name : text*
  152 +*- vendor : text*
  153 +/- serialNumber : text/
  154 +/- vendorURL : URL/
  155 +/- firmwareVersion : text/
  156 +/- Doc : Doc/
  157 +fg=blue</panel_attributes>
  158 + <additional_attributes/>
  159 + </element>
  160 + <element>
  161 + <id>Relation</id>
  162 + <coordinates>
  163 + <x>423</x>
  164 + <y>495</y>
  165 + <w>90</w>
  166 + <h>81</h>
  167 + </coordinates>
  168 + <panel_attributes>lt=&lt;.
  169 +m1= 0,1</panel_attributes>
  170 + <additional_attributes>80.0;10.0;40.0;10.0;40.0;70.0;10.0;70.0</additional_attributes>
  171 + </element>
  172 + <element>
  173 + <id>UMLClass</id>
  174 + <coordinates>
  175 + <x>684</x>
  176 + <y>18</y>
  177 + <w>144</w>
  178 + <h>198</h>
  179 + </coordinates>
  180 + <panel_attributes>&lt;&lt;Enumeration&gt;&gt;
  181 +DataType
  182 +--
  183 +boolean
  184 +byte
  185 +integer
  186 +float
  187 +string
  188 +enum
  189 +date
  190 +time
  191 +datetime
  192 +blob
  193 +uri</panel_attributes>
  194 + <additional_attributes/>
  195 + </element>
  196 + <element>
  197 + <id>UMLClass</id>
  198 + <coordinates>
  199 + <x>729</x>
  200 + <y>531</y>
  201 + <w>99</w>
  202 + <h>45</h>
  203 + </coordinates>
  204 + <panel_attributes>Doc
  205 +--
  206 +- ...
  207 +fg=blue</panel_attributes>
  208 + <additional_attributes/>
  209 + </element>
  210 + <element>
  211 + <id>UMLClass</id>
  212 + <coordinates>
  213 + <x>486</x>
  214 + <y>72</y>
  215 + <w>117</w>
  216 + <h>72</h>
  217 + </coordinates>
  218 + <panel_attributes>&lt;&lt;Attributes&gt;&gt;
  219 +Extends
  220 +--
  221 +@domain : IDRF
  222 +@class : text
  223 +</panel_attributes>
  224 + <additional_attributes/>
  225 + </element>
  226 + <element>
  227 + <id>Relation</id>
  228 + <coordinates>
  229 + <x>387</x>
  230 + <y>153</y>
  231 + <w>117</w>
  232 + <h>45</h>
  233 + </coordinates>
  234 + <panel_attributes>lt=&lt;.
  235 +m1=0..*
  236 +</panel_attributes>
  237 + <additional_attributes>110.0;20.0;10.0;20.0</additional_attributes>
  238 + </element>
  239 + <element>
  240 + <id>Relation</id>
  241 + <coordinates>
  242 + <x>603</x>
  243 + <y>27</y>
  244 + <w>99</w>
  245 + <h>198</h>
  246 + </coordinates>
  247 + <panel_attributes>lt=&lt;&lt;-
  248 +m1=0,1
  249 +</panel_attributes>
  250 + <additional_attributes>90.0;10.0;40.0;10.0;40.0;200.0;10.0;200.0</additional_attributes>
  251 + </element>
  252 + <element>
  253 + <id>Relation</id>
  254 + <coordinates>
  255 + <x>666</x>
  256 + <y>522</y>
  257 + <w>81</w>
  258 + <h>45</h>
  259 + </coordinates>
  260 + <panel_attributes>lt=&lt;.
  261 +m1=0..*
  262 +</panel_attributes>
  263 + <additional_attributes>70.0;20.0;10.0;20.0</additional_attributes>
  264 + </element>
  265 + <element>
  266 + <id>Relation</id>
  267 + <coordinates>
  268 + <x>819</x>
  269 + <y>90</y>
  270 + <w>45</w>
  271 + <h>198</h>
  272 + </coordinates>
  273 + <panel_attributes>lt=&lt;&lt;-
  274 +m1= 1
  275 +</panel_attributes>
  276 + <additional_attributes>10.0;10.0;30.0;10.0;30.0;200.0;10.0;200.0</additional_attributes>
  277 + </element>
  278 + <element>
  279 + <id>UMLClass</id>
  280 + <coordinates>
  281 + <x>486</x>
  282 + <y>297</y>
  283 + <w>153</w>
  284 + <h>45</h>
  285 + </coordinates>
  286 + <panel_attributes>Data
  287 +--
  288 +/- dataPoint : DataPoint/
  289 +fg=blue</panel_attributes>
  290 + <additional_attributes/>
  291 + </element>
  292 + <element>
  293 + <id>Relation</id>
  294 + <coordinates>
  295 + <x>387</x>
  296 + <y>180</y>
  297 + <w>117</w>
  298 + <h>153</h>
  299 + </coordinates>
  300 + <panel_attributes>lt=&lt;.
  301 +m1=0,1
  302 +</panel_attributes>
  303 + <additional_attributes>110.0;140.0;50.0;140.0;50.0;10.0;10.0;10.0</additional_attributes>
  304 + </element>
  305 + <element>
  306 + <id>Relation</id>
  307 + <coordinates>
  308 + <x>630</x>
  309 + <y>306</y>
  310 + <w>72</w>
  311 + <h>45</h>
  312 + </coordinates>
  313 + <panel_attributes>lt=&lt;.
  314 +m1=0..*
  315 +</panel_attributes>
  316 + <additional_attributes>60.0;20.0;10.0;20.0</additional_attributes>
  317 + </element>
  318 + <element>
  319 + <id>UMLClass</id>
  320 + <coordinates>
  321 + <x>684</x>
  322 + <y>315</y>
  323 + <w>144</w>
  324 + <h>117</h>
  325 + </coordinates>
  326 + <panel_attributes>DataPoint
  327 +--
  328 +*@ name : text*
  329 +@ type : DataType
  330 +/@ writable : boolean/
  331 +/@ readable : boolean/
  332 +/@ eventable : boolean/
  333 +/- Doc : Doc/
  334 +fg=blue
  335 +</panel_attributes>
  336 + <additional_attributes/>
  337 + </element>
  338 + <element>
  339 + <id>UMLClass</id>
  340 + <coordinates>
  341 + <x>495</x>
  342 + <y>414</y>
  343 + <w>144</w>
  344 + <h>72</h>
  345 + </coordinates>
  346 + <panel_attributes>Event
  347 +--
  348 +*@ name : text*
  349 +- data : Data
  350 +/- Doc : Doc/
  351 +fg=blue</panel_attributes>
  352 + <additional_attributes/>
  353 + </element>
  354 + <element>
  355 + <id>Relation</id>
  356 + <coordinates>
  357 + <x>387</x>
  358 + <y>189</y>
  359 + <w>126</w>
  360 + <h>261</h>
  361 + </coordinates>
  362 + <panel_attributes>lt=&lt;.
  363 +m1=0..*
  364 +</panel_attributes>
  365 + <additional_attributes>120.0;260.0;30.0;260.0;30.0;10.0;10.0;10.0</additional_attributes>
  366 + </element>
  367 + <element>
  368 + <id>UMLClass</id>
  369 + <coordinates>
  370 + <x>261</x>
  371 + <y>441</y>
  372 + <w>135</w>
  373 + <h>27</h>
  374 + </coordinates>
  375 + <panel_attributes>Module
  376 +fg=blue</panel_attributes>
  377 + <additional_attributes/>
  378 + </element>
  379 + <element>
  380 + <id>Relation</id>
  381 + <coordinates>
  382 + <x>387</x>
  383 + <y>441</y>
  384 + <w>72</w>
  385 + <h>117</h>
  386 + </coordinates>
  387 + <panel_attributes>lt=&lt;.
  388 +m1=0..*
  389 +</panel_attributes>
  390 + <additional_attributes>10.0;10.0;60.0;10.0;60.0;110.0;50.0;110.0</additional_attributes>
  391 + </element>
  392 + <element>
  393 + <id>Relation</id>
  394 + <coordinates>
  395 + <x>306</x>
  396 + <y>207</y>
  397 + <w>27</w>
  398 + <h>252</h>
  399 + </coordinates>
  400 + <panel_attributes>lt=&lt;&lt;-
  401 +</panel_attributes>
  402 + <additional_attributes>10.0;10.0;10.0;260.0</additional_attributes>
  403 + </element>
  404 + <element>
  405 + <id>Relation</id>
  406 + <coordinates>
  407 + <x>549</x>
  408 + <y>333</y>
  409 + <w>126</w>
  410 + <h>144</h>
  411 + </coordinates>
  412 + <panel_attributes>lt=&lt;.
  413 +m1=1
  414 +</panel_attributes>
  415 + <additional_attributes>10.0;10.0;10.0;70.0;120.0;70.0;120.0;140.0;100.0;140.0</additional_attributes>
  416 + </element>
  417 + <element>
  418 + <id>Relation</id>
  419 + <coordinates>
  420 + <x>819</x>
  421 + <y>27</y>
  422 + <w>63</w>
  423 + <h>351</h>
  424 + </coordinates>
  425 + <panel_attributes>lt=&lt;&lt;-
  426 +m1=1
  427 +</panel_attributes>
  428 + <additional_attributes>10.0;10.0;50.0;10.0;50.0;370.0;10.0;370.0</additional_attributes>
  429 + </element>
  430 + <element>
  431 + <id>UMLClass</id>
  432 + <coordinates>
  433 + <x>27</x>
  434 + <y>423</y>
  435 + <w>171</w>
  436 + <h>99</h>
  437 + </coordinates>
  438 + <panel_attributes>RootDevice
  439 +--
  440 +*@ id : Name*
  441 +/- Doc : Doc/
  442 +/- Modules : Module/
  443 +/- Devices : Device/
  444 +/- DeviceInfo : DeviceInfo/
  445 +fg=blue</panel_attributes>
  446 + <additional_attributes/>
  447 + </element>
  448 + <element>
  449 + <id>Relation</id>
  450 + <coordinates>
  451 + <x>189</x>
  452 + <y>477</y>
  453 + <w>90</w>
  454 + <h>45</h>
  455 + </coordinates>
  456 + <panel_attributes>lt=&lt;.
  457 +m1=0..*
  458 +</panel_attributes>
  459 + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes>
  460 + </element>
  461 + <element>
  462 + <id>UMLNote</id>
  463 + <coordinates>
  464 + <x>18</x>
  465 + <y>18</y>
  466 + <w>180</w>
  467 + <h>126</h>
  468 + </coordinates>
  469 + <panel_attributes>bg=#FAF8C8
  470 +fontsize=10
  471 +@elementAttribute
  472 +*@mandatoryElementAttribute*
  473 +- element
  474 +- element : Subclass
  475 +/- optionalElement (0/1)/
  476 +/* optionalElement (0/n)/
  477 +
  478 +"Depends" Relation
  479 +
  480 +Subclassing</panel_attributes>
  481 + <additional_attributes/>
  482 + </element>
  483 + <element>
  484 + <id>Relation</id>
  485 + <coordinates>
  486 + <x>108</x>
  487 + <y>81</y>
  488 + <w>90</w>
  489 + <h>36</h>
  490 + </coordinates>
  491 + <panel_attributes>lt=&lt;.
  492 +fontsize=10
  493 +m1=0..*
  494 +</panel_attributes>
  495 + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes>
  496 + </element>
  497 + <element>
  498 + <id>Relation</id>
  499 + <coordinates>
  500 + <x>108</x>
  501 + <y>117</y>
  502 + <w>99</w>
  503 + <h>27</h>
  504 + </coordinates>
  505 + <panel_attributes>lt=&lt;&lt;-
  506 +fontsize=10</panel_attributes>
  507 + <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes>
  508 + </element>
  509 + <element>
  510 + <id>Relation</id>
  511 + <coordinates>
  512 + <x>189</x>
  513 + <y>441</y>
  514 + <w>90</w>
  515 + <h>54</h>
  516 + </coordinates>
  517 + <panel_attributes>lt=&lt;.
  518 +m1=0..*
  519 +</panel_attributes>
  520 + <additional_attributes>80.0;10.0;30.0;10.0;30.0;40.0;10.0;40.0</additional_attributes>
  521 + </element>
  522 + <element>
  523 + <id>Relation</id>
  524 + <coordinates>
  525 + <x>189</x>
  526 + <y>495</y>
  527 + <w>324</w>
  528 + <h>117</h>
  529 + </coordinates>
  530 + <panel_attributes>lt=&lt;.
  531 +</panel_attributes>
  532 + <additional_attributes>340.0;10.0;300.0;10.0;300.0;110.0;30.0;110.0;30.0;20.0;10.0;20.0</additional_attributes>
  533 + </element>
  534 +</diagram>
... ...
  1 +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
  2 + xmlns:xi="http://www.w3.org/2001/XInclude"
  3 + targetNamespace="http://www.w3.org/2001/XInclude"
  4 + finalDefault="extension">
  5 + <xs:annotation>
  6 + <xs:documentation>
  7 + Not normative, but may be useful.
  8 + See the REC http://www.w3.org/TR/XInclude for definitive
  9 + information about this namespace.
  10 + </xs:documentation>
  11 + </xs:annotation>
  12 +
  13 + <xs:element name="include" type="xi:includeType" />
  14 +
  15 + <xs:complexType name="includeType" mixed="true">
  16 + <xs:choice minOccurs='0' maxOccurs='unbounded' >
  17 + <xs:element ref='xi:fallback' />
  18 + <xs:any namespace='##other' processContents='lax' />
  19 + <xs:any namespace='##local' processContents='lax' />
  20 + </xs:choice>
  21 + <xs:attribute name="href" use="optional" type="xs:anyURI"/>
  22 + <xs:attribute name="parse" use="optional" default="xml"
  23 + type="xi:parseType" />
  24 + <xs:attribute name="xpointer" use="optional" type="xs:string"/>
  25 + <xs:attribute name="encoding" use="optional" type="xs:string"/>
  26 + <xs:attribute name="accept" use="optional" type="xs:string"/>
  27 + <xs:attribute name="accept-language" use="optional" type="xs:string"/>
  28 + <xs:anyAttribute namespace="##other" processContents="lax"/>
  29 + </xs:complexType>
  30 +
  31 + <xs:simpleType name="parseType">
  32 + <xs:restriction base="xs:token">
  33 + <xs:enumeration value="xml"/>
  34 + <xs:enumeration value="text"/>
  35 + </xs:restriction>
  36 + </xs:simpleType>
  37 +
  38 + <xs:element name="fallback" type="xi:fallbackType" />
  39 +
  40 + <xs:complexType name="fallbackType" mixed="true">
  41 + <xs:choice minOccurs="0" maxOccurs="unbounded">
  42 + <xs:element ref="xi:include"/>
  43 + <xs:any namespace="##other" processContents="lax"/>
  44 + <xs:any namespace="##local" processContents="lax"/>
  45 + </xs:choice>
  46 + <xs:anyAttribute namespace="##other" processContents="lax" />
  47 + </xs:complexType>
  48 +
  49 +</xs:schema>
... ...
  1 +<?xml version='1.0'?>
  2 +<!-- XML Schema schema for XML Schemas: Part 2: Datatypes -->
  3 +<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
  4 +<!ENTITY % s ''>
  5 +<!ENTITY % p ''>
  6 +]>
  7 +<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema-datatypes"
  8 + version="$Id: XMLSchema-datatypes.xsd,v 1.5 2001/03/16 20:53:32 ht Exp $">
  9 + <annotation>