diff --git a/README.md b/README.md index 4ec40dc0b3512c821dcf256638ddd56ff388020f..aab8c1a6f0fbda291bf27b3cbf67e80e3df57811 100644 --- a/README.md +++ b/README.md @@ -2,37 +2,33 @@ Repository for the Smart Device Template (SDT). +**Version 3.0** + Note that this project runs under Apache 2.0 license. Read the [LICENSE](LICENSE) in this repository, or refer to [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) -Any contributions made to this project must comply with the forementioned license. +Any contributions made to this project must comply with the aforementioned license. + +## Quick Introduction + +The Smart Device Template (SDT) is a template which is used to model the capabilities, actions and events of connected devices. The intent of the SDT is to be able to model any type of connected device using a well accepted and standardised format. The main application of SDT is to enable a uniformly structured Application Programmer’s Interface (API) to applications that need to interact with connected devices. Usually, these applications would communicate to devices using an Abstraction Layer as an intermediary logic. The Abstraction Layer „hides“ the technology-specific, native language format of devices of different technology type from the applications. + +[Read the full Introduction.](SDT/schema3.0/docs/Introduction.md) ## Quick Links -- ['domain.xsd' Version 2.0](SDT/schema2.0/src/domain.xsd) -- [UML Diagram of the SDT 2.0](SDT/schema2.0/docs/images/SDT2.0_UML.png) ([source](SDT/schema2.0/docs/SDT_UML.uxf)) +- ['domain.xsd' Version 3.0](SDT/schema3.0/src/domain.xsd) +- [UML Diagram of the SDT 3.0](SDT/schema3.0/docs/UML%20Diagram.md) ([source](SDT/schema3.0/docs/SDT_UML.uxf)) ## Content You can find further Information here: -- [SDT Components](SDT/schema2.0/docs/SDT_Components.md) -- [SDT Build System](SDT/schema2.0/docs/SDT%20Build%20System.md) -- [Examples](SDT/schema2.0/docs/Examples.md) -- [FAQ](SDT/schema2.0/docs/FAQ.md) -- [Links & References](SDT/schema2.0/docs/Links.md) -- [Backlog & Issues](SDT/schema2.0/docs/Backlog.md) +- [Introduction to the SDT](SDT/schema3.0/docs/Introduction.md) +- [SDT Components](SDT/schema3.0/docs/SDT_Components.md) +- [SDT Build System](SDT/schema3.0/docs/SDT%20Build%20System.md) +- [Examples](SDT/schema3.0/docs/Examples.md) +- [Links & References](SDT/schema3.0/docs/Links.md) +- [Changelog](SDT/schema3.0/docs/Changelog.md) - [LICENSE](LICENSE) -## Changes in 2.0.1 -- Added missing "uri" data type. - -## Changes in 2.0 -- Introduced RootDevice to support hierarchical embedded devices. -- Added new data types (byte, float, array, enum, date, time, datetime, blob, uri) -- Added ``readable`` and ``eventable`` to data points. -- Added otional ``<SerialNumber>``, ``<VendorURL>`` and ``<FirmwareVersion>`` elements to DeviceInfo -- Added optional ``<Doc>`` element to Event -- Changed the optionality of the ``<DataPoint>``'s ``type`` attribute to "required". -- Added [UML diagram](SDT/schema2.0/docs/SDT_Components.md) -- Changed the namespace for the XSD from "hgi.org" to "homegatewayinitiative.org". diff --git a/SDT/schema2.0/test/EchonetLiteExamples.xml b/SDT/schema2.0/test/EchonetLiteExamples.xml new file mode 100644 index 0000000000000000000000000000000000000000..1468c884cc7b6cfcb0134692dbfa58dc95a647ad --- /dev/null +++ b/SDT/schema2.0/test/EchonetLiteExamples.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- Example SDT definition taken from EchonetLite https://github.com/ECHONET-Consortium --> + +<Domain id="jp.echonet" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://homegatewayinitiative.org/xml/dal/2.0"> + + <!-- Various examples for module classes --> + + <Modules> + + <!-- actuator --> + + <ModuleClass name="operationStatus"> + <Data> + <DataPoint name="operationStatus" type="boolean" writable="true"> + <Doc>This property indicates the ON/OFF status.</Doc> + </DataPoint> + </Data> + <Events> + <Event name="operationStatus"> + <Data> + </Data> + </Event> + </Events> + </ModuleClass> + + <!-- runtime property --> + + <ModuleClass name="installationLocation"> + <Data> + <DataPoint name="installationLocation" type="string" writable="true"> + <Doc>This property indicates the installation location</Doc> + </DataPoint> + </Data> + <Events> + <Event name="installationLocation"> + <Data> + </Data> + </Event> + </Events> + </ModuleClass> + + <!-- sensor readout --> + + <ModuleClass name="measuredInstantaneousPowerConsumption"> + <Data> + <DataPoint name="measuredInstantaneousPowerConsumption" type="integer" writable="false"> + <Doc>This property indicates the instantaneous power consumption of the device in watts.</Doc> + </DataPoint> + </Data> + </ModuleClass> + + <ModuleClass name="temperatureSensorDataPoints"> + <Data> + <DataPoint name="measuredTemperatureValue" type="integer" writable="false"> + <Doc>This property indicates the measured temperature value in units of 0.1C.</Doc> + </DataPoint> + </Data> + </ModuleClass> + </Modules> + + + + <!-- Very simple example for a washing machine definition --> + + <RootDevices> + <RootDevice id="SimpleWaschingMachine"> + <DeviceInfo> + <Name>washing machine</Name> + <Vendor>Echonet</Vendor> + </DeviceInfo> + + <!-- Inheriting from the global operating status --> + + <Modules> + <Module name="washingMachineOperationStatus"> + <extends domain="jp.echonet" class="operationStatus"/> + </Module> + + <!-- Data points local to the wasching machine device --> + + <Module name="washingMachineDataPoints"> + <Data> + <DataPoint name="door/CoverOpen/CloseStatus" type="enum" writable="false"> + <Doc>This property indicates whether the door/cover is open or closed.</Doc> + </DataPoint> + <DataPoint name="washingMachineSetting" type="enum" writable="true"> + <Doc>Washing machine setting</Doc> + </DataPoint> + <DataPoint name="currentStageOfWashingCycle" type="enum" writable="false"> + <Doc>This property indicates the current stage of the washing cycle.</Doc> + </DataPoint> + <DataPoint name="timeRemainingToCompleteWashingCycle" type="time" writable="false"> + <Doc>This property indicates the time remaining to complete the current washing cycle in the HH:MM:SS format.</Doc> + </DataPoint> + <DataPoint name="onTimerReservationSetting" type="enum" writable="true"> + <Doc>Reservation ON/OFF</Doc> + </DataPoint> + <DataPoint name="onTimerSetting" type="time" writable="true"> + <Doc>Timer value (HH:MM)</Doc> + </DataPoint> + <DataPoint name="relativeTimeBasedOnTimerSetting" type="time" writable="true"> + <Doc>Timer value (HH:MM)</Doc> + </DataPoint> + </Data> + </Module> + + </Modules> + </RootDevice> + </RootDevices> + +</Domain> + \ No newline at end of file diff --git a/SDT/schema3.0/build.xml b/SDT/schema3.0/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..ca74f2f8baa22447c6c75c30b903c786887572d0 --- /dev/null +++ b/SDT/schema3.0/build.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8" ?> + +<!-- - HGI Device Abstraction Layer - - - - - - - - - - - - - - - - - - - - --> +<!-- --> +<!-- Extends the standard build with targets for: --> +<!-- - generate XML schema the from Relax NG (xml) description --> +<!-- - validate DAL documents against the XML Schema --> +<!-- - generate HTML documentation from DAL documents --> + +<project name="importing" basedir="." default="schemas"> + <import file="etc/common.xml"/> + + <!-- Read the namespace declarations from a file (to get linebreaks) - - - --> + + <loadfile property="schema.xmlns" srcFile="${basedir}/etc/schema.xmlns"/> + + <!-- The RNG file the XML and RNC schemas are generaed from - - - - - - - --> + + <property name="schema.name" value="domain"/> + <property name="schema.rng" value="${path.src}/${schema.name}.rng"/> + + <!-- HTML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- Generate HTML documentation from domain definitions in the test --> + <!-- directory. The module classes included via the extends tagged are --> + <!-- included in the documentation - so an xinclude capable XSL engine is --> + <!-- needed. --> + <!-- This needs Ant version 1.8+ and it must be augmented with an current --> + <!-- version of Xerces. Download the binray distribution and place the put --> + <!-- xml-apis.jar and xercesImpl.jar in the Ant lib directory. --> + + <target name="html"> + <mkdir dir="${path.genbase}" /> + <xslt basedir="${basedir}/test" destdir="${basedir}/gen/html" + style="${basedir}/style/html.xsl"> + <param name="destdir" expression="${basedir}/gen/html"/> + <sysproperty + key="org.apache.xerces.xni.parser.XMLParserConfiguration" + value="org.apache.xerces.parsers.XIncludeParserConfiguration"/> + </xslt> + </target> + + <!-- Schemas - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- The schema is specified using Relax NG (xml) and trang is used to --> + <!-- generate the XML schema. The schema is also generated in Relay NG --> + <!-- compact syntax, which is used by some validating editors (e.g. emacs) --> + <!-- The resulting schemas need some additional patching before thy are --> + <!-- usable --> + + <target name="schemas"> + <java jar="${basedir}/lib/trang.jar" fork="true"> + <arg value="${schema.rng}"/> + <arg value="${basedir}/etc/${schema.name}.rnc"/> + </java> + + <!-- So that the editor does not complain about include directives, the --> + <!-- resulting schema is included in another schema, which includes the --> + <!-- necessary element definitions. To be able to do this the --> + <!-- definition for Imports must be deleted from this generated schema. --> + + <replace file="${basedir}/etc/${schema.name}.rnc" + token="Imports = element Imports { Domain* }?" value=""/> + + <java jar="${basedir}/lib/trang.jar" fork="true"> + <arg value="${schema.rng}"/> + <arg value="${path.src}/${schema.name}.xsd"/> + </java> + + <!-- Can't validate against the generated schema unless we add the --> + <!-- target and default namespaces ... --> + + <replace file='${path.src}/domain.xsd' + token='xmlns:xs="http://www.w3.org/2001/XMLSchema"' + value='${schema.xmlns}'/> + + <!-- In addition the xml:base tag, which is added automatically when --> + <!-- including a document, must also be permitted by out schema. --> + <!-- The schema generated from RNG is almost correct schema ... but --> + <!-- the schemaLocation is wrong. --> + + <replace file='${path.src}/domain.xsd' + token="xml.xsd" value="http://www.w3.org/2001/03/xml.xsd"/> + </target> + + <!-- Validate - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- Check the Device Description conforms to the Device Abstraction --> + <!-- Schema. Note that we need to activate support for XML includes --> + + <target name="validate" depends=""> + <schemavalidate warn="true"> + <fileset dir="${basedir}/test" includes="*.xml"/> + <attribute name="http://apache.org/xml/features/xinclude" value="true"/> + <schema namespace="http://homegatewayinitiative.org/xml/dal/3.0" + file="${path.src}/domain.xsd" /> + <schema namespace="http://www.w3.org/2001/XInclude" + file="${basedir}/etc/XInclude.xsd" /> + <schema namespace="http://www.w3.org/2001/XMLSchema" + file="${basedir}/etc/XMLSchema.xsd" /> + </schemavalidate> + </target> + +</project> + diff --git a/SDT/schema3.0/docs/Changelog.md b/SDT/schema3.0/docs/Changelog.md new file mode 100644 index 0000000000000000000000000000000000000000..5eb97fd8b9f365ab9aebf4435629f78d57393ccc --- /dev/null +++ b/SDT/schema3.0/docs/Changelog.md @@ -0,0 +1,33 @@ +# Changelog + +## Changes in 3.0 +- Renamed ``<RootDevice>``to ``<Device>`` and ``<Device>`` to ``<SubDevice>``, +- Added complex data types: *Struct* and *Arrays*. +- Simplified the UML diagram. Split the UML diagram into two parts, one for the base elements and one for the data types. +- In the UML diagram: Moved ``<extends>`` into the UML ``<ModuleClass>`` element (easier to read). +- Added support to specify *Units of Measurement* to data types, +- Added ``<Doc>`` to ``<Domain>`` and other elements. +- ``<Doc>`` is now always the first part of an element. +- Changed ``<DeviceInfo>`` element to a list of ``<Characteristic>``. +- Added ``<Characteristic>`` list to ``<Modules>`` and ``<ModuleClasses>``. +- The ``<data>`` element in ``<Event>`` is now optional to support events without attached or associated data. +- In Actions: Added ``<Args>`` as a surrounding list around a list of ``<Arg>``. +- Added *Constraints* to ``<DataType>``. +- Added optional *name* attribute to ``<DataType>``. This mandatory for elements of a *struct*. +- Restructured the [RNG](SDT/schema3.0/src/domain.rng) file for better readability and maintainability. +- In the [RNG](SDT/schema3.0/src/domain.rng)/[XSD](SDT/schema3.0/src/domain.xsd): Changed cardinality of the occurrence of elements that are part of a list of elements (e.g. ``<SubDevices><SubDevice>…</SubDevice></SubDevices>`` from „zero or more“ to „one or more“ when the surrounding list element itself is optional (to avoid empty lists). + + + +## Changes in 2.0.1 +- Added missing "uri" data type. + +## Changes in 2.0 +- Introduced RootDevice to support hierarchical embedded devices. +- Added new data types (byte, float, array, enum, date, time, datetime, blob, uri) +- Added ``readable`` and ``eventable`` to data points. +- Added optional ``<SerialNumber>``, ``<VendorURL>`` and ``<FirmwareVersion>`` elements to DeviceInfo +- Added optional ``<Doc>`` element to Event +- Changed the optionality of the ``<DataPoint>``'s ``type`` attribute to "required". +- Added [UML diagram](SDT/schema2.0/docs/SDT_Components.md) +- Changed the namespace for the XSD from "hgi.org" to "homegatewayinitiative.org". \ No newline at end of file diff --git a/SDT/schema3.0/docs/Examples.md b/SDT/schema3.0/docs/Examples.md new file mode 100644 index 0000000000000000000000000000000000000000..4082f949e494d9f2f1c466ce02e6f8cd3e8fcac9 --- /dev/null +++ b/SDT/schema3.0/docs/Examples.md @@ -0,0 +1,14 @@ +# Examples and Contributions + +## HGI +### Multi Socket Electrical-Extension-Block + +[mseeb.xml](../test/mseeb.xml) + + + +## DECT ULE + +## Echonet + +## EnOcean \ No newline at end of file diff --git a/SDT/schema3.0/docs/FAQ.md b/SDT/schema3.0/docs/FAQ.md new file mode 100644 index 0000000000000000000000000000000000000000..77c4fb4e2c1fbda17077241d0a41365c4be7888d --- /dev/null +++ b/SDT/schema3.0/docs/FAQ.md @@ -0,0 +1,7 @@ +# Frequently Asked Questions + +## What is the HGI? +tbd + +## What is the SDT? +tbd diff --git a/SDT/schema3.0/docs/Introduction.md b/SDT/schema3.0/docs/Introduction.md new file mode 100644 index 0000000000000000000000000000000000000000..a2f738a4e9758ba6df09e47b2e50c8684a8ec8c8 --- /dev/null +++ b/SDT/schema3.0/docs/Introduction.md @@ -0,0 +1,65 @@ +# Introduction to the SDT + +The Smart Device Template (SDT) is a template which is used to model the capabilities, actions and events of connected devices. The intent of the SDT is to be able to model any type of connected device using a well accepted and standardised format. The main application of SDT is to enable a uniformly structured Application Programmer’s Interface (API) to applications that need to interact with connected devices. Usually, these applications would communicate to devices using an Abstraction Layer as an intermediary logic. The Abstraction Layer „hides“ the technology-specific, native language format of devices of different technology type from the applications. + +## The goal + +Interoperability for smart-home and other IoT-related applications and Internet-of-Things devices and services is a key objective that is not currently easy to meet, because of the many types of technology specific device interfaces in wide deployment. There is no accepted standard. + +A major goal for service providers is that software developers should be able to write application software which would handle most of the commonly used functions for any device, irrespective of the device technology. Furthermore, software developers should not have to make major changes to the software in case a new device of similar function but of a different interface technology is used. +If these goals were fully or even partly met, major advantages can be obtained: + +- Service Providers would be more able to deploy and support select new technology types of devices, because existing software application code could be more easily adapted to the new device technology. +- Devices of multiple technology types could be deployed and supported by the same platform (e.g. a Home Gateway), and applications could more easily communicate with them simultaneously. +- Devices of multiple technology types could be deployed by a service provider in different regions or homes, but common application code could be used to support applications. For example, a home automation application could support ECHONET devices in one set of homes, and ZigBee devices in another +- Makers of software application code can more easily support multiple device technology types +- Vendors using newer device technologies could more easily bring their products to new markets. + +The interoperability benefits can potentially partially obtain even without a fully complete interoperability of the SDT. For example, the most common functions can be modeled with SDT, and more particular functions can be modeled with technology-specific, proprietary, or seldom-used aspects. + +## How should SDT work? + +The basic concept is that a manufacturer, organisation or global SDO would define its preferred Smart Device Template, in XML, specified by and based on an XSD. Using that XSD, manufacturers or indeed hobbyists could "describe" existing or new devices by means of XML files, specifying the capabilities and the parameters needed to control the devices. + +Assuming that the XML files conform to the specified XSD and to some guidelines described in this document, software developers could readily create APIs able to "parse" the XML-descriptions of devices and (assuming the underlying LAN technology of the device is supported by the software/hardware environment in the gateway) operate the equipment. + +The key to making software reliably interoperate with various technologies is to define in the SDT a finite and convenient to use number of functions (which is the decision of the SDO which are commonly used and can therefore be reliably re-used in software for one type of device or another. + +For the convenience of users and developers, it would also be possible to collect the device descriptions of common "modules" (types of) appliances so that the operations of "a generic air-conditioner" could be agreed and re-used often, adapting descriptions of special models with just some special features added as local extensions. Agreeing on the definition of "a generic XYZ appliance" is rather time-consuming, so such "repository" may not become standardised, however the basic approach has huge benefits even if such an archive (also known as a "hierarchical ontology") is never formally agreed. + +The sections below explain this in more detail. + +## How does the SDT approach simplify software development? + +Simplification is achieved in software development by first developing methods to handle common or general functions, then treating necessary "uncommon" functions as extensions; treating each functionality as an individual special case does not scale. Identifying the general functions is often called "abstracting". + +There are four major levels of progressively greater abstraction in the signaling and software along the path between a sensor (or actuator) and a software application installed in the cloud: + +1. a LAN protocol can provide a common set of signaling methods for all compatible sensors/actuators/devices (abstraction at the LAN-controller) +2. a local gateway software can provide common functions to operate diverse kinds of LAN-controllers (abstraction in the local gateway) +3. an IoT platform in the WAN can interoperate with a number of WAN protocols supported by different kinds of gateways (abstraction at the IoT platform) +4. software in the Cloud can interact with diverse IoT platforms and other software applications (abstraction in the Cloud) + +The concept of the SDT was created in order to make life easier for the software developer working particularly at the second level, creating software for local gateways to interact with devices connected by various kinds of (wireless) LAN technologies/protocols. The same information written into XML instantiations of the SDT do describe sensors or appliances can also be very valuable, however, to applications in the Cloud, helping to interpret the data. + +Currently every software developed for home gateways or internet-of-things gateways needs to be capable of using various different protocols (ZigBee, UPnP, EchonetLite, DECT ULE, etc) to interact with a range of devices designed for the home environment. This adds extreme overheads in integrating, checking and updating code. The purpose of SDT is to describe devices and device services in a way which is independent of the LAN technology, in a format which is convenient and reliable for integration in modern code (Java, C/C++, ...). + +In general a description of device (or complex appliance) behaviour can be made in many ways, with various kinds of constraints: + +1. no constraints (e.g. using OWL 2.0 or even more "flexibly" RDF) +2. moderate constraints (e.g. using XML and a related extensible XSD template) +3. strict constraints (typical for a device certified to interoperate with a specific LAN protocol) + +HGI chose to use the approach "moderate constraints" (XSD based) because for software development it offers ease of use and a good compromise. In particular, if there are few or no constraints on control parameters then few automatic checks can be made to detect if the software parameters are appropriate for each device integrated. XML and XSD languages were chosen because they are familiar to many developers, can be parsed with common software tools, and can still be created and interpreted by humans if necessary. + +HGI believes that Device information models based on XML and extensible XSD need some guidelines. If every possible feature of every existing LAN technology and appliance were allowed to be described in any formally correct way, then the results would be a modern Babel, no better than today's system of widely different and wildly competing automation protocols. + +Therefore HGI proposes to recommend a certain structure (template) for the information model(s), but to allow extensions. Naturally, the more industry consensus is achieved for a single recommended template, the greater the utility for software developers (and users). + +## Related aspects which are out of scope of the SDT + +Not directly part of this work is a related but separate aspect of every gateway software development: a "device abstraction layer" which can translate between (1) software APIs written based on a particular SDT and (2) the "commands" expected by several different LAN protocols and their hardware controllers. + +Programmers developing a "device abstraction layer" for software in a gateway need to create run-time representations of all the recognized devices, their operations and their actual states. This internal "information model" needs to be updated in real time as the devices and the users interact. Programmers may be tempted to use the SDT structure to organize their real-time information model, adding additional information elements for the current state of each device, for some kind of "history" of commands sent/acknowledged, the user etc. This is an efficient approach BUT it must be clear that the real-time state information and history of events, etc, can NOT be represented in a pre-defined SDT not in an XML giving specific details for a device. + +The SDT defines the structure of all compliant XML descriptions. Each XML description of a specific device is definable at the time of manufacture of the device and can therefore only contain "static" information: (a) manufacturer data in the form of documentation elements and properties, (b) device capability information detailing the firmware operations and types/meanings of input/output variables. diff --git a/SDT/schema3.0/docs/Links.md b/SDT/schema3.0/docs/Links.md new file mode 100644 index 0000000000000000000000000000000000000000..3116385617704f49a4ba246ab9934f2131aadc3c --- /dev/null +++ b/SDT/schema3.0/docs/Links.md @@ -0,0 +1,14 @@ +# Links & References +- **HGI** : [http://www.homegatewayinitiative.org](http://www.homegatewayinitiative.org) + +## XML +- **RELAX NG** : [http://relaxng.org](http://relaxng.org) + - **RELAX NG Tutorial** : [http://relaxng.org/tutorial-20011203.html](http://relaxng.org/tutorial-20011203.html) + +## Tools +- **UMLet** : [http://www.umlet.com](http://www.umlet.com) +The free UML drawing tool used to draw the UML file. +- **Apache Ant** : [http://ant.apache.org](http://ant.apache.org) +Build tool + + diff --git a/SDT/schema3.0/docs/SDT Build System Components and Licenses.md b/SDT/schema3.0/docs/SDT Build System Components and Licenses.md new file mode 100644 index 0000000000000000000000000000000000000000..962b1271297453113611581380691ac86c1758a2 --- /dev/null +++ b/SDT/schema3.0/docs/SDT Build System Components and Licenses.md @@ -0,0 +1,65 @@ +# Build System Libraries and Licenses +The following libraries are used in the build system for the SDT. + +## trang.jar + +[http://www.thaiopensource.com/relaxng/trang-manual.html](http://www.thaiopensource.com/relaxng/trang-manual.html) + +*Trang* takes as input a schema written in any of the following formats: + +- RELAX NG (XML syntax) +- RELAX NG (compact syntax) +- XML 1.0 DTD + +and produces as output a schema written in any of the following formats: + +- RELAX NG (XML syntax) +- RELAX NG (compact syntax) +- XML 1.0 DTD +- W3C XML Schema + +*Trang* can also infer a schema from one or more example XML documents. + + +### License +Copyright (c) 2002, 2003, 2008 Thai Open Source Software Center Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +- 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. +- 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. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +## Ant-Contrib Tasks + +[http://ant-contrib.sourceforge.net](http://ant-contrib.sourceforge.net) + +The *Ant-Contrib* project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant. + +### License + +This Software is distributed under the Apache Software License. + +## antSetLogLevel.jar + +GUI dialog for Ant tasks. + +Source: Deutsche Telekom + + + diff --git a/SDT/schema3.0/docs/SDT Build System.md b/SDT/schema3.0/docs/SDT Build System.md new file mode 100644 index 0000000000000000000000000000000000000000..03b182bcdffdec4c305efc42380cb3176f5914d1 --- /dev/null +++ b/SDT/schema3.0/docs/SDT Build System.md @@ -0,0 +1,73 @@ +# SDT Build System +This document describes the SDT build system and how to build the SDT and validate new contributions. + +The files referenced in this document point to version **3.0** of the SDT. + +## Directory Structure and Important Files +- [SDT/schema3.0/](../..) : Base directory +- [SDT/schema3.0/src/](../src/) : Source files of the SDT. + - [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). + **Only edit this file when one wants to make changes to the SDT!** + - [domain.xsd](../src/domain.xsd) : The SDT schema definition that is generated from *domain.rng*. + - [xml.xsd](../src/xml.xsd) : General schema definitions for the SDT +- [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. +- [SDT/schema3.0/build.xml](../build.xml) : This is the definition file for the ant build system. +- [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. +- [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. + - [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**: + + default namespace xsl = "http://homegatewayinitiative.org/xml/dal/3.0" + + - [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.** +- [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). + +## Installation +- Install Java on your computer +- Download and install Apache ant from [http://ant.apache.org](http://ant.apache.org) +- Clone the SDT repository from GitHub: + + $ git clone https://github.com/Homegateway/SmartDeviceTemplate.git + +## How to Use the Build System +After cloning the repository go to the directory *SDT/schema* and run commands depending on what you want to achieve. + +### Build the Schema +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) + + $ cd SDT/schema + $ ant + +### Validate SDT Definitions +You can use the build system to validate new SDT definitions or changes made to existing ones by running the following command: + + $ cd SDT/schema + $ ant validate + +The output after a successful validation should look like this: + +>[schemavalidate] 2 file(s) have been successfully validated. +>BUILD SUCCESSFUL +>Total time: 1 second + +Otherwise you most likely receive a stack trace 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 occurred (here: file *mseeb.xml* on line 66) and a reason: + +>[schemavalidate] /Users/someone/Sources/git/SmartDeviceTemplate/SDT/schema/test/mseeb.xml:66:18: cvc-elt.1: Cannot find the declaration of element 'Domain'. +>BUILD FAILED + +--- + +## Editing +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. + +**All changes to the schema must therefore be made in [domain.rng](../src/domain.rng), NOT [domain.xsd](../src/domain.xsd) !** + +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. + +PLEASE ONLY EDIT THESE FILES IF NECESSARY. + +- [SDT/schema3.0/build.xml](../build.xml) +e.g. in the *ant* target "validate" +- [SDT/schema3.0/etc/dal.rnc](../etc/dal.rnc) +e.g. the entry "default namespace xsl" +- [SDT/schema3.0/etc/schema.xmlns](../etc/schema.xmlns) +- [SDT/schema3.0/etc/schemas.xml](../etc/schemas.xml) diff --git a/SDT/schema3.0/docs/SDT_Components.md b/SDT/schema3.0/docs/SDT_Components.md new file mode 100644 index 0000000000000000000000000000000000000000..cb1a03e912f351d78d87a717e2dace07e540d8cb --- /dev/null +++ b/SDT/schema3.0/docs/SDT_Components.md @@ -0,0 +1,393 @@ +# SDT Components + +[Domain](#Domain) +[RootDevice](#RootDevice) | [Device](#Device) + [DeviceInfo](#DeviceInfo) +[ModuleClass](#ModuleClass) + [Action](#Action) + [Data / DataPoint](#Data) + [DataType](#DataType) + [Event](#Event) +[Doc](#Documentation) + +--- + +In this document an overview about the SDT 3.0 definitions and component hierarchy is given. + +Various details about recommended structure for SDTs are described in the next sections. The key point to keep in mind is that HGI sought a compromise between, at the one extreme, complete flexibility (which could describe any device, of any complexity) and, at the other extreme, a rigid structure which could be 100% validated and lead to validated software APIs. + +A major decision, facilitating validation of code and signalling, was to describe services (functionality) of devices in terms of ModuleClasses made up of combinations of three kinds of elements: + +1. DataPoints which can be read/written, +2. Actions which consist of more complex sequences of operations; +3. Events which can be signalled ("published") by devices asynchronously. + +This structure shown in the following figure. + + + + +## SDT Overview + +The following UML diagram presents an overview of the structure (elements) of every SDT which is conformant with these guidelines. As implied in the above descriptions, there can be many different choices of the details of a SDT, each one optimized for a particular market segment and the types of devices used in that market segment. Obviously an unnecessary proliferation is counter-productive, but as long as each SDT conforms to the structure shown below then it will be possible with little or modest effort for software applications to be adapted accordingly. + +The reader must keep in mind that the UML diagram below is in a sense the meta-format for different possible Smart Device Templates (XSDs) for device descriptions (XMLs) of real devices - sorry about that. + +The followng UML diagram presents an overview about the SDT components. + + + +The [DataType](#DataType) strukture is shown in the following UML diagram: + + + +The key to the diagram elements of the UML diagrams above and the snippets in the following sections: + + + +The syntax used in the diagram to model an XML Schema Definition (XSD) as an UML diagram follows the following approaches: + +- [Design XML schemas using UML](http://www.ibm.com/developerworks/library/x-umlschem/) +- [UML For W3C XML Schema Design](http://www.xml.com/pub/a/2002/08/07/wxs_uml.html) + + +## Components + + +**NOTE** The content here is still SDT2 and needs to be updated + + + + +<a name="Domain"></a> +### Domain +The *Domain* is the top-level component that defines all modules and devices of a domain. A *Domain* can import definitions of other domains. + +A *Domain* can define [Modules](#ModuleClass) or [RootDevices](#RootDevice) only, or may choose to provide both. + + + +#### Attributes +- **id** : The identifier for that *Domain*. Required. + +#### Elements +- **Imports** : XML import/include of other XML files. Optional. +- **Modules** : A list of [Module](#ModuleClass) components that are global to the whole domain. Optional. +- **RootDevices** : a List of [RootDevices](#RootDevice) components. Optional. + +#### Example + + <Domain xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + id="org.homegatewayinitiative"> + <Imports> + <xi:include href="./dal-core.xml" parse="xml" /> + </Imports> + <Modules> + <!-- List of Domain global Modules goes here --> + </Modules> + <RootDevices> + <!-- List of RootDevices goes here --> + </RootDevices> + </Domain> + + +--- + +<a name="RootDevice"/></a> +### RootDevice + +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. + +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. + +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. + +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". + +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). + +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. + +*RootDevices* may define their own [ModuleClasses](#ModuleClass) or refer to predefined ModulesClasses of the same or another *Domain*. + + + +#### Attributes +- **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. + +#### Elements + +- **[Doc](#Documentation)** : Documentation for the *RootDevice*. Optional. +- **Modules** : A list of [Module](#ModuleClass) components that are local to the *RootDevice*. Optional. +- **[DeviceInfo](#DeviceInfo)** : Further meta-data about the *RootDevice*. Optional. +- **Devices** : A list of [Device](#Device) components. Optional. + +#### Example + + <RootDevice id="aRootDevice"> + <Doc>Some documentation</Doc> + <Modules> + <!-- List of Modules local to the RootDevice goes here--> + </Modules> + <DeviceInfo> + <!-- The DeviceInfos for the RootDevice goes here--> + </DeviceInfo> + <Devices> + <!-- List of Sub-Devices of the RootDevice goes here--> + </Devices> + </RootDevice> + +--- + +### Device +*Devices* are optional components of a [RootDevice](#RootDevice). They represent physical sub-devices inside another device (the RootDevice). + +*Devices* may define their own [ModuleClasses](#ModuleClass) or extend ModulesClasses of its or another [Domain](#Domain). + + + +#### Attributes +- **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. + +#### Elements +- **[Doc](#Documentation)** : Documentation for the *Device*. Optional. +- **Modules** : A list of [Module](#ModuleClass) components that are local to the *Device*. Optional. +- **[DeviceInfo](#DeviceInfo)** : Further meta-data about the *Device*. Optional. + +#### Example + + <Device id="aDevice"> + <Doc>Some documentation</Doc> + <Modules> + <!-- List of Modules local to the Device goes here--> + </Modules> + <DeviceInfo> + <!-- The DeviceInfo for the Device goes here--> + </DeviceInfo> + </RootDevice> + +--- + +<a name="DeviceInfo"/></a> +### DeviceInfo +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. + + + +#### Attributes +None. + +#### Elements +- **Name** : Vendor-specific name of a device. Required. +- **Vendor** : Name of the vendor for the device. Required. +- **FirmwareVersion** : Current version number of the firmware or other version information. Optional. +- **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. +- **SerialNumber** : The serial number or serial string. Optional. +- **[Doc](#Documentation)** : Documentation for the *DeviceInfo*. Optional. + + +#### Example + + <DeviceInfo> + <Name>SomeDeviceName</Name> + <Vendor>ACME</Vendor> + <FirmwareVersion>1.0</FirmwareVersion> + <VendorURL>http://www.example.com/</VendorURL> + <SerialNumber>1234.5</SerialNumber> + </DeviceInfo> + +--- + +<a name="ModuleClass"/></a> +### Module, ModuleClass +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. + +*Modules* represent instantiations of *ModuleClasses*. + +*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. + +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). + + + +#### Attributes +- **Name** : Name of the *ModuleClass*. The name must be unique in the scope of the [Domain](#Domain). Required. + +#### Elements +- **extends** : Reference to a another *ModuleClass* that is extended with this *ModuleClass*. Optional. +The element has the following attributes: + - **domain** : Identifier / Reference of the [Domain](#Domain) of the extended *ModuleClass*. Required when *extends* is specified. + - **class** : Name of the *ModuleClass* in the [Domain](#Domain) thet is extended. +- **[Doc](#Documentation)** : Documentation for the *ModuleClass*. Optional. +- **Actions** : A list of [Action](#Action) components, each defining a single action. Optional. +- **Data** : A list of [Data](#Data) components. Optional. +- **Events** : A list of [Event](#Event) components. Optional. + +#### Example + + <ModuleClass name="BooleanState"> + <Doc>Some documentation</Doc> + <Actions> + <!-- List of Actions goes here--> + </Actions> + <Events> + <!-- List of Events goes here--> + </Events + <Data> + <!-- List of DataPoints goes here--> + </Data> + </ModuleClass> + +--- + +<a name="Action"/></a> +### Action +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). # + +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. + + + +#### Attributes +- **name** : The name of the *Action*. The name must be unique in the scope of the [ModuleClass](#ModuleClass). Required. +- **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. + +#### Elements +- **[Doc](#Documentation)** : Documentation for the *Action*. Optional. +- **Arg** : Zero or more occurances of argument definitions for an *Action*. Optional. +The *Arg* has the following attributes and elements: + - **name** : The name of the *Arg*. Attribute. Required. + - **type** : The type of the *Arg*. It must comply to one of the defined [DataTypes](#DataType) Attribute. Required. + - **Doc** : Documentation for the *Arg* element. Optional. + +#### Example +The following are two examples for actions implementing a getter and a setter for boolean values. + + <Action name="get" type="boolean"> + <Doc>Obtain the current associated state. Example of a getter.</Doc> + </Action> + + <Action name="setTarget"> + <Doc>Set the associated state to the specified value. Example of a setter.</Doc> + <Arg name="value" type="boolean"> + <Doc>The desired value of the associated state.</Doc> + </Arg> + </Action> + +--- + +<a name="Data"/></a> +### Data +The *Data* component represents a list of *DataPoints* of a [ModuleClass](#ModuleClass). + + + + +*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. + +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. + +In EBNF: + + name = dataPointName | "/" path ; + path = segment "/" path | dataPointName ; + segment = string ; + dataPointName = string ; + string = (* character string excluding the character "/" *) ; + + +#### Attributes +None. + +#### Elements +- **DataPoint** : Zero or more occurances of *DataPoints. Optional. +A *DataPoint* has the following attributes and elements: + - **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. + - **type** : The type of the *DataPoint*. It must comply to one of the defined *DataTypes*. Attribute. Required. + - **writable** : Boolean value that indicates whether this *DataPoint* is writable by an application. Attribute. Optional. Default: false. + - **readable** : Boolean value that indicates whether this *DataPoint* is readable by an application. Attribute. Optional. Default: false. + - **eventable** : Boolean value that indicates whether an internal or external change of this *DataPoint* raises an event. Attribute. Optional. Default: false. + - **[Doc](#Documentation)** : Documentation for the *DataPoint* element. Optional. + + +#### Example + <Data> + <DataPoint name="attributeName" type="string" writable="false"> + <Doc>Some documentation for the DataPoint</Doc> + </DataPoint> + </Data> + +--- + + +<a name="DataType"/></a> +### DataType +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): + +- **boolean** : A boolean value as defined in [http://www.w3.org/TR/xmlschema-2/#boolean](http://www.w3.org/TR/xmlschema-2/#boolean) . +- **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) . +- **integer** : An integer value as defined in [http://www.w3.org/TR/xmlschema-2/#integer](http://www.w3.org/TR/xmlschema-2/#integer) . +- **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) . +- **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) . +- **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. +- **date** : A date value as defined in [http://www.w3.org/TR/xmlschema-2/#date](http://www.w3.org/TR/xmlschema-2/#date) . +- **time** : A time value as defined in [http://www.w3.org/TR/xmlschema-2/#time](http://www.w3.org/TR/xmlschema-2/#time) . +- **datetime** : A time value as defined in [http://www.w3.org/TR/xmlschema-2/#dateTime](http://www.w3.org/TR/xmlschema-2/#dateTime) . +- **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) . +- **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) . + +--- + +<a name="Event"/></a> +### Event +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. + + + +#### Attributes +- **name** : The name of the *Event*. The name must be unique in the scope of the [ModuleClass](#ModuleClass). Required. + +#### Elements +- **Data** : A list of [Data](#Data) components for an event's payload. Optional. +- **[Doc](#Documentation)** : Documentation for the *Event* Element. Optional. + + +#### Example + + <Event name="stateChanged"> + <Data> + <DataPoint name="state" type="boolean"> + </DataPoint> + </Data> + </Event> + +--- + +<a name="Documentation"/></a> +# Documentation +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. + +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: + + + Doc = "<Doc>" docContent "</Doc" ; + docContent = docText | { paragraph | image } ; + docText = { text | emphasizedText | boldText | monotypeText } ; + emphasizedText = "<em>" text "</em>" ; + boldText = "<b>" text "</b>" ; + monotypeText = "<tt>" text "</tt>" ; + paragraph = "<p>" docText "</p>" ; + image = "<img src=" url ">" "<caption>" text "</caption>" "</img>" ; + url = "\"" (* valid URL *) "\"" ; + text = (* XML text element *) ; + + +The intended use for each element is: + +- **emphasizedText** : Emphasize the included text, e.g. printing it in italics font. +- **boldText** : Print the included text in bold font. +- **monotypeText** : Print the included text in a monospaced fonttype, e.g. to emphasize source code. +- **paragraph** : Structure the text in paragraphs. +- **image** : Include an image in the text. The image is loaded from the specified URL and must include a caption text. + diff --git a/SDT/schema3.0/docs/SDT_UML.uxf b/SDT/schema3.0/docs/SDT_UML.uxf new file mode 100644 index 0000000000000000000000000000000000000000..506ab24c18cfabeb3e34a00cabd023317b1814f6 --- /dev/null +++ b/SDT/schema3.0/docs/SDT_UML.uxf @@ -0,0 +1,711 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<diagram program="umlet" version="13.3"> + <help_text/> + <zoom_level>7</zoom_level> + <element> + <id>UMLNote</id> + <coordinates> + <x>70</x> + <y>420</y> + <w>217</w> + <h>182</h> + </coordinates> + <panel_attributes>bg=#FAF8C8 +fontsize=12 +/@ optional elementAttribute/ +/@ optional elementAttribute = default value/ +*@ mandatoryElementAttribute* +- mandatory element : Subclass (exact one) +/- optionalElement : SubClass (zero or one)/ +/* optionalElement : SubClass (zero or many)/ + +"Depends" Relation +and Cardinality + +Subclassing + +Cardinalities: +0,1 : zero or one +1 : exact one +0..* : zero or many +1..* : at least one or many +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>154</x> + <y>490</y> + <w>77</w> + <h>28</h> + </coordinates> + <panel_attributes>lt=<. +fontsize=10 +m1=0..* +</panel_attributes> + <additional_attributes>90.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>154</x> + <y>518</y> + <w>77</w> + <h>21</h> + </coordinates> + <panel_attributes>lt=<<- +fontsize=10</panel_attributes> + <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>700</x> + <y>763</y> + <w>105</w> + <h>154</h> + </coordinates> + <panel_attributes><<enumeration>> +BasicType +-- +boolean +byte +integer +float +string +enum +date +time +datetime +blob +uri</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>406</x> + <y>826</y> + <w>98</w> + <h>56</h> + </coordinates> + <panel_attributes>lt=<<. +m1= 0,1 +</panel_attributes> + <additional_attributes>120.0;50.0;60.0;50.0;60.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>406</x> + <y>770</y> + <w>98</w> + <h>56</h> + </coordinates> + <panel_attributes>lt=<<. +m1= 0,1 +</panel_attributes> + <additional_attributes>120.0;10.0;40.0;10.0;40.0;60.0;10.0;60.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>70</x> + <y>770</y> + <w>133</w> + <h>84</h> + </coordinates> + <panel_attributes>DataType +-- +/@ name : text/ +/@ unitOfMeasure : text/ +/- Doc : Doc/ +- TypeChoice +/* Constraints : Constraint/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>175</x> + <y>728</y> + <w>490</w> + <h>91</h> + </coordinates> + <panel_attributes>lt=<<. +m2=1..* +</panel_attributes> + <additional_attributes>10.0;60.0;10.0;20.0;680.0;20.0;680.0;100.0;640.0;100.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>175</x> + <y>728</y> + <w>490</w> + <h>133</h> + </coordinates> + <panel_attributes>lt=<<. +m2=1 +</panel_attributes> + <additional_attributes>10.0;60.0;10.0;20.0;680.0;20.0;680.0;160.0;640.0;160.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>490</x> + <y>854</y> + <w>133</w> + <h>35</h> + </coordinates> + <panel_attributes>SimpleType +-- +*@ type : BasicType* +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>616</x> + <y>868</y> + <w>98</w> + <h>35</h> + </coordinates> + <panel_attributes>lt=<<- +m1= 1 +</panel_attributes> + <additional_attributes>120.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>490</x> + <y>910</y> + <w>133</w> + <h>70</h> + </coordinates> + <panel_attributes>Constraint +-- +*@ name : text* +/@ type : BasicType/ +/@ value : text/ +/- Doc : Doc/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>196</x> + <y>840</y> + <w>308</w> + <h>98</h> + </coordinates> + <panel_attributes>lt=<. +m1=0..* +</panel_attributes> + <additional_attributes>420.0;110.0;340.0;110.0;340.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>616</x> + <y>910</y> + <w>147</w> + <h>56</h> + </coordinates> + <panel_attributes>lt=<<- +m1=1 +</panel_attributes> + <additional_attributes>190.0;10.0;190.0;60.0;10.0;60.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>490</x> + <y>770</y> + <w>133</w> + <h>35</h> + </coordinates> + <panel_attributes>StructType +-- +- DataType : DataType +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>490</x> + <y>812</y> + <w>133</w> + <h>35</h> + </coordinates> + <panel_attributes>ArrayType +-- +- DataType : DataType +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>406</x> + <y>805</y> + <w>98</w> + <h>35</h> + </coordinates> + <panel_attributes>lt=<<. +m1= 0,1 + +</panel_attributes> + <additional_attributes>120.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>70</x> + <y>665</y> + <w>735</w> + <h>28</h> + </coordinates> + <panel_attributes>halign=center +SDT 3.0 - DataType +fontsize=24 +bg=gray +lw=0.1</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>70</x> + <y>0</y> + <w>840</w> + <h>28</h> + </coordinates> + <panel_attributes>SDT 3.0 - Basic Elements +halign=center +fontsize=24 +bg=gray +lw=0.1</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>308</x> + <y>119</y> + <w>154</w> + <h>133</h> + </coordinates> + <panel_attributes>ModuleClass +-- +*@ name : text* +/@ optional : boolean = false/ +/- Doc : Doc/ +/- extends/ +/ @domain : IDRF/ +/ @class : text / +/* Property : Properties/ +/* Actions : Action/ +/* Data : DataPoint/ +/* Events : Event/ +fg=blue +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>546</x> + <y>119</y> + <w>154</w> + <h>77</h> + </coordinates> + <panel_attributes>Action +-- +*@ name : text* +/@ optional : boolean = false/ +/- Doc : Doc/ +/- DataType : DataType/ +/* Args : Arg/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>791</x> + <y>182</y> + <w>119</w> + <h>56</h> + </coordinates> + <panel_attributes>Arg +-- +*@ name ; text* +/- Doc : Doc/ +- DataType : DataType +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>693</x> + <y>182</y> + <w>112</w> + <h>28</h> + </coordinates> + <panel_attributes>lt=<. +m1= 0..*</panel_attributes> + <additional_attributes>140.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>70</x> + <y>119</y> + <w>154</w> + <h>77</h> + </coordinates> + <panel_attributes>Domain +-- +*@ id : ID* +/- Doc : Doc/ +/* imports/ +/* Modules : ModuleClass/ +/* Devices : Device/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>217</x> + <y>119</y> + <w>105</w> + <h>63</h> + </coordinates> + <panel_attributes>lt=<. +m1= 0..*</panel_attributes> + <additional_attributes>130.0;10.0;50.0;10.0;50.0;70.0;10.0;70.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>70</x> + <y>301</y> + <w>154</w> + <h>70</h> + </coordinates> + <panel_attributes>SubDevice +-- +*@ id : Name* +/- Doc : Doc/ +/* Property : Properties/ +/* Modules : Module/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>217</x> + <y>175</y> + <w>49</w> + <h>63</h> + </coordinates> + <panel_attributes>lt=<. +m1=0..* +</panel_attributes> + <additional_attributes>10.0;60.0;50.0;60.0;50.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>217</x> + <y>308</y> + <w>105</w> + <h>49</h> + </coordinates> + <panel_attributes>lt=<. +m1= 0..*</panel_attributes> + <additional_attributes>130.0;10.0;60.0;10.0;60.0;50.0;10.0;50.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>791</x> + <y>350</y> + <w>119</w> + <h>35</h> + </coordinates> + <panel_attributes>Doc +-- +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>455</x> + <y>119</y> + <w>105</w> + <h>42</h> + </coordinates> + <panel_attributes>lt=<. +m1= 0..* +</panel_attributes> + <additional_attributes>130.0;10.0;50.0;10.0;50.0;40.0;10.0;40.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>735</x> + <y>343</y> + <w>70</w> + <h>35</h> + </coordinates> + <panel_attributes>lt=<. +m1=0,1 +</panel_attributes> + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>455</x> + <y>154</y> + <w>105</w> + <h>84</h> + </coordinates> + <panel_attributes>lt=<. +m1= 0..* +</panel_attributes> + <additional_attributes>130.0;90.0;50.0;90.0;50.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>546</x> + <y>210</y> + <w>154</w> + <h>98</h> + </coordinates> + <panel_attributes>DataPoint +-- +*@ name : text* +/@ optional : boolean = false/ +/@ writable : boolean = true/ +/@ readable : boolean = true/ +/@ eventable : boolean = false/ +/- Doc : Doc/ +- DataType : DataType + +fg=blue +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>546</x> + <y>322</y> + <w>154</w> + <h>63</h> + </coordinates> + <panel_attributes>Event +-- +*@ name : text* +/@ optional : boolean = false/ +/- Doc : Doc/ +/* Data : DataPoint/ + +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>455</x> + <y>224</y> + <w>105</w> + <h>126</h> + </coordinates> + <panel_attributes>lt=<. +m1= 0..* +</panel_attributes> + <additional_attributes>130.0;150.0;80.0;150.0;80.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>308</x> + <y>273</y> + <w>154</w> + <h>21</h> + </coordinates> + <panel_attributes>Module +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>217</x> + <y>273</y> + <w>105</w> + <h>98</h> + </coordinates> + <panel_attributes>lt=<. + +</panel_attributes> + <additional_attributes>130.0;10.0;80.0;10.0;80.0;120.0;10.0;120.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>371</x> + <y>245</y> + <w>21</w> + <h>42</h> + </coordinates> + <panel_attributes>lt=<<- +</panel_attributes> + <additional_attributes>10.0;10.0;10.0;40.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>70</x> + <y>210</y> + <w>154</w> + <h>77</h> + </coordinates> + <panel_attributes>Device +-- +*@ id : Name* +/- Doc : Doc/ +/* Property : Properties/ +/* Modules : Module/ +/* SubDevices : SubDevice/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>217</x> + <y>273</y> + <w>49</w> + <h>56</h> + </coordinates> + <panel_attributes>lt=<. +m1=0..* +</panel_attributes> + <additional_attributes>10.0;50.0;40.0;50.0;40.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>217</x> + <y>245</y> + <w>105</w> + <h>56</h> + </coordinates> + <panel_attributes>lt=<. +m1= 0..* +</panel_attributes> + <additional_attributes>130.0;50.0;80.0;50.0;80.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>217</x> + <y>259</y> + <w>105</w> + <h>70</h> + </coordinates> + <panel_attributes>lt=<.</panel_attributes> + <additional_attributes>130.0;80.0;60.0;80.0;60.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>308</x> + <y>308</y> + <w>154</w> + <h>77</h> + </coordinates> + <panel_attributes>Property +-- +*@ name : text* +/@ optional : boolean = false/ +/@ value : text/ +/- Doc : Doc/ +- DataType : SimpleType +fg=blue +transparency=80</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>693</x> + <y>210</y> + <w>56</w> + <h>147</h> + </coordinates> + <panel_attributes>lt=<. +m1=0..* +</panel_attributes> + <additional_attributes>10.0;10.0;60.0;10.0;60.0;190.0;10.0;190.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>455</x> + <y>238</y> + <w>49</w> + <h>98</h> + </coordinates> + <panel_attributes>lt=<. +m1=0..*</panel_attributes> + <additional_attributes>10.0;110.0;50.0;110.0;50.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>280</x> + <y>770</y> + <w>133</w> + <h>70</h> + </coordinates> + <panel_attributes><<enumeration>> +TypeChoice +-- +SimpleType : SimpleType +Struct : StructType +Array : ArrayType + +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>196</x> + <y>777</y> + <w>98</w> + <h>63</h> + </coordinates> + <panel_attributes>lt=<<- +m1= 1 +</panel_attributes> + <additional_attributes>120.0;10.0;80.0;10.0;80.0;70.0;10.0;70.0</additional_attributes> + </element> +</diagram> diff --git a/SDT/schema3.0/docs/UML Diagram.md b/SDT/schema3.0/docs/UML Diagram.md new file mode 100644 index 0000000000000000000000000000000000000000..6cad1ebcf6d270297be6a463451a14e3fed70d6b --- /dev/null +++ b/SDT/schema3.0/docs/UML Diagram.md @@ -0,0 +1,14 @@ +# UML Diagram of the SDT 3.0 + +The source for the diagrams below is [here](SDT_UML.uxf). +## Basic Elements + + + +## Data Types + + + +## Key + + diff --git a/SDT/schema3.0/docs/images/Action.png b/SDT/schema3.0/docs/images/Action.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ef5763eb818538d8e0652652e79c221e7eedbd Binary files /dev/null and b/SDT/schema3.0/docs/images/Action.png differ diff --git a/SDT/schema3.0/docs/images/Arg.png b/SDT/schema3.0/docs/images/Arg.png new file mode 100644 index 0000000000000000000000000000000000000000..4df9eb09ff0855c2523e8fb2f31448a44d675d9b Binary files /dev/null and b/SDT/schema3.0/docs/images/Arg.png differ diff --git a/SDT/schema3.0/docs/images/Array.png b/SDT/schema3.0/docs/images/Array.png new file mode 100644 index 0000000000000000000000000000000000000000..6935adc0c1390c7cfd08bd4593f83b9f0b545db6 Binary files /dev/null and b/SDT/schema3.0/docs/images/Array.png differ diff --git a/SDT/schema3.0/docs/images/Constraint.png b/SDT/schema3.0/docs/images/Constraint.png new file mode 100644 index 0000000000000000000000000000000000000000..4293b90e6c7c8224987fb836a703072bb625acfb Binary files /dev/null and b/SDT/schema3.0/docs/images/Constraint.png differ diff --git a/SDT/schema3.0/docs/images/DataPoint.png b/SDT/schema3.0/docs/images/DataPoint.png new file mode 100644 index 0000000000000000000000000000000000000000..69ca53b5cdde67940fd3e584fdb6ef807bc3d9bf Binary files /dev/null and b/SDT/schema3.0/docs/images/DataPoint.png differ diff --git a/SDT/schema3.0/docs/images/DataType.png b/SDT/schema3.0/docs/images/DataType.png new file mode 100644 index 0000000000000000000000000000000000000000..331498883c24a8d3160603b0725a25d5bac18eac Binary files /dev/null and b/SDT/schema3.0/docs/images/DataType.png differ diff --git a/SDT/schema3.0/docs/images/Device.png b/SDT/schema3.0/docs/images/Device.png new file mode 100644 index 0000000000000000000000000000000000000000..1531e9e6f127f204dc73ffca53c06a5ef9a67bba Binary files /dev/null and b/SDT/schema3.0/docs/images/Device.png differ diff --git a/SDT/schema3.0/docs/images/Doc.png b/SDT/schema3.0/docs/images/Doc.png new file mode 100644 index 0000000000000000000000000000000000000000..0f7d8b85950d71c4eae562ef2565b31503cf9012 Binary files /dev/null and b/SDT/schema3.0/docs/images/Doc.png differ diff --git a/SDT/schema3.0/docs/images/Domain.png b/SDT/schema3.0/docs/images/Domain.png new file mode 100644 index 0000000000000000000000000000000000000000..1b70166e755a694b0ee73d171dd59e8c25c2a7e9 Binary files /dev/null and b/SDT/schema3.0/docs/images/Domain.png differ diff --git a/SDT/schema3.0/docs/images/Event.png b/SDT/schema3.0/docs/images/Event.png new file mode 100644 index 0000000000000000000000000000000000000000..7506c40b4d3387733195ca2242de40837f05fb46 Binary files /dev/null and b/SDT/schema3.0/docs/images/Event.png differ diff --git a/SDT/schema3.0/docs/images/MC.Action.DataPoint.png b/SDT/schema3.0/docs/images/MC.Action.DataPoint.png new file mode 100644 index 0000000000000000000000000000000000000000..0ea95b8f1912e93923d2827a2231ada11a567b1d Binary files /dev/null and b/SDT/schema3.0/docs/images/MC.Action.DataPoint.png differ diff --git a/SDT/schema3.0/docs/images/ModuleClass.png b/SDT/schema3.0/docs/images/ModuleClass.png new file mode 100644 index 0000000000000000000000000000000000000000..4d0cf45b81ee7606441337b4edbeaff22bf00a90 Binary files /dev/null and b/SDT/schema3.0/docs/images/ModuleClass.png differ diff --git a/SDT/schema3.0/docs/images/Property.png b/SDT/schema3.0/docs/images/Property.png new file mode 100644 index 0000000000000000000000000000000000000000..89581586826c13719185f3ad75aad5392efdd6e6 Binary files /dev/null and b/SDT/schema3.0/docs/images/Property.png differ diff --git a/SDT/schema3.0/docs/images/SDT3.0_UML.png b/SDT/schema3.0/docs/images/SDT3.0_UML.png new file mode 100644 index 0000000000000000000000000000000000000000..c487167f0f1f30644d1ac4b813d5b9a92f14acf9 Binary files /dev/null and b/SDT/schema3.0/docs/images/SDT3.0_UML.png differ diff --git a/SDT/schema3.0/docs/images/SDT_UML_Basic_Elements.png b/SDT/schema3.0/docs/images/SDT_UML_Basic_Elements.png new file mode 100644 index 0000000000000000000000000000000000000000..2f789edefc9d4f2cd014f41ef6a5c3e8234f62e8 Binary files /dev/null and b/SDT/schema3.0/docs/images/SDT_UML_Basic_Elements.png differ diff --git a/SDT/schema3.0/docs/images/SDT_UML_DataType.png b/SDT/schema3.0/docs/images/SDT_UML_DataType.png new file mode 100644 index 0000000000000000000000000000000000000000..3b6a4016b5f3de1a2f8717b8f04f8d6f5a5ee327 Binary files /dev/null and b/SDT/schema3.0/docs/images/SDT_UML_DataType.png differ diff --git a/SDT/schema3.0/docs/images/SDT_UML_Key.png b/SDT/schema3.0/docs/images/SDT_UML_Key.png new file mode 100644 index 0000000000000000000000000000000000000000..88b15e3a83759d499bb639b6bd38d11f70dcc0fe Binary files /dev/null and b/SDT/schema3.0/docs/images/SDT_UML_Key.png differ diff --git a/SDT/schema3.0/docs/images/SimpleType.png b/SDT/schema3.0/docs/images/SimpleType.png new file mode 100644 index 0000000000000000000000000000000000000000..3e7d5b08ef7747985a993fec9d87da5374d23397 Binary files /dev/null and b/SDT/schema3.0/docs/images/SimpleType.png differ diff --git a/SDT/schema3.0/docs/images/Struct.png b/SDT/schema3.0/docs/images/Struct.png new file mode 100644 index 0000000000000000000000000000000000000000..854645418669bd142b8637443a6516b7eb6548c4 Binary files /dev/null and b/SDT/schema3.0/docs/images/Struct.png differ diff --git a/SDT/schema3.0/docs/images/SubDevice.png b/SDT/schema3.0/docs/images/SubDevice.png new file mode 100644 index 0000000000000000000000000000000000000000..9c8b124295078675a8c2b42d1488d43d079c8f54 Binary files /dev/null and b/SDT/schema3.0/docs/images/SubDevice.png differ diff --git a/SDT/schema3.0/docs/images/TypeChoice.png b/SDT/schema3.0/docs/images/TypeChoice.png new file mode 100644 index 0000000000000000000000000000000000000000..3606b755f4bb18642f60f49f481a572b99a508ab Binary files /dev/null and b/SDT/schema3.0/docs/images/TypeChoice.png differ diff --git a/SDT/schema3.0/etc/XInclude.xsd b/SDT/schema3.0/etc/XInclude.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8fbe0c8ee4a086074cdca852f6a5b656d73bcd05 --- /dev/null +++ b/SDT/schema3.0/etc/XInclude.xsd @@ -0,0 +1,49 @@ +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:xi="http://www.w3.org/2001/XInclude" + targetNamespace="http://www.w3.org/2001/XInclude" + finalDefault="extension"> + <xs:annotation> + <xs:documentation> + Not normative, but may be useful. + See the REC http://www.w3.org/TR/XInclude for definitive + information about this namespace. + </xs:documentation> + </xs:annotation> + + <xs:element name="include" type="xi:includeType" /> + + <xs:complexType name="includeType" mixed="true"> + <xs:choice minOccurs='0' maxOccurs='unbounded' > + <xs:element ref='xi:fallback' /> + <xs:any namespace='##other' processContents='lax' /> + <xs:any namespace='##local' processContents='lax' /> + </xs:choice> + <xs:attribute name="href" use="optional" type="xs:anyURI"/> + <xs:attribute name="parse" use="optional" default="xml" + type="xi:parseType" /> + <xs:attribute name="xpointer" use="optional" type="xs:string"/> + <xs:attribute name="encoding" use="optional" type="xs:string"/> + <xs:attribute name="accept" use="optional" type="xs:string"/> + <xs:attribute name="accept-language" use="optional" type="xs:string"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + + <xs:simpleType name="parseType"> + <xs:restriction base="xs:token"> + <xs:enumeration value="xml"/> + <xs:enumeration value="text"/> + </xs:restriction> + </xs:simpleType> + + <xs:element name="fallback" type="xi:fallbackType" /> + + <xs:complexType name="fallbackType" mixed="true"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="xi:include"/> + <xs:any namespace="##other" processContents="lax"/> + <xs:any namespace="##local" processContents="lax"/> + </xs:choice> + <xs:anyAttribute namespace="##other" processContents="lax" /> + </xs:complexType> + +</xs:schema> diff --git a/SDT/schema3.0/etc/XMLSchema-datatypes.xsd b/SDT/schema3.0/etc/XMLSchema-datatypes.xsd new file mode 100644 index 0000000000000000000000000000000000000000..574949db19c49daca2077543c9c30c73d427068b --- /dev/null +++ b/SDT/schema3.0/etc/XMLSchema-datatypes.xsd @@ -0,0 +1,154 @@ +<?xml version='1.0'?> +<!-- XML Schema schema for XML Schemas: Part 2: Datatypes --> +<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [ +<!ENTITY % s ''> +<!ENTITY % p ''> +]> +<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2001/XMLSchema-datatypes" + version="$Id: XMLSchema-datatypes.xsd,v 1.5 2001/03/16 20:53:32 ht Exp $"> + <annotation> + <documentation>Note this schema is NOT a normative schema - - + It contains types derived from all the builtin simple type definitions + with the same local name but in a distinct namespace, for use + by applications which do no wish to import the full XMLSchema + schema. Since derivation is not symmetric, unexpected results may + follow from mixing references to these definitions with references + to the definitions in the XMLSchema namespace. For example, + although dt:positiveInteger is derived from xs:integer, the converse + does not hold.</documentation> + </annotation> + + <simpleType name="string"> + <restriction base="string"/> + </simpleType> + <simpleType name="boolean"> + <restriction base="boolean"/> + </simpleType> + <simpleType name="float"> + <restriction base="float"/> + </simpleType> + <simpleType name="double"> + <restriction base="double"/> + </simpleType> + <simpleType name="decimal"> + <restriction base="decimal"/> + </simpleType> + <simpleType name="dateTime"> + <restriction base="dateTime"/> + </simpleType> + <simpleType name="duration"> + <restriction base="duration"/> + </simpleType> + <simpleType name="hexBinary"> + <restriction base="hexBinary"/> + </simpleType> + <simpleType name="base64Binary"> + <restriction base="base64Binary"/> + </simpleType> + <simpleType name="anyURI"> + <restriction base="anyURI"/> + </simpleType> + <simpleType name="ID"> + <restriction base="ID"/> + </simpleType> + <simpleType name="IDREF"> + <restriction base="IDREF"/> + </simpleType> + <simpleType name="ENTITY"> + <restriction base="ENTITY"/> + </simpleType> + <simpleType name="NOTATION"> + <restriction base="NOTATION"/> + </simpleType> + <simpleType name="normalizedString"> + <restriction base="normalizedString"/> + </simpleType> + <simpleType name="token"> + <restriction base="token"/> + </simpleType> + <simpleType name="language"> + <restriction base="language"/> + </simpleType> + <simpleType name="IDREFS"> + <restriction base="IDREFS"/> + </simpleType> + <simpleType name="ENTITIES"> + <restriction base="ENTITIES"/> + </simpleType> + <simpleType name="NMTOKEN"> + <restriction base="NMTOKEN"/> + </simpleType> + <simpleType name="NMTOKENS"> + <restriction base="NMTOKENS"/> + </simpleType> + <simpleType name="Name"> + <restriction base="Name"/> + </simpleType> + <simpleType name="QName"> + <restriction base="QName"/> + </simpleType> + <simpleType name="NCName"> + <restriction base="NCName"/> + </simpleType> + <simpleType name="integer"> + <restriction base="integer"/> + </simpleType> + <simpleType name="nonNegativeInteger"> + <restriction base="nonNegativeInteger"/> + </simpleType> + <simpleType name="positiveInteger"> + <restriction base="positiveInteger"/> + </simpleType> + <simpleType name="nonPositiveInteger"> + <restriction base="nonPositiveInteger"/> + </simpleType> + <simpleType name="negativeInteger"> + <restriction base="negativeInteger"/> + </simpleType> + <simpleType name="byte"> + <restriction base="byte"/> + </simpleType> + <simpleType name="int"> + <restriction base="int"/> + </simpleType> + <simpleType name="long"> + <restriction base="long"/> + </simpleType> + <simpleType name="short"> + <restriction base="short"/> + </simpleType> + <simpleType name="unsignedByte"> + <restriction base="unsignedByte"/> + </simpleType> + <simpleType name="unsignedInt"> + <restriction base="unsignedInt"/> + </simpleType> + <simpleType name="unsignedLong"> + <restriction base="unsignedLong"/> + </simpleType> + <simpleType name="unsignedShort"> + <restriction base="unsignedShort"/> + </simpleType> + <simpleType name="date"> + <restriction base="date"/> + </simpleType> + <simpleType name="time"> + <restriction base="time"/> + </simpleType> + <simpleType name="gYearMonth"> + <restriction base="gYearMonth"/> + </simpleType> + <simpleType name="gYear"> + <restriction base="gYear"/> + </simpleType> + <simpleType name="gMonthDay"> + <restriction base="gMonthDay"/> + </simpleType> + <simpleType name="gDay"> + <restriction base="gDay"/> + </simpleType> + <simpleType name="gMonth"> + <restriction base="gMonth"/> + </simpleType> + +</schema> diff --git a/SDT/schema3.0/etc/XMLSchema.dtd b/SDT/schema3.0/etc/XMLSchema.dtd new file mode 100644 index 0000000000000000000000000000000000000000..e8e8f7625a994596f8ade6565b9711398fb502b5 --- /dev/null +++ b/SDT/schema3.0/etc/XMLSchema.dtd @@ -0,0 +1,402 @@ +<!-- DTD for XML Schemas: Part 1: Structures + Public Identifier: "-//W3C//DTD XMLSCHEMA 200102//EN" + Official Location: http://www.w3.org/2001/XMLSchema.dtd --> +<!-- $Id: XMLSchema.dtd,v 1.31 2001/10/24 15:50:16 ht Exp $ --> +<!-- Note this DTD is NOT normative, or even definitive. --> <!--d--> +<!-- prose copy in the structures REC is the definitive version --> <!--d--> +<!-- (which shouldn't differ from this one except for this --> <!--d--> +<!-- comment and entity expansions, but just in case) --> <!--d--> +<!-- With the exception of cases with multiple namespace + prefixes for the XML Schema namespace, any XML document which is + not valid per this DTD given redefinitions in its internal subset of the + 'p' and 's' parameter entities below appropriate to its namespace + declaration of the XML Schema namespace is almost certainly not + a valid schema. --> + +<!-- The simpleType element and its constituent parts + are defined in XML Schema: Part 2: Datatypes --> +<!ENTITY % xs-datatypes PUBLIC 'datatypes' 'datatypes.dtd' > + +<!ENTITY % p 'xs:'> <!-- can be overriden in the internal subset of a + schema document to establish a different + namespace prefix --> +<!ENTITY % s ':xs'> <!-- if %p is defined (e.g. as foo:) then you must + also define %s as the suffix for the appropriate + namespace declaration (e.g. :foo) --> +<!ENTITY % nds 'xmlns%s;'> + +<!-- Define all the element names, with optional prefix --> +<!ENTITY % schema "%p;schema"> +<!ENTITY % complexType "%p;complexType"> +<!ENTITY % complexContent "%p;complexContent"> +<!ENTITY % simpleContent "%p;simpleContent"> +<!ENTITY % extension "%p;extension"> +<!ENTITY % element "%p;element"> +<!ENTITY % unique "%p;unique"> +<!ENTITY % key "%p;key"> +<!ENTITY % keyref "%p;keyref"> +<!ENTITY % selector "%p;selector"> +<!ENTITY % field "%p;field"> +<!ENTITY % group "%p;group"> +<!ENTITY % all "%p;all"> +<!ENTITY % choice "%p;choice"> +<!ENTITY % sequence "%p;sequence"> +<!ENTITY % any "%p;any"> +<!ENTITY % anyAttribute "%p;anyAttribute"> +<!ENTITY % attribute "%p;attribute"> +<!ENTITY % attributeGroup "%p;attributeGroup"> +<!ENTITY % include "%p;include"> +<!ENTITY % import "%p;import"> +<!ENTITY % redefine "%p;redefine"> +<!ENTITY % notation "%p;notation"> + +<!-- annotation elements --> +<!ENTITY % annotation "%p;annotation"> +<!ENTITY % appinfo "%p;appinfo"> +<!ENTITY % documentation "%p;documentation"> + +<!-- Customisation entities for the ATTLIST of each element type. + Define one of these if your schema takes advantage of the + anyAttribute='##other' in the schema for schemas --> + +<!ENTITY % schemaAttrs ''> +<!ENTITY % complexTypeAttrs ''> +<!ENTITY % complexContentAttrs ''> +<!ENTITY % simpleContentAttrs ''> +<!ENTITY % extensionAttrs ''> +<!ENTITY % elementAttrs ''> +<!ENTITY % groupAttrs ''> +<!ENTITY % allAttrs ''> +<!ENTITY % choiceAttrs ''> +<!ENTITY % sequenceAttrs ''> +<!ENTITY % anyAttrs ''> +<!ENTITY % anyAttributeAttrs ''> +<!ENTITY % attributeAttrs ''> +<!ENTITY % attributeGroupAttrs ''> +<!ENTITY % uniqueAttrs ''> +<!ENTITY % keyAttrs ''> +<!ENTITY % keyrefAttrs ''> +<!ENTITY % selectorAttrs ''> +<!ENTITY % fieldAttrs ''> +<!ENTITY % includeAttrs ''> +<!ENTITY % importAttrs ''> +<!ENTITY % redefineAttrs ''> +<!ENTITY % notationAttrs ''> +<!ENTITY % annotationAttrs ''> +<!ENTITY % appinfoAttrs ''> +<!ENTITY % documentationAttrs ''> + +<!ENTITY % complexDerivationSet "CDATA"> + <!-- #all or space-separated list drawn from derivationChoice --> +<!ENTITY % blockSet "CDATA"> + <!-- #all or space-separated list drawn from + derivationChoice + 'substitution' --> + +<!ENTITY % mgs '%all; | %choice; | %sequence;'> +<!ENTITY % cs '%choice; | %sequence;'> +<!ENTITY % formValues '(qualified|unqualified)'> + + +<!ENTITY % attrDecls '((%attribute;| %attributeGroup;)*,(%anyAttribute;)?)'> + +<!ENTITY % particleAndAttrs '((%mgs; | %group;)?, %attrDecls;)'> + +<!-- This is used in part2 --> +<!ENTITY % restriction1 '((%mgs; | %group;)?)'> + +%xs-datatypes; + +<!-- the duplication below is to produce an unambiguous content model + which allows annotation everywhere --> +<!ELEMENT %schema; ((%include; | %import; | %redefine; | %annotation;)*, + ((%simpleType; | %complexType; + | %element; | %attribute; + | %attributeGroup; | %group; + | %notation; ), + (%annotation;)*)* )> +<!ATTLIST %schema; + targetNamespace %URIref; #IMPLIED + version CDATA #IMPLIED + %nds; %URIref; #FIXED 'http://www.w3.org/2001/XMLSchema' + xmlns CDATA #IMPLIED + finalDefault %complexDerivationSet; '' + blockDefault %blockSet; '' + id ID #IMPLIED + elementFormDefault %formValues; 'unqualified' + attributeFormDefault %formValues; 'unqualified' + xml:lang CDATA #IMPLIED + %schemaAttrs;> +<!-- Note the xmlns declaration is NOT in the Schema for Schemas, + because at the Infoset level where schemas operate, + xmlns(:prefix) is NOT an attribute! --> +<!-- The declaration of xmlns is a convenience for schema authors --> + +<!-- The id attribute here and below is for use in external references + from non-schemas using simple fragment identifiers. + It is NOT used for schema-to-schema reference, internal or + external. --> + +<!-- a type is a named content type specification which allows attribute + declarations--> +<!-- --> + +<!ELEMENT %complexType; ((%annotation;)?, + (%simpleContent;|%complexContent;| + %particleAndAttrs;))> + +<!ATTLIST %complexType; + name %NCName; #IMPLIED + id ID #IMPLIED + abstract %boolean; #IMPLIED + final %complexDerivationSet; #IMPLIED + block %complexDerivationSet; #IMPLIED + mixed (true|false) 'false' + %complexTypeAttrs;> + +<!-- particleAndAttrs is shorthand for a root type --> +<!-- mixed is disallowed if simpleContent, overriden if complexContent + has one too. --> + +<!-- If anyAttribute appears in one or more referenced attributeGroups + and/or explicitly, the intersection of the permissions is used --> + +<!ELEMENT %complexContent; ((%annotation;)?, (%restriction;|%extension;))> +<!ATTLIST %complexContent; + mixed (true|false) #IMPLIED + id ID #IMPLIED + %complexContentAttrs;> + +<!-- restriction should use the branch defined above, not the simple + one from part2; extension should use the full model --> + +<!ELEMENT %simpleContent; ((%annotation;)?, (%restriction;|%extension;))> +<!ATTLIST %simpleContent; + id ID #IMPLIED + %simpleContentAttrs;> + +<!-- restriction should use the simple branch from part2, not the + one defined above; extension should have no particle --> + +<!ELEMENT %extension; ((%annotation;)?, (%particleAndAttrs;))> +<!ATTLIST %extension; + base %QName; #REQUIRED + id ID #IMPLIED + %extensionAttrs;> + +<!-- an element is declared by either: + a name and a type (either nested or referenced via the type attribute) + or a ref to an existing element declaration --> + +<!ELEMENT %element; ((%annotation;)?, (%complexType;| %simpleType;)?, + (%unique; | %key; | %keyref;)*)> +<!-- simpleType or complexType only if no type|ref attribute --> +<!-- ref not allowed at top level --> +<!ATTLIST %element; + name %NCName; #IMPLIED + id ID #IMPLIED + ref %QName; #IMPLIED + type %QName; #IMPLIED + minOccurs %nonNegativeInteger; #IMPLIED + maxOccurs CDATA #IMPLIED + nillable %boolean; #IMPLIED + substitutionGroup %QName; #IMPLIED + abstract %boolean; #IMPLIED + final %complexDerivationSet; #IMPLIED + block %blockSet; #IMPLIED + default CDATA #IMPLIED + fixed CDATA #IMPLIED + form %formValues; #IMPLIED + %elementAttrs;> +<!-- type and ref are mutually exclusive. + name and ref are mutually exclusive, one is required --> +<!-- In the absence of type AND ref, type defaults to type of + substitutionGroup, if any, else the ur-type, i.e. unconstrained --> +<!-- default and fixed are mutually exclusive --> + +<!ELEMENT %group; ((%annotation;)?,(%mgs;)?)> +<!ATTLIST %group; + name %NCName; #IMPLIED + ref %QName; #IMPLIED + minOccurs %nonNegativeInteger; #IMPLIED + maxOccurs CDATA #IMPLIED + id ID #IMPLIED + %groupAttrs;> + +<!ELEMENT %all; ((%annotation;)?, (%element;)*)> +<!ATTLIST %all; + minOccurs (1) #IMPLIED + maxOccurs (1) #IMPLIED + id ID #IMPLIED + %allAttrs;> + +<!ELEMENT %choice; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)> +<!ATTLIST %choice; + minOccurs %nonNegativeInteger; #IMPLIED + maxOccurs CDATA #IMPLIED + id ID #IMPLIED + %choiceAttrs;> + +<!ELEMENT %sequence; ((%annotation;)?, (%element;| %group;| %cs; | %any;)*)> +<!ATTLIST %sequence; + minOccurs %nonNegativeInteger; #IMPLIED + maxOccurs CDATA #IMPLIED + id ID #IMPLIED + %sequenceAttrs;> + +<!-- an anonymous grouping in a model, or + a top-level named group definition, or a reference to same --> + +<!-- Note that if order is 'all', group is not allowed inside. + If order is 'all' THIS group must be alone (or referenced alone) at + the top level of a content model --> +<!-- If order is 'all', minOccurs==maxOccurs==1 on element/any inside --> +<!-- Should allow minOccurs=0 inside order='all' . . . --> + +<!ELEMENT %any; (%annotation;)?> +<!ATTLIST %any; + namespace CDATA '##any' + processContents (skip|lax|strict) 'strict' + minOccurs %nonNegativeInteger; '1' + maxOccurs CDATA '1' + id ID #IMPLIED + %anyAttrs;> + +<!-- namespace is interpreted as follows: + ##any - - any non-conflicting WFXML at all + + ##other - - any non-conflicting WFXML from namespace other + than targetNamespace + + ##local - - any unqualified non-conflicting WFXML/attribute + one or - - any non-conflicting WFXML from + more URI the listed namespaces + references + + ##targetNamespace ##local may appear in the above list, + with the obvious meaning --> + +<!ELEMENT %anyAttribute; (%annotation;)?> +<!ATTLIST %anyAttribute; + namespace CDATA '##any' + processContents (skip|lax|strict) 'strict' + id ID #IMPLIED + %anyAttributeAttrs;> +<!-- namespace is interpreted as for 'any' above --> + +<!-- simpleType only if no type|ref attribute --> +<!-- ref not allowed at top level, name iff at top level --> +<!ELEMENT %attribute; ((%annotation;)?, (%simpleType;)?)> +<!ATTLIST %attribute; + name %NCName; #IMPLIED + id ID #IMPLIED + ref %QName; #IMPLIED + type %QName; #IMPLIED + use (prohibited|optional|required) #IMPLIED + default CDATA #IMPLIED + fixed CDATA #IMPLIED + form %formValues; #IMPLIED + %attributeAttrs;> +<!-- type and ref are mutually exclusive. + name and ref are mutually exclusive, one is required --> +<!-- default for use is optional when nested, none otherwise --> +<!-- default and fixed are mutually exclusive --> +<!-- type attr and simpleType content are mutually exclusive --> + +<!-- an attributeGroup is a named collection of attribute decls, or a + reference thereto --> +<!ELEMENT %attributeGroup; ((%annotation;)?, + (%attribute; | %attributeGroup;)*, + (%anyAttribute;)?) > +<!ATTLIST %attributeGroup; + name %NCName; #IMPLIED + id ID #IMPLIED + ref %QName; #IMPLIED + %attributeGroupAttrs;> + +<!-- ref iff no content, no name. ref iff not top level --> + +<!-- better reference mechanisms --> +<!ELEMENT %unique; ((%annotation;)?, %selector;, (%field;)+)> +<!ATTLIST %unique; + name %NCName; #REQUIRED + id ID #IMPLIED + %uniqueAttrs;> + +<!ELEMENT %key; ((%annotation;)?, %selector;, (%field;)+)> +<!ATTLIST %key; + name %NCName; #REQUIRED + id ID #IMPLIED + %keyAttrs;> + +<!ELEMENT %keyref; ((%annotation;)?, %selector;, (%field;)+)> +<!ATTLIST %keyref; + name %NCName; #REQUIRED + refer %QName; #REQUIRED + id ID #IMPLIED + %keyrefAttrs;> + +<!ELEMENT %selector; ((%annotation;)?)> +<!ATTLIST %selector; + xpath %XPathExpr; #REQUIRED + id ID #IMPLIED + %selectorAttrs;> +<!ELEMENT %field; ((%annotation;)?)> +<!ATTLIST %field; + xpath %XPathExpr; #REQUIRED + id ID #IMPLIED + %fieldAttrs;> + +<!-- Schema combination mechanisms --> +<!ELEMENT %include; (%annotation;)?> +<!ATTLIST %include; + schemaLocation %URIref; #REQUIRED + id ID #IMPLIED + %includeAttrs;> + +<!ELEMENT %import; (%annotation;)?> +<!ATTLIST %import; + namespace %URIref; #IMPLIED + schemaLocation %URIref; #IMPLIED + id ID #IMPLIED + %importAttrs;> + +<!ELEMENT %redefine; (%annotation; | %simpleType; | %complexType; | + %attributeGroup; | %group;)*> +<!ATTLIST %redefine; + schemaLocation %URIref; #REQUIRED + id ID #IMPLIED + %redefineAttrs;> + +<!ELEMENT %notation; (%annotation;)?> +<!ATTLIST %notation; + name %NCName; #REQUIRED + id ID #IMPLIED + public CDATA #REQUIRED + system %URIref; #IMPLIED + %notationAttrs;> + +<!-- Annotation is either application information or documentation --> +<!-- By having these here they are available for datatypes as well + as all the structures elements --> + +<!ELEMENT %annotation; (%appinfo; | %documentation;)*> +<!ATTLIST %annotation; %annotationAttrs;> + +<!-- User must define annotation elements in internal subset for this + to work --> +<!ELEMENT %appinfo; ANY> <!-- too restrictive --> +<!ATTLIST %appinfo; + source %URIref; #IMPLIED + id ID #IMPLIED + %appinfoAttrs;> +<!ELEMENT %documentation; ANY> <!-- too restrictive --> +<!ATTLIST %documentation; + source %URIref; #IMPLIED + id ID #IMPLIED + xml:lang CDATA #IMPLIED + %documentationAttrs;> + +<!NOTATION XMLSchemaStructures PUBLIC + 'structures' 'http://www.w3.org/2001/XMLSchema.xsd' > +<!NOTATION XML PUBLIC + 'REC-xml-1998-0210' 'http://www.w3.org/TR/1998/REC-xml-19980210' > diff --git a/SDT/schema3.0/etc/XMLSchema.xsd b/SDT/schema3.0/etc/XMLSchema.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2e9a2729ec5dcf3cba092c68cbe82de0d4527903 --- /dev/null +++ b/SDT/schema3.0/etc/XMLSchema.xsd @@ -0,0 +1,2534 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- XML Schema schema for XML Schemas: Part 1: Structures --> +<!-- Note this schema is NOT the normative structures schema. --> +<!-- The prose copy in the structures REC is the normative --> +<!-- version (which shouldn't differ from this one except for --> +<!-- this comment and entity expansions, but just in case --> +<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [ + +<!-- provide ID type information even for parsers which only read the + internal subset --> +<!ATTLIST xs:schema id ID #IMPLIED> +<!ATTLIST xs:complexType id ID #IMPLIED> +<!ATTLIST xs:complexContent id ID #IMPLIED> +<!ATTLIST xs:simpleContent id ID #IMPLIED> +<!ATTLIST xs:extension id ID #IMPLIED> +<!ATTLIST xs:element id ID #IMPLIED> +<!ATTLIST xs:group id ID #IMPLIED> +<!ATTLIST xs:all id ID #IMPLIED> +<!ATTLIST xs:choice id ID #IMPLIED> +<!ATTLIST xs:sequence id ID #IMPLIED> +<!ATTLIST xs:any id ID #IMPLIED> +<!ATTLIST xs:anyAttribute id ID #IMPLIED> +<!ATTLIST xs:attribute id ID #IMPLIED> +<!ATTLIST xs:attributeGroup id ID #IMPLIED> +<!ATTLIST xs:unique id ID #IMPLIED> +<!ATTLIST xs:key id ID #IMPLIED> +<!ATTLIST xs:keyref id ID #IMPLIED> +<!ATTLIST xs:selector id ID #IMPLIED> +<!ATTLIST xs:field id ID #IMPLIED> +<!ATTLIST xs:include id ID #IMPLIED> +<!ATTLIST xs:import id ID #IMPLIED> +<!ATTLIST xs:redefine id ID #IMPLIED> +<!ATTLIST xs:notation id ID #IMPLIED> +<!-- + keep this schema XML1.0 DTD valid + --> + <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'> + + <!ELEMENT hfp:hasFacet EMPTY> + <!ATTLIST hfp:hasFacet + name NMTOKEN #REQUIRED> + + <!ELEMENT hfp:hasProperty EMPTY> + <!ATTLIST hfp:hasProperty + name NMTOKEN #REQUIRED + value CDATA #REQUIRED> +<!-- + Make sure that processors that do not read the external + subset will know about the various IDs we declare + --> + <!ATTLIST xs:simpleType id ID #IMPLIED> + <!ATTLIST xs:maxExclusive id ID #IMPLIED> + <!ATTLIST xs:minExclusive id ID #IMPLIED> + <!ATTLIST xs:maxInclusive id ID #IMPLIED> + <!ATTLIST xs:minInclusive id ID #IMPLIED> + <!ATTLIST xs:totalDigits id ID #IMPLIED> + <!ATTLIST xs:fractionDigits id ID #IMPLIED> + <!ATTLIST xs:length id ID #IMPLIED> + <!ATTLIST xs:minLength id ID #IMPLIED> + <!ATTLIST xs:maxLength id ID #IMPLIED> + <!ATTLIST xs:enumeration id ID #IMPLIED> + <!ATTLIST xs:pattern id ID #IMPLIED> + <!ATTLIST xs:appinfo id ID #IMPLIED> + <!ATTLIST xs:documentation id ID #IMPLIED> + <!ATTLIST xs:list id ID #IMPLIED> + <!ATTLIST xs:union id ID #IMPLIED> + ]> +<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty"> + <xs:annotation> + <xs:documentation> + Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp + Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html"> + The schema corresponding to this document is normative, + with respect to the syntactic constraints it expresses in the + XML Schema language. The documentation (within <documentation> elements) + below, is not normative, but rather highlights important aspects of + the W3C Recommendation of which this is a part</xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + The simpleType element and all of its members are defined + towards the end of this schema document</xs:documentation> + </xs:annotation> + + <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"> + <xs:annotation> + <xs:documentation> + Get access to the xml: attribute groups for xml:lang + as declared on 'schema' and 'documentation' below + </xs:documentation> + </xs:annotation> + </xs:import> + + <xs:complexType name="openAttrs"> + <xs:annotation> + <xs:documentation> + This type is extended by almost all schema types + to allow attributes from other namespaces to be + added to user schemas. + </xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:restriction base="xs:anyType"> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="annotated"> + <xs:annotation> + <xs:documentation> + This type is extended by all types which allow annotation + other than <schema> itself + </xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:extension base="xs:openAttrs"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="id" type="xs:ID"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:group name="schemaTop"> + <xs:annotation> + <xs:documentation> + This group is for the + elements which occur freely at the top level of schemas. + All of their types are based on the "annotated" type by extension.</xs:documentation> + </xs:annotation> + <xs:choice> + <xs:group ref="xs:redefinable"/> + <xs:element ref="xs:element"/> + <xs:element ref="xs:attribute"/> + <xs:element ref="xs:notation"/> + </xs:choice> + </xs:group> + + <xs:group name="redefinable"> + <xs:annotation> + <xs:documentation> + This group is for the + elements which can self-redefine (see <redefine> below).</xs:documentation> + </xs:annotation> + <xs:choice> + <xs:element ref="xs:simpleType"/> + <xs:element ref="xs:complexType"/> + <xs:element ref="xs:group"/> + <xs:element ref="xs:attributeGroup"/> + </xs:choice> + </xs:group> + + <xs:simpleType name="formChoice"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="qualified"/> + <xs:enumeration value="unqualified"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="reducedDerivationControl"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:derivationControl"> + <xs:enumeration value="extension"/> + <xs:enumeration value="restriction"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="derivationSet"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + <xs:documentation> + #all or (possibly empty) subset of {extension, restriction}</xs:documentation> + </xs:annotation> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="#all"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType> + <xs:list itemType="xs:reducedDerivationControl"/> + </xs:simpleType> + </xs:union> + </xs:simpleType> + + <xs:simpleType name="typeDerivationControl"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:derivationControl"> + <xs:enumeration value="extension"/> + <xs:enumeration value="restriction"/> + <xs:enumeration value="list"/> + <xs:enumeration value="union"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="fullDerivationSet"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + <xs:documentation> + #all or (possibly empty) subset of {extension, restriction, list, union}</xs:documentation> + </xs:annotation> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="#all"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType> + <xs:list itemType="xs:typeDerivationControl"/> + </xs:simpleType> + </xs:union> + </xs:simpleType> + + <xs:element name="schema" id="schema"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:openAttrs"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="xs:include"/> + <xs:element ref="xs:import"/> + <xs:element ref="xs:redefine"/> + <xs:element ref="xs:annotation"/> + </xs:choice> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="xs:schemaTop"/> + <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:sequence> + <xs:attribute name="targetNamespace" type="xs:anyURI"/> + <xs:attribute name="version" type="xs:token"/> + <xs:attribute name="finalDefault" type="xs:fullDerivationSet" use="optional" default=""/> + <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/> + <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/> + <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/> + <xs:attribute name="id" type="xs:ID"/> + <xs:attribute ref="xml:lang"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:key name="element"> + <xs:selector xpath="xs:element"/> + <xs:field xpath="@name"/> + </xs:key> + + <xs:key name="attribute"> + <xs:selector xpath="xs:attribute"/> + <xs:field xpath="@name"/> + </xs:key> + + <xs:key name="type"> + <xs:selector xpath="xs:complexType|xs:simpleType"/> + <xs:field xpath="@name"/> + </xs:key> + + <xs:key name="group"> + <xs:selector xpath="xs:group"/> + <xs:field xpath="@name"/> + </xs:key> + + <xs:key name="attributeGroup"> + <xs:selector xpath="xs:attributeGroup"/> + <xs:field xpath="@name"/> + </xs:key> + + <xs:key name="notation"> + <xs:selector xpath="xs:notation"/> + <xs:field xpath="@name"/> + </xs:key> + + <xs:key name="identityConstraint"> + <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/> + <xs:field xpath="@name"/> + </xs:key> + + </xs:element> + + <xs:simpleType name="allNNI"> + <xs:annotation><xs:documentation> + for maxOccurs</xs:documentation></xs:annotation> + <xs:union memberTypes="xs:nonNegativeInteger"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="unbounded"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + + <xs:attributeGroup name="occurs"> + <xs:annotation><xs:documentation> + for all particles</xs:documentation></xs:annotation> + <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/> + <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/> + </xs:attributeGroup> + + <xs:attributeGroup name="defRef"> + <xs:annotation><xs:documentation> + for element, group and attributeGroup, + which both define and reference</xs:documentation></xs:annotation> + <xs:attribute name="name" type="xs:NCName"/> + <xs:attribute name="ref" type="xs:QName"/> + </xs:attributeGroup> + + <xs:group name="typeDefParticle"> + <xs:annotation> + <xs:documentation> + 'complexType' uses this</xs:documentation></xs:annotation> + <xs:choice> + <xs:element name="group" type="xs:groupRef"/> + <xs:element ref="xs:all"/> + <xs:element ref="xs:choice"/> + <xs:element ref="xs:sequence"/> + </xs:choice> + </xs:group> + + + + <xs:group name="nestedParticle"> + <xs:choice> + <xs:element name="element" type="xs:localElement"/> + <xs:element name="group" type="xs:groupRef"/> + <xs:element ref="xs:choice"/> + <xs:element ref="xs:sequence"/> + <xs:element ref="xs:any"/> + </xs:choice> + </xs:group> + + <xs:group name="particle"> + <xs:choice> + <xs:element name="element" type="xs:localElement"/> + <xs:element name="group" type="xs:groupRef"/> + <xs:element ref="xs:all"/> + <xs:element ref="xs:choice"/> + <xs:element ref="xs:sequence"/> + <xs:element ref="xs:any"/> + </xs:choice> + </xs:group> + + <xs:complexType name="attribute"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:sequence> + <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/> + </xs:sequence> + <xs:attributeGroup ref="xs:defRef"/> + <xs:attribute name="type" type="xs:QName"/> + <xs:attribute name="use" use="optional" default="optional"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="prohibited"/> + <xs:enumeration value="optional"/> + <xs:enumeration value="required"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="default" type="xs:string"/> + <xs:attribute name="fixed" type="xs:string"/> + <xs:attribute name="form" type="xs:formChoice"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="topLevelAttribute"> + <xs:complexContent> + <xs:restriction base="xs:attribute"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/> + </xs:sequence> + <xs:attribute name="ref" use="prohibited"/> + <xs:attribute name="form" use="prohibited"/> + <xs:attribute name="use" use="prohibited"/> + <xs:attribute name="name" use="required" type="xs:NCName"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:group name="attrDecls"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element name="attribute" type="xs:attribute"/> + <xs:element name="attributeGroup" type="xs:attributeGroupRef"/> + </xs:choice> + <xs:element ref="xs:anyAttribute" minOccurs="0"/> + </xs:sequence> + </xs:group> + + <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/> + </xs:annotation> + </xs:element> + + <xs:group name="complexTypeModel"> + <xs:choice> + <xs:element ref="xs:simpleContent"/> + <xs:element ref="xs:complexContent"/> + <xs:sequence> + <xs:annotation> + <xs:documentation> + This branch is short for + <complexContent> + <restriction base="xs:anyType"> + ... + </restriction> + </complexContent></xs:documentation> + </xs:annotation> + <xs:group ref="xs:typeDefParticle" minOccurs="0"/> + <xs:group ref="xs:attrDecls"/> + </xs:sequence> + </xs:choice> + </xs:group> + + <xs:complexType name="complexType" abstract="true"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:group ref="xs:complexTypeModel"/> + <xs:attribute name="name" type="xs:NCName"> + <xs:annotation> + <xs:documentation> + Will be restricted to required or forbidden</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false"> + <xs:annotation> + <xs:documentation> + Not allowed if simpleContent child is chosen. + May be overriden by setting on complexContent child.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/> + <xs:attribute name="final" type="xs:derivationSet"/> + <xs:attribute name="block" type="xs:derivationSet"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="topLevelComplexType"> + <xs:complexContent> + <xs:restriction base="xs:complexType"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:complexTypeModel"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="localComplexType"> + <xs:complexContent> + <xs:restriction base="xs:complexType"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:complexTypeModel"/> + </xs:sequence> + <xs:attribute name="name" use="prohibited"/> + <xs:attribute name="abstract" use="prohibited"/> + <xs:attribute name="final" use="prohibited"/> + <xs:attribute name="block" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="restrictionType"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:sequence> + <xs:choice minOccurs="0"> + <xs:group ref="xs:typeDefParticle"/> + <xs:group ref="xs:simpleRestrictionModel"/> + </xs:choice> + <xs:group ref="xs:attrDecls"/> + </xs:sequence> + <xs:attribute name="base" type="xs:QName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="complexRestrictionType"> + <xs:complexContent> + <xs:restriction base="xs:restrictionType"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="0"> + <xs:annotation> + <xs:documentation>This choice is added simply to + make this a valid restriction per the REC</xs:documentation> + </xs:annotation> + <xs:group ref="xs:typeDefParticle"/> + </xs:choice> + <xs:group ref="xs:attrDecls"/> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="extensionType"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:sequence> + <xs:group ref="xs:typeDefParticle" minOccurs="0"/> + <xs:group ref="xs:attrDecls"/> + </xs:sequence> + <xs:attribute name="base" type="xs:QName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:element name="complexContent" id="complexContent"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:choice> + <xs:element name="restriction" type="xs:complexRestrictionType"/> + <xs:element name="extension" type="xs:extensionType"/> + </xs:choice> + <xs:attribute name="mixed" type="xs:boolean"> + <xs:annotation> + <xs:documentation> + Overrides any setting on complexType parent.</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:complexType name="simpleRestrictionType"> + <xs:complexContent> + <xs:restriction base="xs:restrictionType"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="0"> + <xs:annotation> + <xs:documentation>This choice is added simply to + make this a valid restriction per the REC</xs:documentation> + </xs:annotation> + <xs:group ref="xs:simpleRestrictionModel"/> + </xs:choice> + <xs:group ref="xs:attrDecls"/> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="simpleExtensionType"> + <xs:complexContent> + <xs:restriction base="xs:extensionType"> + <xs:sequence> + <xs:annotation> + <xs:documentation> + No typeDefParticle group reference</xs:documentation> + </xs:annotation> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:attrDecls"/> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:element name="simpleContent" id="simpleContent"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:choice> + <xs:element name="restriction" type="xs:simpleRestrictionType"/> + <xs:element name="extension" type="xs:simpleExtensionType"/> + </xs:choice> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/> + </xs:annotation> + </xs:element> + + + <xs:simpleType name="blockSet"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + <xs:documentation> + #all or (possibly empty) subset of {substitution, extension, + restriction}</xs:documentation> + </xs:annotation> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="#all"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType> + <xs:list> + <xs:simpleType> + <xs:restriction base="xs:derivationControl"> + <xs:enumeration value="extension"/> + <xs:enumeration value="restriction"/> + <xs:enumeration value="substitution"/> + </xs:restriction> + </xs:simpleType> + </xs:list> + </xs:simpleType> + </xs:union> + </xs:simpleType> + + <xs:complexType name="element" abstract="true"> + <xs:annotation> + <xs:documentation> + The element element can be used either + at the top level to define an element-type binding globally, + or within a content model to either reference a globally-defined + element or type or declare an element-type binding locally. + The ref form is not allowed at the top level.</xs:documentation> + </xs:annotation> + + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:sequence> + <xs:choice minOccurs="0"> + <xs:element name="simpleType" type="xs:localSimpleType"/> + <xs:element name="complexType" type="xs:localComplexType"/> + </xs:choice> + <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attributeGroup ref="xs:defRef"/> + <xs:attribute name="type" type="xs:QName"/> + <xs:attribute name="substitutionGroup" type="xs:QName"/> + <xs:attributeGroup ref="xs:occurs"/> + <xs:attribute name="default" type="xs:string"/> + <xs:attribute name="fixed" type="xs:string"/> + <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/> + <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/> + <xs:attribute name="final" type="xs:derivationSet"/> + <xs:attribute name="block" type="xs:blockSet"/> + <xs:attribute name="form" type="xs:formChoice"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="topLevelElement"> + <xs:complexContent> + <xs:restriction base="xs:element"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="0"> + <xs:element name="simpleType" type="xs:localSimpleType"/> + <xs:element name="complexType" type="xs:localComplexType"/> + </xs:choice> + <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="ref" use="prohibited"/> + <xs:attribute name="form" use="prohibited"/> + <xs:attribute name="minOccurs" use="prohibited"/> + <xs:attribute name="maxOccurs" use="prohibited"/> + <xs:attribute name="name" use="required" type="xs:NCName"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="localElement"> + <xs:complexContent> + <xs:restriction base="xs:element"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="0"> + <xs:element name="simpleType" type="xs:localSimpleType"/> + <xs:element name="complexType" type="xs:localComplexType"/> + </xs:choice> + <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="substitutionGroup" use="prohibited"/> + <xs:attribute name="final" use="prohibited"/> + <xs:attribute name="abstract" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:element name="element" type="xs:topLevelElement" id="element"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/> + </xs:annotation> + </xs:element> + + <xs:complexType name="group" abstract="true"> + <xs:annotation> + <xs:documentation> + group type for explicit groups, named top-level groups and + group references</xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/> + <xs:attributeGroup ref="xs:defRef"/> + <xs:attributeGroup ref="xs:occurs"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="realGroup"> + <xs:complexContent> + <xs:restriction base="xs:group"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="0" maxOccurs="1"> + <xs:element ref="xs:all"/> + <xs:element ref="xs:choice"/> + <xs:element ref="xs:sequence"/> + </xs:choice> + </xs:sequence> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="namedGroup"> + <xs:complexContent> + <xs:restriction base="xs:realGroup"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="1" maxOccurs="1"> + <xs:element name="all"> + <xs:complexType> + <xs:complexContent> + <xs:restriction base="xs:all"> + <xs:group ref="xs:allModel"/> + <xs:attribute name="minOccurs" use="prohibited"/> + <xs:attribute name="maxOccurs" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + </xs:element> + <xs:element name="choice" type="xs:simpleExplicitGroup"/> + <xs:element name="sequence" type="xs:simpleExplicitGroup"/> + </xs:choice> + </xs:sequence> + <xs:attribute name="name" use="required" type="xs:NCName"/> + <xs:attribute name="ref" use="prohibited"/> + <xs:attribute name="minOccurs" use="prohibited"/> + <xs:attribute name="maxOccurs" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="groupRef"> + <xs:complexContent> + <xs:restriction base="xs:realGroup"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="ref" use="required" type="xs:QName"/> + <xs:attribute name="name" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="explicitGroup"> + <xs:annotation> + <xs:documentation> + group type for the three kinds of group</xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:restriction base="xs:group"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="prohibited"/> + <xs:attribute name="ref" type="xs:QName" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="simpleExplicitGroup"> + <xs:complexContent> + <xs:restriction base="xs:explicitGroup"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="minOccurs" use="prohibited"/> + <xs:attribute name="maxOccurs" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:group name="allModel"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:annotation> + <xs:documentation>This choice with min/max is here to + avoid a pblm with the Elt:All/Choice/Seq + Particle derivation constraint</xs:documentation> + </xs:annotation> + <xs:element name="element" type="xs:narrowMaxMin"/> + </xs:choice> + </xs:sequence> + </xs:group> + + + <xs:complexType name="narrowMaxMin"> + <xs:annotation> + <xs:documentation>restricted max/min</xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:restriction base="xs:localElement"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:choice minOccurs="0"> + <xs:element name="simpleType" type="xs:localSimpleType"/> + <xs:element name="complexType" type="xs:localComplexType"/> + </xs:choice> + <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="minOccurs" use="optional" default="1"> + <xs:simpleType> + <xs:restriction base="xs:nonNegativeInteger"> + <xs:enumeration value="0"/> + <xs:enumeration value="1"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="maxOccurs" use="optional" default="1"> + <xs:simpleType> + <xs:restriction base="xs:allNNI"> + <xs:enumeration value="0"/> + <xs:enumeration value="1"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="all"> + <xs:annotation> + <xs:documentation> + Only elements allowed inside</xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:restriction base="xs:explicitGroup"> + <xs:group ref="xs:allModel"/> + <xs:attribute name="minOccurs" use="optional" default="1"> + <xs:simpleType> + <xs:restriction base="xs:nonNegativeInteger"> + <xs:enumeration value="0"/> + <xs:enumeration value="1"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="maxOccurs" use="optional" default="1"> + <xs:simpleType> + <xs:restriction base="xs:allNNI"> + <xs:enumeration value="1"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:element name="all" id="all" type="xs:all"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/> + </xs:annotation> + </xs:element> + + <xs:element name="choice" type="xs:explicitGroup" id="choice"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/> + </xs:annotation> + </xs:element> + + <xs:element name="sequence" type="xs:explicitGroup" id="sequence"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/> + </xs:annotation> + </xs:element> + + <xs:element name="group" type="xs:namedGroup" id="group"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/> + </xs:annotation> + </xs:element> + + <xs:complexType name="wildcard"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/> + <xs:attribute name="processContents" use="optional" default="strict"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="skip"/> + <xs:enumeration value="lax"/> + <xs:enumeration value="strict"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:element name="any" id="any"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:wildcard"> + <xs:attributeGroup ref="xs:occurs"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:annotation> + <xs:documentation> + simple type for the value of the 'namespace' attr of + 'any' and 'anyAttribute'</xs:documentation> + </xs:annotation> + <xs:annotation> + <xs:documentation> + Value is + ##any - - any non-conflicting WFXML/attribute at all + + ##other - - any non-conflicting WFXML/attribute from + namespace other than targetNS + + ##local - - any unqualified non-conflicting WFXML/attribute + + one or - - any non-conflicting WFXML/attribute from + more URI the listed namespaces + references + (space separated) + + ##targetNamespace or ##local may appear in the above list, to + refer to the targetNamespace of the enclosing + schema or an absent targetNamespace respectively</xs:documentation> + </xs:annotation> + + <xs:simpleType name="namespaceList"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="##any"/> + <xs:enumeration value="##other"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType> + <xs:list> + <xs:simpleType> + <xs:union memberTypes="xs:anyURI"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="##targetNamespace"/> + <xs:enumeration value="##local"/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + </xs:list> + </xs:simpleType> + </xs:union> + </xs:simpleType> + + <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/> + </xs:annotation> + </xs:element> + + <xs:complexType name="attributeGroup" abstract="true"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:group ref="xs:attrDecls"/> + <xs:attributeGroup ref="xs:defRef"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="namedAttributeGroup"> + <xs:complexContent> + <xs:restriction base="xs:attributeGroup"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:attrDecls"/> + </xs:sequence> + <xs:attribute name="name" use="required" type="xs:NCName"/> + <xs:attribute name="ref" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="attributeGroupRef"> + <xs:complexContent> + <xs:restriction base="xs:attributeGroup"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="ref" use="required" type="xs:QName"/> + <xs:attribute name="name" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/> + </xs:annotation> + </xs:element> + + <xs:element name="include" id="include"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="redefine" id="redefine"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:openAttrs"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="xs:annotation"/> + <xs:group ref="xs:redefinable"/> + </xs:choice> + <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/> + <xs:attribute name="id" type="xs:ID"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="import" id="import"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:attribute name="namespace" type="xs:anyURI"/> + <xs:attribute name="schemaLocation" type="xs:anyURI"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="selector" id="selector"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:attribute name="xpath" use="required"> + <xs:simpleType> + <xs:annotation> + <xs:documentation>A subset of XPath expressions for use +in selectors</xs:documentation> + <xs:documentation>A utility type, not for public +use</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:token"> + <xs:annotation> + <xs:documentation>The following pattern is intended to allow XPath + expressions per the following EBNF: + Selector ::= Path ( '|' Path )* + Path ::= ('.//')? Step ( '/' Step )* + Step ::= '.' | NameTest + NameTest ::= QName | '*' | NCName ':' '*' + child:: is also allowed + </xs:documentation> + </xs:annotation> + <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*"> + </xs:pattern> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="field" id="field"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:attribute name="xpath" use="required"> + <xs:simpleType> + <xs:annotation> + <xs:documentation>A subset of XPath expressions for use +in fields</xs:documentation> + <xs:documentation>A utility type, not for public +use</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:token"> + <xs:annotation> + <xs:documentation>The following pattern is intended to allow XPath + expressions per the same EBNF as for selector, + with the following change: + Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest ) + </xs:documentation> + </xs:annotation> + <xs:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*"> + </xs:pattern> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:complexType name="keybase"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:sequence> + <xs:element ref="xs:selector"/> + <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="name" type="xs:NCName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:group name="identityConstraint"> + <xs:annotation> + <xs:documentation>The three kinds of identity constraints, all with + type of or derived from 'keybase'. + </xs:documentation> + </xs:annotation> + <xs:choice> + <xs:element ref="xs:unique"/> + <xs:element ref="xs:key"/> + <xs:element ref="xs:keyref"/> + </xs:choice> + </xs:group> + + <xs:element name="unique" type="xs:keybase" id="unique"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/> + </xs:annotation> + </xs:element> + <xs:element name="key" type="xs:keybase" id="key"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/> + </xs:annotation> + </xs:element> + <xs:element name="keyref" id="keyref"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:keybase"> + <xs:attribute name="refer" type="xs:QName" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="notation" id="notation"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:attribute name="name" type="xs:NCName" use="required"/> + <xs:attribute name="public" type="xs:public"/> + <xs:attribute name="system" type="xs:anyURI"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:simpleType name="public"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + <xs:documentation> + A public identifier, per ISO 8879</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:token"/> + </xs:simpleType> + + <xs:element name="appinfo" id="appinfo"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/> + </xs:annotation> + <xs:complexType mixed="true"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:any processContents="lax"/> + </xs:sequence> + <xs:attribute name="source" type="xs:anyURI"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="documentation" id="documentation"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/> + </xs:annotation> + <xs:complexType mixed="true"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:any processContents="lax"/> + </xs:sequence> + <xs:attribute name="source" type="xs:anyURI"/> + <xs:attribute ref="xml:lang"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:complexType> + </xs:element> + + <xs:element name="annotation" id="annotation"> + <xs:annotation> + <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="xs:openAttrs"> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="xs:appinfo"/> + <xs:element ref="xs:documentation"/> + </xs:choice> + <xs:attribute name="id" type="xs:ID"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:annotation> + <xs:documentation> + notations for use within XML Schema schemas</xs:documentation> + </xs:annotation> + + <xs:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/> + <xs:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/> + + <xs:complexType name="anyType" mixed="true"> + <xs:annotation> + <xs:documentation> + Not the real urType, but as close an approximation as we can + get in the XML representation</xs:documentation> + </xs:annotation> + <xs:sequence> + <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/> + </xs:sequence> + <xs:anyAttribute processContents="lax"/> + </xs:complexType> + + <xs:annotation> + <xs:documentation> + First the built-in primitive datatypes. These definitions are for + information only, the real built-in definitions are magic. + </xs:documentation> + + <xs:documentation> + For each built-in datatype in this schema (both primitive and + derived) can be uniquely addressed via a URI constructed + as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype + + For example, to address the int datatype, the URI is: + + http://www.w3.org/2001/XMLSchema#int + + Additionally, each facet definition element can be uniquely + addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the facet + + For example, to address the maxInclusive facet, the URI is: + + http://www.w3.org/2001/XMLSchema#maxInclusive + + Additionally, each facet usage in a built-in datatype definition + can be uniquely addressed via a URI constructed as follows: + 1) the base URI is the URI of the XML Schema namespace + 2) the fragment identifier is the name of the datatype, followed + by a period (".") followed by the name of the facet + + For example, to address the usage of the maxInclusive facet in + the definition of int, the URI is: + + http://www.w3.org/2001/XMLSchema#int.maxInclusive + + </xs:documentation> + </xs:annotation> + + <xs:simpleType name="string" id="string"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#string"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="preserve" id="string.preserve"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="boolean" id="boolean"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#boolean"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="boolean.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="float" id="float"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#float"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="float.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="double" id="double"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#double"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="double.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="decimal" id="decimal"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="totalDigits"/> + <hfp:hasFacet name="fractionDigits"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="total"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="true"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#decimal"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="decimal.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="duration" id="duration"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#duration"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="duration.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="dateTime" id="dateTime"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#dateTime"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="dateTime.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="time" id="time"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#time"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="time.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="date" id="date"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#date"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="date.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="gYearMonth" id="gYearMonth"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="gYearMonth.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="gYear" id="gYear"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#gYear"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="gYear.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="gMonthDay" id="gMonthDay"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="gMonthDay.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="gDay" id="gDay"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#gDay"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="gDay.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="gMonth" id="gMonth"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="maxInclusive"/> + <hfp:hasFacet name="maxExclusive"/> + <hfp:hasFacet name="minInclusive"/> + <hfp:hasFacet name="minExclusive"/> + <hfp:hasProperty name="ordered" value="partial"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#gMonth"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="gMonth.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="hexBinary" id="hexBinary"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#binary"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="hexBinary.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="base64Binary" id="base64Binary"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="base64Binary.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="anyURI" id="anyURI"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#anyURI"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="anyURI.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="QName" id="QName"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#QName"/> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="QName.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="NOTATION" id="NOTATION"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/> + <xs:documentation> + NOTATION cannot be used directly in a schema; rather a type + must be derived from it by specifying at least one enumeration + facet whose value is the name of a NOTATION declared in the + schema. + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:anySimpleType"> + <xs:whiteSpace value="collapse" fixed="true" + id="NOTATION.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:annotation> + <xs:documentation> + Now the derived primitive types + </xs:documentation> + </xs:annotation> + + <xs:simpleType name="normalizedString" id="normalizedString"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/> + </xs:annotation> + <xs:restriction base="xs:string"> + <xs:whiteSpace value="replace" + id="normalizedString.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="token" id="token"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#token"/> + </xs:annotation> + <xs:restriction base="xs:normalizedString"> + <xs:whiteSpace value="collapse" id="token.whiteSpace"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="language" id="language"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#language"/> + </xs:annotation> + <xs:restriction base="xs:token"> + <xs:pattern + value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" + id="language.pattern"> + <xs:annotation> + <xs:documentation + source="http://www.ietf.org/rfc/rfc3066.txt"> + pattern specifies the content of section 2.12 of XML 1.0e2 + and RFC 3066 (Revised version of RFC 1766). + </xs:documentation> + </xs:annotation> + </xs:pattern> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="IDREFS" id="IDREFS"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/> + </xs:annotation> + <xs:restriction> + <xs:simpleType> + <xs:list itemType="xs:IDREF"/> + </xs:simpleType> + <xs:minLength value="1" id="IDREFS.minLength"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="ENTITIES" id="ENTITIES"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/> + </xs:annotation> + <xs:restriction> + <xs:simpleType> + <xs:list itemType="xs:ENTITY"/> + </xs:simpleType> + <xs:minLength value="1" id="ENTITIES.minLength"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="NMTOKEN" id="NMTOKEN"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/> + </xs:annotation> + <xs:restriction base="xs:token"> + <xs:pattern value="\c+" id="NMTOKEN.pattern"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/REC-xml#NT-Nmtoken"> + pattern matches production 7 from the XML spec + </xs:documentation> + </xs:annotation> + </xs:pattern> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="NMTOKENS" id="NMTOKENS"> + <xs:annotation> + <xs:appinfo> + <hfp:hasFacet name="length"/> + <hfp:hasFacet name="minLength"/> + <hfp:hasFacet name="maxLength"/> + <hfp:hasFacet name="enumeration"/> + <hfp:hasFacet name="whiteSpace"/> + <hfp:hasFacet name="pattern"/> + <hfp:hasProperty name="ordered" value="false"/> + <hfp:hasProperty name="bounded" value="false"/> + <hfp:hasProperty name="cardinality" + value="countably infinite"/> + <hfp:hasProperty name="numeric" value="false"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/> + </xs:annotation> + <xs:restriction> + <xs:simpleType> + <xs:list itemType="xs:NMTOKEN"/> + </xs:simpleType> + <xs:minLength value="1" id="NMTOKENS.minLength"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="Name" id="Name"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#Name"/> + </xs:annotation> + <xs:restriction base="xs:token"> + <xs:pattern value="\i\c*" id="Name.pattern"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/REC-xml#NT-Name"> + pattern matches production 5 from the XML spec + </xs:documentation> + </xs:annotation> + </xs:pattern> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="NCName" id="NCName"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#NCName"/> + </xs:annotation> + <xs:restriction base="xs:Name"> + <xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/REC-xml-names/#NT-NCName"> + pattern matches production 4 from the Namespaces in XML spec + </xs:documentation> + </xs:annotation> + </xs:pattern> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="ID" id="ID"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#ID"/> + </xs:annotation> + <xs:restriction base="xs:NCName"/> + </xs:simpleType> + + <xs:simpleType name="IDREF" id="IDREF"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#IDREF"/> + </xs:annotation> + <xs:restriction base="xs:NCName"/> + </xs:simpleType> + + <xs:simpleType name="ENTITY" id="ENTITY"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/> + </xs:annotation> + <xs:restriction base="xs:NCName"/> + </xs:simpleType> + + <xs:simpleType name="integer" id="integer"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#integer"/> + </xs:annotation> + <xs:restriction base="xs:decimal"> + <xs:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/> + <xs:pattern value="[\-+]?[0-9]+"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/> + </xs:annotation> + <xs:restriction base="xs:integer"> + <xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="negativeInteger" id="negativeInteger"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/> + </xs:annotation> + <xs:restriction base="xs:nonPositiveInteger"> + <xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="long" id="long"> + <xs:annotation> + <xs:appinfo> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#long"/> + </xs:annotation> + <xs:restriction base="xs:integer"> + <xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/> + <xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="int" id="int"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#int"/> + </xs:annotation> + <xs:restriction base="xs:long"> + <xs:minInclusive value="-2147483648" id="int.minInclusive"/> + <xs:maxInclusive value="2147483647" id="int.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="short" id="short"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#short"/> + </xs:annotation> + <xs:restriction base="xs:int"> + <xs:minInclusive value="-32768" id="short.minInclusive"/> + <xs:maxInclusive value="32767" id="short.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="byte" id="byte"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#byte"/> + </xs:annotation> + <xs:restriction base="xs:short"> + <xs:minInclusive value="-128" id="byte.minInclusive"/> + <xs:maxInclusive value="127" id="byte.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/> + </xs:annotation> + <xs:restriction base="xs:integer"> + <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="unsignedLong" id="unsignedLong"> + <xs:annotation> + <xs:appinfo> + <hfp:hasProperty name="bounded" value="true"/> + <hfp:hasProperty name="cardinality" value="finite"/> + </xs:appinfo> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/> + </xs:annotation> + <xs:restriction base="xs:nonNegativeInteger"> + <xs:maxInclusive value="18446744073709551615" + id="unsignedLong.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="unsignedInt" id="unsignedInt"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/> + </xs:annotation> + <xs:restriction base="xs:unsignedLong"> + <xs:maxInclusive value="4294967295" + id="unsignedInt.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="unsignedShort" id="unsignedShort"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/> + </xs:annotation> + <xs:restriction base="xs:unsignedInt"> + <xs:maxInclusive value="65535" + id="unsignedShort.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="unsignedByte" id="unsignedByte"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/> + </xs:annotation> + <xs:restriction base="xs:unsignedShort"> + <xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="positiveInteger" id="positiveInteger"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/> + </xs:annotation> + <xs:restriction base="xs:nonNegativeInteger"> + <xs:minInclusive value="1" id="positiveInteger.minInclusive"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="derivationControl"> + <xs:annotation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="substitution"/> + <xs:enumeration value="extension"/> + <xs:enumeration value="restriction"/> + <xs:enumeration value="list"/> + <xs:enumeration value="union"/> + </xs:restriction> + </xs:simpleType> + + <xs:group name="simpleDerivation"> + <xs:choice> + <xs:element ref="xs:restriction"/> + <xs:element ref="xs:list"/> + <xs:element ref="xs:union"/> + </xs:choice> + </xs:group> + + <xs:simpleType name="simpleDerivationSet"> + <xs:annotation> + <xs:documentation> + #all or (possibly empty) subset of {restriction, union, list} + </xs:documentation> + <xs:documentation> + A utility type, not for public use</xs:documentation> + </xs:annotation> + <xs:union> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="#all"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType> + <xs:list> + <xs:simpleType> + <xs:restriction base="xs:derivationControl"> + <xs:enumeration value="list"/> + <xs:enumeration value="union"/> + <xs:enumeration value="restriction"/> + </xs:restriction> + </xs:simpleType> + </xs:list> + </xs:simpleType> + </xs:union> + </xs:simpleType> + + <xs:complexType name="simpleType" abstract="true"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:group ref="xs:simpleDerivation"/> + <xs:attribute name="final" type="xs:simpleDerivationSet"/> + <xs:attribute name="name" type="xs:NCName"> + <xs:annotation> + <xs:documentation> + Can be restricted to required or forbidden + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="topLevelSimpleType"> + <xs:complexContent> + <xs:restriction base="xs:simpleType"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:simpleDerivation"/> + </xs:sequence> + <xs:attribute name="name" use="required" + type="xs:NCName"> + <xs:annotation> + <xs:documentation> + Required at the top level + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="localSimpleType"> + <xs:complexContent> + <xs:restriction base="xs:simpleType"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + <xs:group ref="xs:simpleDerivation"/> + </xs:sequence> + <xs:attribute name="name" use="prohibited"> + <xs:annotation> + <xs:documentation> + Forbidden when nested + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="final" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/> + </xs:annotation> + </xs:element> + + <xs:group name="facets"> + <xs:annotation> + <xs:documentation> + We should use a substitution group for facets, but + that's ruled out because it would allow users to + add their own, which we're not ready for yet. + </xs:documentation> + </xs:annotation> + <xs:choice> + <xs:element ref="xs:minExclusive"/> + <xs:element ref="xs:minInclusive"/> + <xs:element ref="xs:maxExclusive"/> + <xs:element ref="xs:maxInclusive"/> + <xs:element ref="xs:totalDigits"/> + <xs:element ref="xs:fractionDigits"/> + <xs:element ref="xs:length"/> + <xs:element ref="xs:minLength"/> + <xs:element ref="xs:maxLength"/> + <xs:element ref="xs:enumeration"/> + <xs:element ref="xs:whiteSpace"/> + <xs:element ref="xs:pattern"/> + </xs:choice> + </xs:group> + + <xs:group name="simpleRestrictionModel"> + <xs:sequence> + <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/> + <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:group> + + <xs:element name="restriction" id="restriction"> + <xs:complexType> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-restriction"> + base attribute and simpleType child are mutually + exclusive, but one or other is required + </xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:group ref="xs:simpleRestrictionModel"/> + <xs:attribute name="base" type="xs:QName" use="optional"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="list" id="list"> + <xs:complexType> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-list"> + itemType attribute and simpleType child are mutually + exclusive, but one or other is required + </xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:sequence> + <xs:element name="simpleType" type="xs:localSimpleType" + minOccurs="0"/> + </xs:sequence> + <xs:attribute name="itemType" type="xs:QName" use="optional"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="union" id="union"> + <xs:complexType> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-union"> + memberTypes attribute must be non-empty or there must be + at least one simpleType child + </xs:documentation> + </xs:annotation> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:sequence> + <xs:element name="simpleType" type="xs:localSimpleType" + minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute name="memberTypes" use="optional"> + <xs:simpleType> + <xs:list itemType="xs:QName"/> + </xs:simpleType> + </xs:attribute> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:complexType name="facet"> + <xs:complexContent> + <xs:extension base="xs:annotated"> + <xs:attribute name="value" use="required"/> + <xs:attribute name="fixed" type="xs:boolean" use="optional" + default="false"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="noFixedFacet"> + <xs:complexContent> + <xs:restriction base="xs:facet"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="fixed" use="prohibited"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:element name="minExclusive" id="minExclusive" type="xs:facet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/> + </xs:annotation> + </xs:element> + <xs:element name="minInclusive" id="minInclusive" type="xs:facet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/> + </xs:annotation> + </xs:element> + + <xs:element name="maxExclusive" id="maxExclusive" type="xs:facet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/> + </xs:annotation> + </xs:element> + <xs:element name="maxInclusive" id="maxInclusive" type="xs:facet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/> + </xs:annotation> + </xs:element> + + <xs:complexType name="numFacet"> + <xs:complexContent> + <xs:restriction base="xs:facet"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + + <xs:element name="totalDigits" id="totalDigits"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:restriction base="xs:numFacet"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="value" type="xs:positiveInteger" use="required"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + </xs:element> + <xs:element name="fractionDigits" id="fractionDigits" type="xs:numFacet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/> + </xs:annotation> + </xs:element> + + <xs:element name="length" id="length" type="xs:numFacet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-length"/> + </xs:annotation> + </xs:element> + <xs:element name="minLength" id="minLength" type="xs:numFacet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/> + </xs:annotation> + </xs:element> + <xs:element name="maxLength" id="maxLength" type="xs:numFacet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/> + </xs:annotation> + </xs:element> + + <xs:element name="enumeration" id="enumeration" type="xs:noFixedFacet"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/> + </xs:annotation> + </xs:element> + + <xs:element name="whiteSpace" id="whiteSpace"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:restriction base="xs:facet"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="value" use="required"> + <xs:simpleType> + <xs:restriction base="xs:NMTOKEN"> + <xs:enumeration value="preserve"/> + <xs:enumeration value="replace"/> + <xs:enumeration value="collapse"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="pattern" id="pattern"> + <xs:annotation> + <xs:documentation + source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:restriction base="xs:noFixedFacet"> + <xs:sequence> + <xs:element ref="xs:annotation" minOccurs="0"/> + </xs:sequence> + <xs:attribute name="value" type="xs:string" use="required"/> + <xs:anyAttribute namespace="##other" processContents="lax"/> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + </xs:element> + +</xs:schema> diff --git a/SDT/schema3.0/etc/anttasks.xml b/SDT/schema3.0/etc/anttasks.xml new file mode 100644 index 0000000000000000000000000000000000000000..1d731eb838bc3561c223738a36b676adc1593d53 --- /dev/null +++ b/SDT/schema3.0/etc/anttasks.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="anttasks" default="build"> + + +<!-- ant-contribs --> +<taskdef resource="net/sf/antcontrib/antlib.xml"> + <classpath> + <pathelement location="${path.libs}/ant/ant-contrib-1.0b3.jar"/> + </classpath> +</taskdef> + +<!-- Set the log level --> +<taskdef name="setloglevel" + classname="de.berkom.ehome.tools.ant.setloglevel.SetLogLevel" + classpath="${path.libs}/ant/antSetLogLevel.jar"/> + +</project> + diff --git a/SDT/schema3.0/etc/common.xml b/SDT/schema3.0/etc/common.xml new file mode 100644 index 0000000000000000000000000000000000000000..c05a65e7966231a0e874e8f25c48e41362e69b7b --- /dev/null +++ b/SDT/schema3.0/etc/common.xml @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="imported" default="build"> + +<!-- TODOs + + * genjar integration + * if no manifest is available include a defalt one from etc? +--> + + +<property name="path.libs" location="${basedir}/lib" /> + +<!-- Load various tasks --> +<import file="anttasks.xml" /> + +<!-- Unset the _mainbuild property --> +<var name="_mainbuild" unset="true" /> + +<!-- Load the properties --> +<import file="properties.xml" /> + + +<!-- Load all the actual tasks --> +<import file="tasks/all.xml" /> +<import file="tasks/allforced.xml" /> +<import file="tasks/build.xml" /> +<import file="tasks/buildjar.xml" /> +<import file="tasks/clean.xml" /> +<import file="tasks/collect.xml" /> +<import file="tasks/compile.xml" /> +<import file="tasks/compilenative.xml" /> +<import file="tasks/doc.xml" /> +<import file="tasks/eclipse.xml" /> + +<import file="tasks/_addPrivateLibs.xml" /> +<import file="tasks/_buildNative.xml" /> +<import file="tasks/_checkDependentProjects.xml" /> +<import file="tasks/_cleanDependentProjects.xml" /> +<import file="tasks/_getBuildNumber.xml" /> +<import file="tasks/_handleProjectProperties.xml" /> +<import file="tasks/_includeExternalResourcesInJar.xml" /> +<!-- <import file="tasks/_importManifest.xml" /> --> +<import file="tasks/_prepare.xml" /> +<import file="tasks/_preparebuild.xml" /> +<import file="tasks/_setClassPath.xml" /> + + +</project> diff --git a/SDT/schema3.0/etc/dal.rnc b/SDT/schema3.0/etc/dal.rnc new file mode 100644 index 0000000000000000000000000000000000000000..728c734c43e4858e61cef9136e7e35a93ad60f8e --- /dev/null +++ b/SDT/schema3.0/etc/dal.rnc @@ -0,0 +1,15 @@ + +namespace local = "" +default namespace xsl = "http://homegatewayinitiative.org/xml/dal/3.0" +namespace xi = "http://www.w3.org/2001/XInclude" + +version = "1.0" + +include "domain.rnc" + +xinclude = element xi:include { + attribute href { xsd:anyURI }, + attribute parse { text } + } + +Imports = element Imports { xinclude* }? diff --git a/SDT/schema3.0/etc/default.properties b/SDT/schema3.0/etc/default.properties new file mode 100644 index 0000000000000000000000000000000000000000..6c1e9ad0f26632f0d0c7375c229a08b02eef79e0 --- /dev/null +++ b/SDT/schema3.0/etc/default.properties @@ -0,0 +1,124 @@ +# Default Properties for the Ant make system +# + +# +# Default libraries. +# Update accordingly if another library becomes the system's default library +# + +default.lib.cdc.foundation.1.1=cdc/foundation/1.1/classes.zip + +default.lib.osgi.core.2.0=osgi/framework/2.0/osgi.jar +default.lib.osgi.cmpn.2.0=osgi/framework/2.0/osgi.jar + +default.lib.osgi.core.3.0=osgi/framework/3.0/osgi.jar +default.lib.osgi.cmpn.3.0=osgi/framework/3.0/osgi.jar + +default.lib.osgi.core.4.0=osgi/core/4.0/osgi.core.jar +default.lib.osgi.core.4.1=osgi/core/4.1/osgi.core.jar +default.lib.osgi.core.4.2=osgi/core/4.2/osgi.core.jar +default.lib.osgi.core=osgi/core/4.2/osgi.core.jar + +default.lib.osgi.cmpn.4.0=osgi/cmpn/4.0/osgi.compendium.jar +default.lib.osgi.cmpn.4.1=osgi/cmpn/4.1/osgi.cmpn.jar +default.lib.osgi.cmpn.4.2=osgi/cmpn/4.2/osgi.cmpn.jar +default.lib.osgi.cmpn=osgi/cmpn/4.2/osgi.cmpn.jar + +default.lib.osgi.dmt.1.0=osgi/info/1.0/dmt.jar +default.lib.osgi.dmt.2.0=osgi/info/2.0/org.osgi.impl.service.dmt.jar +default.lib.osgi.dmt=osgi/info/2.0/org.osgi.impl.service.dmt.jar + + +default.lib.mail.1.4.prosyst=javax/mail/1.4-prosyst/mail.jar +default.lib.mail=javax/mail/1.4-prosyst/mail.jar + +default.lib.activation.1.1.prosyst=javax/activation/1.1-prosyst/activation.jar +default.lib.activation=javax/activation/1.1-prosyst/activation.jar + +default.lib.j2ee.1.3.1=javax/j2ee/1.3.1/j2ee.jar +default.lib.j2ee=javax/j2ee/1.3.1/j2ee.jar + +# - Servlet APIs --------------------------------------------------------------- +# +# With the addition of the SIP-Servlet API, and it's dependency on newer +# version of the Servlet API, I thought names matching the Sun package +# structure would be clearer. Kept the old definition as well. + +default.lib.servlet.2.3.1=javax/servlet/2.3.1/servlet.jar +default.lib.servlet=javax/servlet/2.3.1/servlet.jar + +default.lib.javax.servlet.2.3.1=javax/servlet/2.3.1/servlet.jar +default.lib.javax.servlet.2.4=javax/servlet/2.4/servlet.jar +default.lib.javax.servlet.2.5=javax/servlet/2.5/servlet.jar +default.lib.javax.servlet.3.0.1=javax/servlet/3.0.1/servlet.jar +default.lib.javax.servlet=javax/servlet/2.3.1/servlet.jar + +default.lib.javax.sip.servlet.1.1=javax/servlet/sip/1.1/sip-servlet.jar +default.lib.javax.sip.servlet=javax/servlet/sip/1.1/sip-servlet.jar + +# ------------------------------------------------------------------------------ + +default.lib.log4j=apache/log4j/1.2.4/log4j-1.2.4.jar + +default.lib.jgraph=jgraph/5.12.0.4/jgraph.jar + +default.lib.thinlet.20031012=thinlet/20031012/thinlet.jar +default.lib.thinlet.20050328=thinlet/20050328/thinlet.jar +default.lib.thinlet.20070222=thinlet/20070222/thinlet.jar +default.lib.thinlet=thinlet/20070222/thinlet.jar + +default.lib.id3tag=id3tag/id3t.jar +default.lib.xmlrpc=prosyst/xmlrpc/xmlrpc.jar + +# - CDC/Foundation Extensions ------------------------------------------------- + +default.lib.cdc.foundationx.j9jsse=cdc/foundationx/j9jsse/2.4/j9jsse.jar + +# ----------------------------------------------------------------------------- +# Note: We should not require dependencies on the ProSyst HTTPS Handler! + +default.lib.httpshdlr=prosyst/httpshdlr.jar + +default.lib.ksoap2=ksoap2/ksoap2-j2se-full-2.1.0.jar +default.lib.kxml=ksoap2/kxml2-2.3.0.jar + + +# ----------------------------------------------------------------------------- +default.lib.xmlrpc=xmlrpc/xmlrpc-1.1.1.jar + +# ----------------------------------------------------------------------------- + +# +# Default version number +# (I'm wondering whether anybody will set this in his build properties) +# +version=1.0.0 + +# +# The default Manifest file. +# This might change if we adopt the bnd tool +# +manifest=etc/Manifest.mf + +# +# Add a build number to the resulting jar file. +# The file "build.number" in the root directory of each project contains the latest build number. +# Default: The value "none" means that no build number is appended. +# +buildnumber=none + +# +# Set the loglevel. +# Possible loglevel: debug,verbose,info (the ant default), warning, error +# Default is warning, which is rather quiet. +# +loglevel=warning + + +# +# Enable lint (all recommend warnings) +# Possible values: true, false +# Default: false +# +uselint=false + diff --git a/SDT/schema3.0/etc/domain.rnc b/SDT/schema3.0/etc/domain.rnc new file mode 100644 index 0000000000000000000000000000000000000000..7b42fb1a3f8c857a3ab99fe2d9038f6aa304b86f --- /dev/null +++ b/SDT/schema3.0/etc/domain.rnc @@ -0,0 +1,153 @@ +# - domain.rng +# - +# - Version 3.0 +# - +# - This work is released by the Smarthome Task Force of the HGI (Home +# - Gateway Initative), October 2015. +# - The work is created and released under the Apache License Version 2.0 . +# - See the license text at http://www.apache.org/licenses/LICENSE-2.0 for +# - full details. + +start = Domain +Domain = + element Domain { + attribute xml:base { xsd:anyURI }?, + attribute id { xsd:ID }, + DocDef, + element Imports { Domain+ }?, + element Modules { + element ModuleClass { ModuleDef }+ + }?, + element Devices { + element Device { + attribute id { xsd:Name }, + DocDef, + PropertiesDef?, + Modules?, + element SubDevices { + element SubDevice { + attribute id { xsd:Name }, + DocDef, + PropertiesDef?, + Modules? + }+ + }? + }+ + }? + } +PropertiesDef = + element Properties { + element Property { + attribute name { text }, + attribute optional { xsd:boolean }?, + attribute value { text }?, + DocDef, + SimpleType + }+ + } +DataTypeDef = + element DataType { + attribute name { text }?, + attribute unitOfMeasure { text }?, + DocDef, + (StructType | ArrayType | SimpleType), + ConstraintsDef? + } +StructType = element Struct { DataTypeDef+ } +ArrayType = element Array { DataTypeDef } +SimpleType = + element SimpleType { + attribute type { BasicType } + } +BasicType = + "integer" + | "boolean" + | "string" + | "byte" + | "float" + | "array" + | "enum" + | "date" + | "time" + | "datetime" + | "blob" + | "uri" +ConstraintsDef = + element Constraints { + element Constraint { + attribute name { text }, + attribute type { BasicType }?, + attribute value { text }?, + DocDef + }+ + } +DocText = + (text + | element em { text } + | element b { text } + | element tt { text })* +# <Doc> element is always optional +DocDef = + element Doc { + DocText + | (element p { DocText } + | element img { + attribute src { text }, + element caption { text } + })* + }? +ModuleDef = + attribute name { text }, + attribute optional { xsd:boolean }?, + element extends { + attribute domain { xsd:IDREF }, + attribute class { text } + }?, + DocDef, + PropertiesDef?, + Actions?, + Data?, + Events? +Modules = + element Modules { + element Module { ModuleDef }+ + } +Actions = + element Actions { + element Action { + attribute name { text }, + attribute optional { xsd:boolean }?, + DocDef, + DataTypeDef?, + ArgDef? + }+ + } +ArgDef = + element Args { + element Arg { + attribute name { text }, + DocDef, + DataTypeDef + }+ + } +Data = + element Data { + element DataPoint { + attribute name { text }, + attribute optional { xsd:boolean }?, + attribute writable { xsd:boolean }?, + attribute readable { xsd:boolean }?, + attribute eventable { xsd:boolean }?, + DocDef, + DataTypeDef + }+ + } +Events = + element Events { + element Event { + attribute name { text }, + attribute optional { xsd:boolean }?, + DocDef, + Data? + }+ + } diff --git a/SDT/schema3.0/etc/properties.xml b/SDT/schema3.0/etc/properties.xml new file mode 100644 index 0000000000000000000000000000000000000000..ce8aba6bd44a74c609b638b4d82424b492fbe3b0 --- /dev/null +++ b/SDT/schema3.0/etc/properties.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="properties" default="build"> + +<!-- Set the default project name to the name of the directory --> +<propertyregex override="yes" + property="projectname" + input="${basedir}" + regexp=".*[/\\]([^/\\]*)" + select="\1" /> + +<!-- A couple of constants --> +<property name="path.base" location="${basedir}" /> +<property name="path.libs" location="${path.base}/libs" /> +<property name="path.etc" location="${path.base}/etc" /> +<property name="path.genbase" location="${path.base}/gen" /> +<property name="path.gen" location="${path.genbase}/projects/${projectname}" /> +<property name="path.gen.classes" location="${path.gen}/classes" /> +<property name="path.gen.etc" location="${path.gen}/etc" /> +<property name="path.gen.docbase" location="${path.genbase}/docs" /> +<property name="path.gen.documentation" location="${path.gen.docbase}/${projectname}" /> +<property name="path.gen.collection" location="${path.genbase}/collection" /> +<property name="path.gen.domain" location="${path.genbase}/domains" /> +<property name="path.src" location="${basedir}/src" /> +<property name="path.resources" location="${basedir}/resources" /> +<property name="path.native" location="${basedir}/native" /> +<property name="path.gen.native" location="${path.gen}/native" /> +<property name="path.gen.classpathfile" location="${path.gen.etc}/_classpath" /> +<property name="path.gen.includecmdfile" location="${path.gen.etc}/_jarinclude.xml" /> +<property name="path.gen.importmanifestcmdfile" location="${path.gen.etc}/_manifestimport.xml" /> +<property name="path.etc.localfile" location="${path.base}/etc/local.xml" /> +<property name="path.eclipse.classpathfile" location="${basedir}/.classpath" /> +<property name="path.eclipse.projectfile" location="${basedir}/.project" /> +<property name="path.eclipse.settingsdir" location="${basedir}/.settings" /> +<property name="path.eclipse.settingsfile" location="${path.eclipse.settingsdir}/org.eclipse.jdt.core.prefs" /> + + + +<!-- The following tasks only need to be executed when this file is not included from the main build file --> +<if><not> + <isset property="_mainbuild" /> + </not> + <then> + <!-- Unset the java.target and java.source properties --> + <var name="java.target" unset="true" /> + <var name="java.source" unset="true" /> + + <!-- Load project specific properties from local properties file --> + <loadproperties srcFile="properties" /> + + <!-- Load project specific properties from local properties file --> + <loadproperties srcFile="etc/default.properties" /> + + <!-- Set the start loglevel --> + <setloglevel level="${loglevel}" /> + + </then> +</if> + +<!-- Define the path to additional Java jar files for the scriptdef and similar tasks --> +<path id="antscripting"> + <fileset dir="${path.libs}/ant/scripting" includes="*.jar" /> +</path> + + +<!-- set the default Java source and target formats to the local versions --> +<if><not> + <isset property="java.source" /> + </not> + <then> + <var name="java.source" value="${ant.java.version}" /> + </then> +</if> +<if><not> + <isset property="java.target" /> + </not> + <then> + <var name="java.target" value="${ant.java.version}" /> + </then> +</if> + + +<!-- load local properties, if the file exists --> +<available property="available.local" file="${path.etc.localfile}"/> +<if><isset property="available.local" /> + <then> + <import file="${path.etc.localfile}" /> + </then> +</if> + + +</project> diff --git a/SDT/schema3.0/etc/schema.xmlns b/SDT/schema3.0/etc/schema.xmlns new file mode 100644 index 0000000000000000000000000000000000000000..4f691f5342ddd84d3301215f2286a9cd3887822d --- /dev/null +++ b/SDT/schema3.0/etc/schema.xmlns @@ -0,0 +1,4 @@ +targetNamespace="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + diff --git a/SDT/schema3.0/etc/schemas.xml b/SDT/schema3.0/etc/schemas.xml new file mode 100644 index 0000000000000000000000000000000000000000..3b0bea68871bb789a0a90378c2c425b777e77199 --- /dev/null +++ b/SDT/schema3.0/etc/schemas.xml @@ -0,0 +1,9 @@ +<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> + + <namespace ns="http://homegatewayinitiative.org/xml/dal/2.0" typeId="DAL"/> + <namespace ns="http://www.w3.org/2001/XInclude" typeId="XINC"/> + + <typeId id="DAL" uri="dal.rnc"/> + <typeId id="XINC" uri="xinclude.rnc"/> + +</locatingRules> diff --git a/SDT/schema3.0/etc/tasks/_addPrivateLibs.xml b/SDT/schema3.0/etc/tasks/_addPrivateLibs.xml new file mode 100644 index 0000000000000000000000000000000000000000..b6a4fcad28e10ae82d353881e8433be9c4513be7 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_addPrivateLibs.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_addPrivateLibs" default="build"> + + +<!-- INTERNAL: _addPrivateLibs + Check, whether there are privare jars that should be added to the classpath. + Those must be located under resouces/libs or libs in the project directory. + Note that jars under resources/libs will be included in the resulting jar. +--> +<target name="_addPrivateLibs"> + <!-- look for jar files in the projects resources libs directory --> + <path id="idPrivatelibs"> + <fileset dir="resources/libs"> + <include name="*.jar" /> + </fileset> + </path> + + <trycatch> + <try> + <!-- try to access the private jars. If those don't exist, the following code is *not* executed --> + <var name="tmp" value="${toString:idPrivatelibs}" /> + <!-- add them to the classpath file --> + <for list="${tmp}" delimiter=":" param="jfile"> + <sequential> + <propertyregex override="yes" + property="tmp" + input="@{jfile}" + regexp=".*[/\\]([^/\\]*)" + select="\1" /> + <echo file="${path.gen.classpathfile}" append="true">projects/${projectname}/resources/libs/${tmp}${line.separator}</echo> + </sequential> + </for> + </try> + <catch> + <!-- if no lib available then do nothing --> + </catch> + </trycatch> + + + <path id="idPrivateExternallibs"> + <fileset dir="libs"> + <include name="*.jar" /> + </fileset> + + </path> + + <trycatch> + <try> + <!-- try to access the private jars. If those don't exist, the following code is *not* executed --> + <var name="tmp" value="${toString:idPrivateExternallibs}" /> + <!-- add them to the classpath file --> + <for list="${tmp}" delimiter=":" param="jfile"> + <sequential> + <propertyregex override="yes" + property="tmp" + input="@{jfile}" + regexp=".*[/\\]([^/\\]*)" + select="\1" /> + <echo file="${path.gen.classpathfile}" append="true">projects/${projectname}/libs/${tmp}${line.separator}</echo> + </sequential> + </for> + </try> + <catch> + <!-- if no lib available then do nothing --> + </catch> + </trycatch> + +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_buildNative.xml b/SDT/schema3.0/etc/tasks/_buildNative.xml new file mode 100644 index 0000000000000000000000000000000000000000..2d03b5dea4c6dcdeb9937d8060f4dcfb1bf758fc --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_buildNative.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_buildNative" default="build"> + +<!-- INTERNAL: _buildNative + Build all native code +--> + +<target name="_buildNative"> + <!-- is there a directory for native code? --> + <available property="available.native" file="${path.native}" type="dir"/> + <if><isset property="available.native" /> + <then> + + <!-- check whether ${prog.make} is set --> + <if> <isset property="prog.make" /> + <then> + + <!-- it is set, so go all the directories unter "native" and execute the Makefile --> + <path id="idNativeDirs"> + <dirset dir="${path.native}"> + <include name="*" /> + </dirset> + </path> + + <!-- iterate over all directories and call the makefile --> + <var name="tmp" value="${toString:idNativeDirs}" /> + <for list="${tmp}" delimiter=":" param="ndir"> + <sequential> + <available property="available.native.makefile" file="@{ndir}/Makefile" /> + <if><isset property="available.native.makefile" /> + <then> + <echo>@{ndir}/Makefile</echo> + + <!-- <exec executable="/usr/bin/make" + failonerror="false" + failifexecutionfails="false" + resultproperty="myStatus" + errorproperty="/tmp/error.out" + outputproperty="/tmp/foo.out" + error="/tmp/error.txt" + output="/tmp/output.txt"/> + --> + + </then> + <else> + <echo>No "Makefile" found. Please check the check (note the upper-case M).</echo> + </else> + </if> + <echo>@{ndir}</echo> + </sequential> + </for> + </then> + <else> + <echo>Property "prog.make" not set. Native Builds are ignored.</echo> + </else> + </if> + + + + + </then> + </if> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_checkDependentProjects.xml b/SDT/schema3.0/etc/tasks/_checkDependentProjects.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ad985573a996e31702c7a2fd60610f9a5b0bd0f --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_checkDependentProjects.xml @@ -0,0 +1,95 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_checkDependentProjects" default="build"> + +<!-- INTERNAL: _checkDependentProjects + Check whether there are dependencies to other projects and build them if necessary. +--> +<target name="_checkDependentProjects"> + <if><and> + <isset property="dependency.projects" /> + <length string="${dependency.projects}" trim="true" when="greater" length="0" /> + </and> + <then> + <!-- go through all dependent projects --> + <for list="${dependency.projects}" param="pname"> + <sequential> + <available property="available.dir.@{pname}" file="../@{pname}" /> + <available property="available.gen.@{pname}" file="../../gen/projects/@{pname}" /> + + <!-- does the project exist at all? --> + <if><isset property="available.dir.@{pname}" /> + <then> + <!-- look for jar files in the according project's gen directory --> + <path id="x"> + <fileset dir="../../gen/projects/@{pname}"> + <include name="*.jar" /> + </fileset> + </path> + + <trycatch> + <try> + <echo>Checking dependent project "@{pname}"</echo> + <var name="tmp" value="${toString:x}" /> + <if><isset property="dependency.projects.forcebuild" /> + <then> + <echo>Building dependent project "@{pname}" (forced)</echo> + <if><isset property="global.build" /> <!-- inheriting global.build property, if set --> + <then> + <ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="all"> + <property name="global.build" value="true" /> + </ant> + </then> + <else> + <ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="all" /> + </else> + </if> + </then> + </if> + </try> + <catch> + <!-- if no jar file available, build the project --> + <echo>Building dependent project "@{pname}"</echo> + <if><isset property="global.build" /> <!-- inheriting global.build property, if set --> + <then> + <ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" > + <property name="global.build" value="true" /> + </ant> + </then> + <else> + <ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" /> + </else> + </if> + </catch> + </trycatch> + + <!-- and try again --> + <trycatch> + <try> + <var name="tmp" value="${toString:x}" /> + <echo>Dependent project "@{pname}": ok</echo> + <for list="${tmp}" delimiter=":" param="jfile"> + <sequential> + <!--echo file="${path.gen.classpathfile}" append="true">@{jfile}${line.separator}</echo--> + <propertyregex override="yes" + property="tmp" + input="@{jfile}" + regexp=".*[/\\]([^/\\]*)" + select="\1" /> + <echo file="${path.gen.classpathfile}" append="true">gen/projects/@{pname}/${tmp}${line.separator}</echo> + </sequential> + </for> + </try> + <catch> + <fail>.${line.separator}${line.separator}Can't resolve dependency to project "@{pname}". Aborting.${line.separator}Perhaps that project was not build (check the property 'gobal.build.ignore').</fail> + </catch> + </trycatch> + </then> + </if> + </sequential> + </for> + </then> + </if> +</target> + + +</project> diff --git a/SDT/schema3.0/etc/tasks/_cleanDependentProjects.xml b/SDT/schema3.0/etc/tasks/_cleanDependentProjects.xml new file mode 100644 index 0000000000000000000000000000000000000000..851233972d0b0a7bc1cc7f91ba6d43aa131e2a75 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_cleanDependentProjects.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_cleanDependentProjects" default="build"> + +<!-- INTERNAL: _cleanDependentProjects + Check whether there are dependencies to other projects and clean them. +--> +<target name="_cleanDependentProjects"> + <if><and> + <isset property="dependency.projects" /> + <length string="${dependency.projects}" trim="true" when="greater" length="0" /> + </and> + <then> + <!-- go through all dependent projects --> + <for list="${dependency.projects}" param="pname"> + <sequential> + <available property="available.dir.@{pname}" file="../@{pname}" /> + + <!-- does the project exist at all? --> + <if><isset property="available.dir.@{pname}" /> + <then> + <echo>Cleaning dependent project "@{pname}"</echo> + <var name="tmp" value="${toString:x}" /> + <if><isset property="global.build" /> <!-- inheriting global.build property, if set --> + <then> + <ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="clean"> + <property name="global.build" value="true" /> + </ant> + </then> + <else> + <ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="clean" /> + </else> + </if> + </then> + </if> + </sequential> + </for> + </then> + </if> +</target> + + +</project> diff --git a/SDT/schema3.0/etc/tasks/_getBuildNumber.xml b/SDT/schema3.0/etc/tasks/_getBuildNumber.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea24ad5ffa9e8948cdb09abf0d2ef28d4bbf535b --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_getBuildNumber.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_getBuildNumber" default="build"> + + +<!-- INTERNAL: _getBuildNumber + Add the build number to the jar file name, if necessary. +--> +<target name="_getBuildNumber"> + <if><and> + <isset property="buildnumber" /> + <not> + <equals arg1="${buildnumber}" arg2="none" /> + </not> + </and> + <then> + <buildnumber /> + <propertyregex property="tmp" + override="true" + input="${file.jar}" + regexp="(.*).jar" + select="\1" /> + + <var name="file.jar" value="${tmp}-${build.number}.jar" /> + </then> + </if> + +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_handleProjectProperties.xml b/SDT/schema3.0/etc/tasks/_handleProjectProperties.xml new file mode 100644 index 0000000000000000000000000000000000000000..4bccaa8b7d14da65300543fb336a4f48e54f6ce5 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_handleProjectProperties.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_handleProjectProperties" default="build"> + +<!-- INTERNAL: _handleProjectProperties + Calculate and the project properties +--> +<target name="_handleProjectProperties"> + + <!-- go through all properties that start with "dependency.lib." --> + <propertyselector property="libs.list" + override="yes" + delimiter="," + match="^dependency\.lib\.(.*)" + select="\1" + casesensitive="false" /> + <if><isset property="libs.list" /> + <then> + <for list="${libs.list}" param="lib.id"> + <sequential> + <propertycopy override="yes" name="lib.name" from="dependency.lib.@{lib.id}" /> + <!-- echo message="@{lib.id}" / --> + + <!-- check whether the value is empty. In this case the globally configured value is assigned to the property so that it is not blank anymore --> + <if><length string="${lib.name}" trim="true" when="equal" length="0" /> + <then> + <var name="dependency.lib.@{lib.id}" value="${default.lib.@{lib.id}}" /> + </then> + </if> + <echo file="${path.gen.classpathfile}" append="true">libs/${dependency.lib.@{lib.id}}${line.separator}</echo> + </sequential> + </for> + </then> +<!-- + <else> + <echo file="${path.gen.classpathfile}" append="true"></echo> + </else> +--> + </if> + + + <!-- build the name for the jar file --> + <var name="tmp" value="${projectname}" /> + <if><isset property="jarbase" /> + <then> + <var name="tmp" value="${jarbase}" /> + </then> + </if> + + <!-- append verson number if it is not empty --> + <if><isset property="version" /> + <then> + <if><and> + <length string="${version}" trim="true" when="greater" length="0" /> + <not> + <equals arg1="${version}" arg2="none" trim="true" /> + </not> + </and> + <then> + <var name="tmp" value="${tmp}-${version}" /> + </then> + </if> + </then> + </if> + <var name="file.jar" value="${path.gen}/${tmp}.jar" /> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_importManifest.xml b/SDT/schema3.0/etc/tasks/_importManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..84097da891db3231afeb57446521dc25d37f2c1f --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_importManifest.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_importManifest" default="build"> + +<!-- BAUSTELLE --> + + + + + + +<!-- INTERNAL: _importManifest + Import the Manifest from another jar (in lib or from another project). +--> +<target name="_importManifest"> + <!-- Build an external build file to add the content to the jar file --> + <echo file="${path.gen.importmanifestcmdfile}" append="true"><project name="runimportmanifest" default="_runimportmanifest">${line.separator}</echo> + <echo file="${path.gen.importmanifestcmdfile}" append="true"><target name="_runimportmanifest">${line.separator}</echo> + <propertyselector property="manifestlib" + override="yes" + delimiter="," + match="^importmanifest\.lib\.(.*)" + select="\1" + casesensitive="false" /> + <if><isset property="manifestlib" /> + <then> + <echo file="${path.gen.importmanifestcmdfile}" append="true"><zip destfile="${file.jar}" update="true">${line.separator}</echo> + <propertycopy name="fs.src" from="default.lib.${manifestlib}" override="yes" /> + <var name="fs.src" value="${path.libs}/${fs.src}" /> + <echo file="${path.gen.importmanifestcmdfile}" append="true"><zipfileset src="${fs.src}" includes="META-INF/MANIFEST.MF" />${line.separator}</echo> + <echo file="${path.gen.importmanifestcmdfile}" append="true"></zip>${line.separator}</echo> + </then> + </if> + + + <echo file="${path.gen.importmanifestcmdfile}" append="true"></target>${line.separator}</echo> + <echo file="${path.gen.importmanifestcmdfile}" append="true"></project>${line.separator}</echo> + + + <!-- run the generates build file --> + <ant antfile="${path.gen.importmanifestcmdfile}" target="_runimportmanifest" inheritAll="true" /> + +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_includeExternalResourcesInJar.xml b/SDT/schema3.0/etc/tasks/_includeExternalResourcesInJar.xml new file mode 100644 index 0000000000000000000000000000000000000000..b03ab105d4fae133c4604c02c546f4f417a785b5 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_includeExternalResourcesInJar.xml @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_includeExternalResourcesInJar" default="build"> + +<!-- INTERNAL: _includeExternalResourcesInJar + Check, whether there should resources from other jar files be included. + Generate an external build file and execute it in order to add the files. +--> +<target name="_includeExternalResourcesInJar"> + <!-- go through all properties that start with "include." --> + <propertyselector property="include.list" + override="yes" + delimiter="," + match="^include\.(.*)" + select="\1" + casesensitive="false" /> + <if><isset property="include.list" /> + <then> + + <!-- Build an external build file to add the content to the jar file --> + <echo file="${path.gen.includecmdfile}" append="true"><project name="runzipinclude" default="_runzipinclude">${line.separator}</echo> + <echo file="${path.gen.includecmdfile}" append="true"><target name="_runzipinclude">${line.separator}</echo> + <echo file="${path.gen.includecmdfile}" append="true"><jar destfile="${file.jar}" update="true">${line.separator}</echo> + + <for list="${include.list}" param="include.id"> + <sequential> + <propertycopy override="yes" name="include.value" from="include.@{include.id}" /> + <var name="include.iszipfileset" value="true" /> + + + <!-- check whether the include is from a lib or generated project file --> + <if><matches string="include.@{include.id}" pattern="^include\.lib.\.*" /> + <then> <!-- lib --> + <propertyregex property="include.libname" + override="yes" + input="include.@{include.id}" + regexp="^include\.(.*)" + select="\1" + casesensitive="false" /> + <propertycopy name="fs.src" from="default.${include.libname}" override="yes" /> + <var name="fs.src" value="${path.libs}/${fs.src}" /> + </then> + <else> + + <!-- check whether the include is from a gen/resources directory --> + <if><matches string="include.@{include.id}" pattern="^include\.gen\.resources" /> + <then> + <var name="fs.src" value="${path.gen}" /> + <var name="include.iszipfileset" value="false" /> + </then> + <else> + + <!-- include from a project --> + <propertyregex property="include.libname" + override="yes" + input="include.@{include.id}" + regexp="^include\.project\.(.*)" + select="\1" + casesensitive="false" /> + + <path id="x"> + <fileset dir="../../gen/projects/${include.libname}"> + <include name="*.jar" /> + </fileset> + </path> + <var name="fs.src" value="${toString:x}" /> + </else> + </if> + </else> + </if> + + <if><length string="${include.value}" trim="true" when="equal" length="0" /> + <then> + <var name="fs.includes" value="**/*" /> + </then> + <else> + <var name="fs.includes" value="${include.value}" /> + </else> + </if> + + + <if><equals arg1="${include.iszipfileset}" arg2="true"/> + <then> + <echo file="${path.gen.includecmdfile}" append="true"><zipfileset src="${fs.src}" includes="${fs.includes}" />${line.separator}</echo> + </then> + <else> + <echo file="${path.gen.includecmdfile}" append="true"><fileset dir="${fs.src}" includes="${fs.includes}" />${line.separator}</echo> + </else> + </if> + + </sequential> + </for> + + <echo file="${path.gen.includecmdfile}" append="true"></jar>${line.separator}</echo> + <echo file="${path.gen.includecmdfile}" append="true"></target>${line.separator}</echo> + <echo file="${path.gen.includecmdfile}" append="true"></project>${line.separator}</echo> + + + <!-- run the generates build file --> + <ant antfile="${path.gen.includecmdfile}" target="_runzipinclude" inheritAll="true" /> + </then> + </if> + +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_prepare.xml b/SDT/schema3.0/etc/tasks/_prepare.xml new file mode 100644 index 0000000000000000000000000000000000000000..0658dffe73ee7c1cd0a61127db64d3c51dae9238 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_prepare.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_prepare" default="build"> + +<!-- TASK: _prepare + Set properties, generate the classpath etc +--> +<target name="_prepare"> + <!-- initialize the build.time property --> + <tstamp /> + <tstamp> + <format property="build.time" pattern="dd.MM.yyyy HH:mm:ss" /> + </tstamp> + + <!-- Retrieve the subversion property --> + <trycatch> + <try> + <svn> + <status path="${basedir}" revisionProperty="svn.revision" /> + </svn> + </try> + <catch> + <property name="svn.revision" value="svn.revision.undefined" /> + <echo>Cannot determine SVN revision. SVN not found?</echo> + </catch> + </trycatch> + + <mkdir dir="${path.genbase}" /> + <mkdir dir="${path.gen}" /> + <mkdir dir="${path.gen.classes}" /> + <mkdir dir="${path.gen.documentation}" /> + <mkdir dir="${path.gen.etc}" /> + <mkdir dir="${path.gen.docbase}" /> + <mkdir dir="${path.gen.documentation}" /> + <mkdir dir="${path.gen.collection}" /> + <mkdir dir="${path.gen.domain}" /> + + <!-- remove old help files --> + <delete file="${path.gen.classpathfile}"/> + <delete file="${path.gen.includecmdfile}"/> + <delete file="${path.gen.importmanifestcmdfile}"/> + + <runtarget target="_handleProjectProperties" /> + + + <!-- make the directory for the domain --> + <if> + <isset property="omain" /> + <then> + <mkdir dir="${path.gen.domain}/${omain}" /> + </then> + </if> + + +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_preparebuild.xml b/SDT/schema3.0/etc/tasks/_preparebuild.xml new file mode 100644 index 0000000000000000000000000000000000000000..3df6082e757a557c57d0f6745267406549845467 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_preparebuild.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_preparebuild" default="build"> + +<!-- INTERNAL: _preparebuild + Does preparations that are only necessary in case of a build +--> +<target name="_preparebuild"> + <runtarget target="_checkDependentProjects" /> + <runtarget target="_addPrivateLibs" /> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/_setClassPath.xml b/SDT/schema3.0/etc/tasks/_setClassPath.xml new file mode 100644 index 0000000000000000000000000000000000000000..bebe50b7a56ed333822a6048494eec68485c3c3f --- /dev/null +++ b/SDT/schema3.0/etc/tasks/_setClassPath.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="_setClassPath" default="build"> + +<!-- INTERNAL: _setClassPath + Set the internal classpath for building the project by reading from the classpathfile, or empty. +--> +<target name="_setClassPath"> + <!-- set the classpath from the file, only when the _classpathfile exists. Otherwise define an empty path element --> + <available property="available.classpathfile" file="${path.gen.classpathfile}" /> + <if><isset property="available.classpathfile" /> + <then> + <path id="id.libraries"> + <!--fileset dir="${path.base}" includesfile="${path.gen.classpathfile}" excludes="**/*"/ --> + <fileset dir="${path.base}" includesfile="${path.gen.classpathfile}" /> + </path> + </then> + <else> + <path id="id.libraries"> + </path> + </else> + </if> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/all.xml b/SDT/schema3.0/etc/tasks/all.xml new file mode 100644 index 0000000000000000000000000000000000000000..1859e09fe7bcc18b5f7f726bfdddb056976c2958 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/all.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="all" default="build"> + +<!-- TASK: all + Clean up, build and collect +--> +<target name="all"> + <runtarget target="clean" /> + <runtarget target="build" /> + <runtarget target="collect" /> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/allforced.xml b/SDT/schema3.0/etc/tasks/allforced.xml new file mode 100644 index 0000000000000000000000000000000000000000..32f73751b478cf800e7623f3bebee89c55f71a2c --- /dev/null +++ b/SDT/schema3.0/etc/tasks/allforced.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="allforced" default="build"> + +<!-- TASK: allforced + Clean up, build and collect. + Includes a forced update to all dependent projects +--> +<target name="allforced"> + <var name="dependency.projects.forcebuild" value="" /> + <runtarget target="all" /> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/build.xml b/SDT/schema3.0/etc/tasks/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b87b3e0bdbfa8cff9e3eb73f122f6d7734e6d65 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/build.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="build" default="build"> + +<!-- TASK: build + Main target +--> +<target name="build"> + <echo>----</echo> + <echo>Building project "${projectname}"</echo> + <!-- don't run the build if it is a global build and the project property "global.build.ignore" is set --> + <if><not> + <and> + <isset property="global.build" /> + <isset property="global.build.ignore" /> + </and> + </not> + <then> + <runtarget target="compile" /> + <runtarget target="buildjar" /> + </then> + <else> + <echo>+--------------------------------------------------------------------------------+</echo> + <echo>| PROJECT IS NOT BUILD. Global build, but "global.build.ignore" property is set. |</echo> + <echo>+--------------------------------------------------------------------------------+</echo> + </else> + </if> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/buildjar.xml b/SDT/schema3.0/etc/tasks/buildjar.xml new file mode 100644 index 0000000000000000000000000000000000000000..119545a2ba817a6dc1b8aaaa4dfbc544a4620536 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/buildjar.xml @@ -0,0 +1,63 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="buildjar" default="build"> + + +<!-- TASK: buildjar + Build the jar file +--> +<target name="buildjar" depends="_getBuildNumber"> + + <!-- Build the base jar file --> + <if><not> + <equals arg1="${manifest}" arg2="none" trim="true" /> + </not> + <then> + <jar destfile="${file.jar}" manifest="${manifest}" whenmanifestonly="create"> + <fileset dir="${path.gen.classes}"> + <include name="**/*.class" /> + </fileset> + <manifest> + <!-- Who is building this jar? --> + <attribute name="Built-By" value="${user.name}"/> + <attribute name="Build-Time" value="${build.time}"/> + <attribute name="SVN-Revision" value="${svn.revision}"/> + </manifest> + </jar> + </then> + <else> + <jar destfile="${file.jar}" whenmanifestonly="create"> + <fileset dir="${path.gen.classes}"> + <include name="**/*.class" /> + </fileset> + <manifest> + <!-- Who is building this jar? --> + <attribute name="Built-By" value="${user.name}"/> + <attribute name="Build-Time" value="${build.time}"/> + <attribute name="SVN-Revision" value="${svn.revision}"/> + </manifest> + </jar> + </else> + </if> + + <!-- Add resources, if necessary --> + <available property="available.resources" file="resources" /> + <if><isset property="available.resources" /> + <then> + <jar destfile="${file.jar}" update="true"> + <fileset dir="${path.resources}"> + <include name="**/*" /> + </fileset> + </jar> + </then> + </if> + + <!-- Include external resources in the jar file --> + <runtarget target="_includeExternalResourcesInJar" /> + + <!-- Include external manifest in the jar file --> + <!-- <runtarget target="_importManifest" /> --> + +</target> + + +</project> diff --git a/SDT/schema3.0/etc/tasks/clean.xml b/SDT/schema3.0/etc/tasks/clean.xml new file mode 100644 index 0000000000000000000000000000000000000000..8d86e0be8f13e14fc9914ad1b67562a383fd0e62 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/clean.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="clean" default="build"> + +<!-- TASK: Clean + Removes all generated files from the "gen" directory for a project +--> +<target name="clean" depends="_cleanDependentProjects"> + <echo>Cleaning project "${projectname}"</echo> + <delete dir="${path.gen}"/> + <delete dir="${path.gen.documentation}"/> + + <!-- remove the directory for the domain --> + <if> + <isset property="omain" /> + <then> + <delete dir="${path.gen.domain}/${omain}" /> + </then> + </if> + +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/collect.xml b/SDT/schema3.0/etc/tasks/collect.xml new file mode 100644 index 0000000000000000000000000000000000000000..f34e547012a667cd0d9d1472ff2280bca44e92c9 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/collect.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="collect" default="build"> + +<!-- TASK: collect + collect the results in a common directory. If $omain is set, the artifacts are also collected in + the specified Domain directory. +--> +<target name="collect" depends="_prepare"> + <echo>Collecting artifacts from "${projectname}"</echo> + <if> + <isset property="omain" /> + <then> + <copy todir="${path.gen.domain}/${omain}"> + <fileset dir="${path.gen}" includes="*.jar"/> + </copy> + </then> + </if> + <copy todir="${path.gen.collection}"> + <fileset dir="${path.gen}" includes="*.jar"/> + </copy> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/compile.xml b/SDT/schema3.0/etc/tasks/compile.xml new file mode 100644 index 0000000000000000000000000000000000000000..74f5382884758226bba2dfd809dbecf4dab40b3b --- /dev/null +++ b/SDT/schema3.0/etc/tasks/compile.xml @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="compile" default="build"> + +<!-- TASK: compile + Compile the source code +--> +<target name="compile" depends="_prepare,_preparebuild,_setClassPath"> + + <echo>Java.source=${java.source}, Java.target=${java.target}</echo> + + <if><equals arg1="${uselint}" arg2="true" trim="true" /> + + <!-- Enable -Xlint compiler warnings --> + <then> + <javac destdir="${path.gen.classes}" + includes="**/*.java" + classpathref="id.libraries" + srcdir="${path.src}" + debug="on" + target="${java.target}" + source="${java.source}" + includeantruntime="false" + listfiles="on"> + <compilerarg value="-Xlint"/> + </javac> + </then> + + <!-- No special compiler warnings --> + <else> + <javac destdir="${path.gen.classes}" + includes="**/*.java" + classpathref="id.libraries" + srcdir="${path.src}" + debug="on" + target="${java.target}" + source="${java.source}" + includeantruntime="false" + listfiles="on"> + </javac> + </else> + </if> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/compilenative.xml b/SDT/schema3.0/etc/tasks/compilenative.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ad51f72712afe00f61c900bfc288d368533eca2 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/compilenative.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="compilenative" default="build"> + +<!-- + Compile native code +--> +<target name="compilenative" depends="_prepare, _buildNative"> +</target> + +</project> diff --git a/SDT/schema3.0/etc/tasks/doc.xml b/SDT/schema3.0/etc/tasks/doc.xml new file mode 100644 index 0000000000000000000000000000000000000000..add2e25f7a066fafdcd73de61647bfbe6a796b09 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/doc.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="doc" default="build"> + +<!-- TASK: doc + Generate documentation for a project +--> + +<target name="doc" depends="_prepare,_setClassPath"> + <javadoc destdir="${path.gen.documentation}" + classpathref="id.libraries" + sourcepath="${path.src}" + > + </javadoc> +</target> + +</project> + diff --git a/SDT/schema3.0/etc/tasks/eclipse.xml b/SDT/schema3.0/etc/tasks/eclipse.xml new file mode 100644 index 0000000000000000000000000000000000000000..bbab65e89cbbc2326cbe46aeb7afb379d52e7560 --- /dev/null +++ b/SDT/schema3.0/etc/tasks/eclipse.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<project name="eclipse" default="build"> + +<!-- TASK: eclipse + Set properties, generate the classpath etc +--> +<target name="eclipse" depends="build, _setClassPath"> + + <!-- Writing the .classpath file --> + <!-- using echoxml is not possible together with the "for" statement, so <echo> and escapes must be used --> + <echo file="${path.eclipse.classpathfile}"><?xml version="1.0" encoding="UTF-8"?>${line.separator}<classpath>${line.separator}<classpathentry kind="src" path="src"/>${line.separator}<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>${line.separator}</echo> + <for param="p"> + <path refid="id.libraries" /> + <sequential> + <echo file="${path.eclipse.classpathfile}" append="true"><classpathentry kind="lib" path="@{p}"/>${line.separator}</echo> + </sequential> + </for> + <echo file="${path.eclipse.classpathfile}" append="true"><classpathentry kind="output" path="classes"/>${line.separator}</classpath>${line.separator}</echo> + + <!-- Writing the .project file --> + <echoxml file="${path.eclipse.projectfile}"> + <projectDescription> + <name>${projectname}</name> + <comment></comment> + <projects></projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> + <linkedResources> + <link> + <name>classes</name> + <type>2</type> + <location>${path.gen.classes}</location> + </link> + </linkedResources> + </projectDescription> + </echoxml> + + <!-- Writing the settings/org.eclipse.jdt.core.prefs file --> + <mkdir dir="${path.eclipse.settingsdir}" /> + <echo file="${path.eclipse.settingsfile}">org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.codegen.targetPlatform=${java.target}${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.compliance=${java.source}${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.debug.lineNumber=generate${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.debug.localVariable=generate${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.debug.sourceFile=generate${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning${line.separator}</echo> + <echo file="${path.eclipse.settingsfile}" append="true">org.eclipse.jdt.core.compiler.source=${java.source}${line.separator}</echo> + + +</target> + +</project> + + diff --git a/SDT/schema3.0/gen/html/com.telekom/index.html b/SDT/schema3.0/gen/html/com.telekom/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3a35cfa4f717c342ca2c45cc41563201c954bbcf --- /dev/null +++ b/SDT/schema3.0/gen/html/com.telekom/index.html @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="ISO-8859-1"?><html xmlns:dal="http://hgi.org/xml/dal/1.0" xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Domain com.telekom</title> +</head> +<body> +<h1>Domain com.telekom</h1> +<h2>Devices</h2> +<ul> +<li> +<a href="switch.power.html">PowerSwitch</a> +</li> +</ul> +</body> +</html> diff --git a/SDT/schema3.0/gen/html/com.telekom/switch.power.html b/SDT/schema3.0/gen/html/com.telekom/switch.power.html new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/SDT/schema3.0/gen/html/dal-core.html b/SDT/schema3.0/gen/html/dal-core.html new file mode 100644 index 0000000000000000000000000000000000000000..4a9f90e5ad3f7a74a67a05f9d667d5fb6c02c1bb --- /dev/null +++ b/SDT/schema3.0/gen/html/dal-core.html @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + + + + + BooleanState is the preferred module for modelling a + functionality corresponding to an underlying binary state. This + module should be used to abstract away from the actual datatype + and values in question. Note that the module does not define whether + the execution mode is blocking or non-blocking. + + + + + Obtain the current associated state. + + + + + Set the associated state to the specified value. + + + + The desired value of the associated state. + + + + + + + diff --git a/SDT/schema3.0/gen/html/dal-eg.html b/SDT/schema3.0/gen/html/dal-eg.html new file mode 100644 index 0000000000000000000000000000000000000000..426e7f5102f39ed0484ca11175985e69428e216f --- /dev/null +++ b/SDT/schema3.0/gen/html/dal-eg.html @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + + + + + + + + + + + + + PowerSwitch + + Telekom Innovation Laboratories + + + + This device is intended as a demonstration of how to use the + abstract modules defined in the HGI Core domain. The + vendor has provided a proprietry module with two operations + on and off. This is clearly a candidate for the + module class BooleanState. + + + + + + The proprietry interface for turning the switch on and off. + Actions for setting the state to on or off + and for querying the state. + + + + + + Turn the switch on. + + + + + Turn the switch off. + + + + + Query the state of the switch. Returns the string "on" + or "off". + + + + + + + + + + + An event that indicates the new state of the switch. + + + + + + + + + + + diff --git a/SDT/schema3.0/gen/html/hgi.dal.core/index.html b/SDT/schema3.0/gen/html/hgi.dal.core/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3e17706cbd1a2f88dc09494b21515a4e623606e7 --- /dev/null +++ b/SDT/schema3.0/gen/html/hgi.dal.core/index.html @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="ISO-8859-1"?><html xmlns:dal="http://homegatewayinitiative.org/xml/dal/2.0" xmlns="http://www.w3.org/1999/xhtml"> +<head> +<title>Domain hgi.dal.core</title> +</head> +<body> +<h1>Domain hgi.dal.core</h1> +<h2>Devices</h2> +<ul/> +</body> +</html> diff --git a/SDT/schema3.0/gen/html/mseeb.html b/SDT/schema3.0/gen/html/mseeb.html new file mode 100644 index 0000000000000000000000000000000000000000..0e01ea6f8d9816e8d4114ea9de2759619a54eebe --- /dev/null +++ b/SDT/schema3.0/gen/html/mseeb.html @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> + + + + + + + + + + + BooleanState is the preferred module for modelling a functionality corresponding to an underlying binary state.This module should be used to abstract away from the actual datatype and values in question. Note that the module does not define whether the execution mode is blocking or non-blocking. + + + + + Obtain the current associated state. + + + + + Set the associated state to the specified value. + + + + The desired value of the associated state. + + + + + + + + + + + + + + + + + + + + + + + + Multi Socket Electrical-Extension-Block + HGI + 1.0 + http://www.homegatewayinitative.org + 1234.5 + + + This device is intended as a demonstration of how to define a Root Device with multiple sub-devices. + + + + + + + + + The proprietry interface for turning all switches of the extension block on and off. + The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false". + + + + + + + + This datapoint represents the firmware version of the extension block. + + + + + + This datapoint is an array of strings with the names of the contained devices. + + + + + + + + + + + + + + + PowerSwitch 1 + HGI + + + This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain. + + + + + + + + + + + + + PowerSwitch 2 + HGI + + + This sub device is intended as a demonstration of how to use the abstract modules defined in the HGI Core domain. + + + + + + + + + + + + diff --git a/SDT/schema3.0/lib/ant/ant-contrib-1.0b3.jar b/SDT/schema3.0/lib/ant/ant-contrib-1.0b3.jar new file mode 100644 index 0000000000000000000000000000000000000000..062537661a514c2ce97d18948f4f25f7226cc1a0 Binary files /dev/null and b/SDT/schema3.0/lib/ant/ant-contrib-1.0b3.jar differ diff --git a/SDT/schema3.0/lib/ant/antSetLogLevel.jar b/SDT/schema3.0/lib/ant/antSetLogLevel.jar new file mode 100644 index 0000000000000000000000000000000000000000..59e6a22d692662b8a19139ae484aac6dacecde9c Binary files /dev/null and b/SDT/schema3.0/lib/ant/antSetLogLevel.jar differ diff --git a/SDT/schema3.0/lib/trang.jar b/SDT/schema3.0/lib/trang.jar new file mode 100644 index 0000000000000000000000000000000000000000..b3d3de14794b34d79af3523bf56a2cb40f7e07ee Binary files /dev/null and b/SDT/schema3.0/lib/trang.jar differ diff --git a/SDT/schema3.0/properties b/SDT/schema3.0/properties new file mode 100644 index 0000000000000000000000000000000000000000..9ecd260ab42950151f29291dfd8899d621604c97 --- /dev/null +++ b/SDT/schema3.0/properties @@ -0,0 +1 @@ +loglevel=debug diff --git a/SDT/schema3.0/src/domain.rng b/SDT/schema3.0/src/domain.rng new file mode 100644 index 0000000000000000000000000000000000000000..db5784147c77f0152c8c4c76e2e160c2e165776f --- /dev/null +++ b/SDT/schema3.0/src/domain.rng @@ -0,0 +1,387 @@ +<!-- + - domain.rng + - + - Version 3.0 + - + - This work is released by the Smarthome Task Force of the HGI (Home + - Gateway Initative), October 2015. + - The work is created and released under the Apache License Version 2.0 . + - See the license text at http://www.apache.org/licenses/LICENSE-2.0 for + - full details. + --> + +<grammar xmlns="http://relaxng.org/ns/structure/1.0" + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> + + + <start> + <ref name="Domain"/> + </start> + + + <define name="Domain"> + <element name="Domain"> + <optional> + <attribute name="xml:base"> + <data type="anyURI"/> + </attribute> + </optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + <ref name="DocDef"/> + <optional> + <element name="Imports"> + <oneOrMore> + <ref name="Domain"/> + </oneOrMore> + </element> + </optional> + <optional> + <element name="Modules"> + <oneOrMore> + <element name="ModuleClass"> + <ref name="ModuleDef"/> + </element> + </oneOrMore> + </element> + </optional> + <optional> + <element name="Devices"> + <oneOrMore> + <element name="Device"> + <attribute name="id"> + <data type="Name"/> + </attribute> + <ref name="DocDef"/> + <optional> + <ref name="PropertiesDef"/> + </optional> + <optional> + <ref name="Modules"/> + </optional> + <optional> + <element name="SubDevices"> + <oneOrMore> + <element name="SubDevice"> + <attribute name="id"> + <data type="Name"/> + </attribute> + <ref name="DocDef"/> + <optional> + <ref name="PropertiesDef"/> + </optional> + <optional> + <ref name="Modules"/> + </optional> + </element> + </oneOrMore> + </element> + </optional> + </element> + </oneOrMore> + </element> + </optional> + </element> + </define> + + + <define name="PropertiesDef"> + <element name="Properties"> + <oneOrMore> + <element name="Property"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="optional"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="value"> + <text/> + </attribute> + </optional> + <ref name="DocDef"/> + <ref name="SimpleType" /> + </element> + </oneOrMore> + </element> + </define> + + + <define name="DataTypeDef"> + <element name="DataType"> + <optional> + <attribute name="name"> + <text/> + </attribute> + </optional> + <optional> + <attribute name="unitOfMeasure"> + <text/> + </attribute> + </optional> + <ref name="DocDef"/> + <choice> + <ref name="StructType" /> + <ref name="ArrayType" /> + <ref name="SimpleType" /> + </choice> + <optional> + <ref name="ConstraintsDef"/> + </optional> + </element> + </define> + + + <define name="StructType"> + <element name="Struct"> + <oneOrMore> + <ref name="DataTypeDef" /> + </oneOrMore> + </element> + </define> + + + <define name="ArrayType"> + <element name="Array"> + <ref name="DataTypeDef" /> + </element> + </define> + + + <define name="SimpleType"> + <element name="SimpleType"> + <attribute name="type"> + <ref name="BasicType" /> + </attribute> + </element> + </define> + + + <define name="BasicType"> + <choice> + <value>integer</value> + <value>boolean</value> + <value>string</value> + <value>byte</value> + <value>float</value> + <value>array</value> + <value>enum</value> + <value>date</value> + <value>time</value> + <value>datetime</value> + <value>blob</value> + <value>uri</value> + </choice> + </define> + + + <define name="ConstraintsDef"> + <element name="Constraints"> + <oneOrMore> + <element name="Constraint"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="type"> + <ref name="BasicType" /> + </attribute> + </optional> + <optional> + <attribute name="value"> + <text/> + </attribute> + </optional> + <ref name="DocDef"/> + </element> + </oneOrMore> + </element> + </define> + + <define name="DocText"> + <zeroOrMore> + <choice> + <text/> + <element name="em"> + <text/> + </element> + <element name="b"> + <text/> + </element> + <element name="tt"> + <text/> + </element> + </choice> + </zeroOrMore> + </define> + + + <!-- <Doc> element is always optional --> + <define name="DocDef"> + <optional> + <element name="Doc"> + <choice> + <ref name="DocText"/> + <zeroOrMore> + <choice> + <element name="p"> + <ref name="DocText"/> + </element> + <element name="img"> + <attribute name="src"/> + <element name="caption"> + <text/> + </element> + </element> + </choice> + </zeroOrMore> + </choice> + </element> + </optional> + </define> + + + <define name="ModuleDef"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="optional"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <element name="extends"> + <attribute name="domain"> + <data type="IDREF"/> + </attribute> + <attribute name="class"/> + </element> + </optional> + <ref name="DocDef"/> + <optional> + <ref name="PropertiesDef"/> + </optional> + <optional> + <ref name="Actions"/> + </optional> + <optional> + <ref name="Data"/> + </optional> + <optional> + <ref name="Events"/> + </optional> + </define> + + + <define name="Modules"> + <element name="Modules"> + <oneOrMore> + <element name="Module"> + <ref name="ModuleDef"/> + </element> + </oneOrMore> + </element> + </define> + + + <define name="Actions"> + <element name="Actions"> + <oneOrMore> + <element name="Action"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="optional"> + <data type="boolean"/> + </attribute> + </optional> + <ref name="DocDef"/> + <optional> + <ref name="DataTypeDef"/> + </optional> + <optional> + <ref name="ArgDef" /> + </optional> + </element> + </oneOrMore> + </element> + </define> + + + <define name="ArgDef"> + <element name="Args"> + <oneOrMore> + <element name="Arg"> + <attribute name="name"/> + <ref name="DocDef"/> + <ref name="DataTypeDef"/> + </element> + </oneOrMore> + </element> + </define> + + + <define name="Data"> + <element name="Data"> + <oneOrMore> + <element name="DataPoint"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="optional"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="writable"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="readable"> + <data type="boolean"/> + </attribute> + </optional> + <optional> + <attribute name="eventable"> + <data type="boolean"/> + </attribute> + </optional> + <ref name="DocDef"/> + <ref name="DataTypeDef"/> + </element> + </oneOrMore> + </element> + </define> + + + <define name="Events"> + <element name="Events"> + <oneOrMore> + <element name="Event"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="optional"> + <data type="boolean"/> + </attribute> + </optional> + <ref name="DocDef"/> + <optional> + <ref name="Data" /> + </optional> + </element> + </oneOrMore> + </element> + </define> + +</grammar> + diff --git a/SDT/schema3.0/src/domain.xsd b/SDT/schema3.0/src/domain.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3144017f513abcb8fc8f514d33c09c4913933818 --- /dev/null +++ b/SDT/schema3.0/src/domain.xsd @@ -0,0 +1,303 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + - domain.rng + - + - Version 3.0 + - + - This work is released by the Smarthome Task Force of the HGI (Home + - Gateway Initative), October 2015. + - The work is created and released under the Apache License Version 2.0 . + - See the license text at http://www.apache.org/licenses/LICENSE-2.0 for + - full details. +--> +<xs:schema targetNamespace="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + + elementFormDefault="qualified"> + <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> + <xs:element name="Domain"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element minOccurs="0" ref="Imports"/> + <xs:element minOccurs="0" name="Modules"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="ModuleClass"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element minOccurs="0" ref="Devices"/> + </xs:sequence> + <xs:attribute ref="xml:base"/> + <xs:attribute name="id" use="required" type="xs:ID"/> + </xs:complexType> + </xs:element> + <xs:element name="Imports"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Domain"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="ModuleClass" type="ModuleDef"/> + <xs:element name="Devices"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Device"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Device"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element minOccurs="0" ref="Properties"/> + <xs:element minOccurs="0" ref="Modules"/> + <xs:element minOccurs="0" ref="SubDevices"/> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:Name"/> + </xs:complexType> + </xs:element> + <xs:element name="SubDevices"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="SubDevice"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SubDevice"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element minOccurs="0" ref="Properties"/> + <xs:element minOccurs="0" ref="Modules"/> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:Name"/> + </xs:complexType> + </xs:element> + <xs:element name="Properties"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Property"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Property"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element ref="SimpleType"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + <xs:attribute name="optional" type="xs:boolean"/> + <xs:attribute name="value"/> + </xs:complexType> + </xs:element> + <xs:element name="DataType"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:choice> + <xs:element ref="Struct"/> + <xs:element ref="Array"/> + <xs:element ref="SimpleType"/> + </xs:choice> + <xs:element minOccurs="0" ref="Constraints"/> + </xs:sequence> + <xs:attribute name="name"/> + <xs:attribute name="unitOfMeasure"/> + </xs:complexType> + </xs:element> + <xs:element name="Struct"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="DataType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Array"> + <xs:complexType> + <xs:sequence> + <xs:element ref="DataType"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="SimpleType"> + <xs:complexType> + <xs:attribute name="type" use="required" type="BasicType"/> + </xs:complexType> + </xs:element> + <xs:simpleType name="BasicType"> + <xs:restriction base="xs:token"> + <xs:enumeration value="integer"/> + <xs:enumeration value="boolean"/> + <xs:enumeration value="string"/> + <xs:enumeration value="byte"/> + <xs:enumeration value="float"/> + <xs:enumeration value="array"/> + <xs:enumeration value="enum"/> + <xs:enumeration value="date"/> + <xs:enumeration value="time"/> + <xs:enumeration value="datetime"/> + <xs:enumeration value="blob"/> + <xs:enumeration value="uri"/> + </xs:restriction> + </xs:simpleType> + <xs:element name="Constraints"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Constraint"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Constraint"> + <xs:complexType> + <xs:group ref="DocDef"/> + <xs:attribute name="name" use="required"/> + <xs:attribute name="type" type="BasicType"/> + <xs:attribute name="value"/> + </xs:complexType> + </xs:element> + <xs:group name="DocText"> + <xs:sequence> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="em"/> + <xs:element ref="b"/> + <xs:element ref="tt"/> + </xs:choice> + </xs:sequence> + </xs:group> + <xs:element name="em" type="xs:string"/> + <xs:element name="b" type="xs:string"/> + <xs:element name="tt" type="xs:string"/> + <!-- <Doc> element is always optional --> + <xs:group name="DocDef"> + <xs:sequence> + <xs:element minOccurs="0" ref="Doc"/> + </xs:sequence> + </xs:group> + <xs:element name="Doc"> + <xs:complexType mixed="true"> + <xs:choice> + <xs:group ref="DocText"/> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="p"/> + <xs:element ref="img"/> + </xs:choice> + </xs:choice> + </xs:complexType> + </xs:element> + <xs:element name="p"> + <xs:complexType mixed="true"> + <xs:group ref="DocText"/> + </xs:complexType> + </xs:element> + <xs:element name="img"> + <xs:complexType> + <xs:sequence> + <xs:element ref="caption"/> + </xs:sequence> + <xs:attribute name="src" use="required"/> + </xs:complexType> + </xs:element> + <xs:element name="caption" type="xs:string"/> + <xs:complexType name="ModuleDef"> + <xs:sequence> + <xs:element minOccurs="0" ref="extends"/> + <xs:group ref="DocDef"/> + <xs:element minOccurs="0" ref="Properties"/> + <xs:element minOccurs="0" ref="Actions"/> + <xs:element minOccurs="0" ref="Data"/> + <xs:element minOccurs="0" ref="Events"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + <xs:attribute name="optional" type="xs:boolean"/> + </xs:complexType> + <xs:element name="extends"> + <xs:complexType> + <xs:attribute name="domain" use="required" type="xs:IDREF"/> + <xs:attribute name="class" use="required"/> + </xs:complexType> + </xs:element> + <xs:element name="Modules"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Module"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Module" type="ModuleDef"/> + <xs:element name="Actions"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Action"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Action"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element minOccurs="0" ref="DataType"/> + <xs:element minOccurs="0" ref="Args"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + <xs:attribute name="optional" type="xs:boolean"/> + </xs:complexType> + </xs:element> + <xs:element name="Args"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Arg"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Arg"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element ref="DataType"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + </xs:complexType> + </xs:element> + <xs:element name="Data"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="DataPoint"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="DataPoint"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element ref="DataType"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + <xs:attribute name="optional" type="xs:boolean"/> + <xs:attribute name="writable" type="xs:boolean"/> + <xs:attribute name="readable" type="xs:boolean"/> + <xs:attribute name="eventable" type="xs:boolean"/> + </xs:complexType> + </xs:element> + <xs:element name="Events"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="Event"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Event"> + <xs:complexType> + <xs:sequence> + <xs:group ref="DocDef"/> + <xs:element minOccurs="0" ref="Data"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + <xs:attribute name="optional" type="xs:boolean"/> + </xs:complexType> + </xs:element> +</xs:schema> diff --git a/SDT/schema3.0/src/xml.xsd b/SDT/schema3.0/src/xml.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d60043f94c9aba9e189a37fcb30ebdfe83ccd71b --- /dev/null +++ b/SDT/schema3.0/src/xml.xsd @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.w3.org/XML/1998/namespace"> + <xs:import schemaLocation="domain.xsd"/> + <xs:attribute name="base" type="xs:anyURI"/> +</xs:schema> diff --git a/SDT/schema3.0/style/html.xsl b/SDT/schema3.0/style/html.xsl new file mode 100644 index 0000000000000000000000000000000000000000..8492bede0498eaebf0ce370eebb95cee9af73311 --- /dev/null +++ b/SDT/schema3.0/style/html.xsl @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<!-- - Name Spaces - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> +<!-- --> +<!-- Explicit namespace declaration for the DAL schema required, + otherwise select expressions like '/Domain' don't work. An + alternative is to remove the declaration from the input XML + document ... --> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:dal="http://homegatewayinitiative.org/xml/dal/2.0" + xmlns="http://www.w3.org/1999/xhtml" + + xmlns:redirect="http://xml.apache.org/xalan/redirect" + extension-element-prefixes="redirect" + version="1.0"> + + <xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/> + + <xsl:variable name="vendor" select="system-property('xsl:vendor')"/> + + <!-- HTML Output - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- Create a directory for the domain id with an HTML page for each --> + <!-- in the page. An index page contains links to all the devices. --> + <!-- --> + <!-- Template param: destdir - directories will be created here --> + + <xsl:param name="destdir"/> + + <xsl:template match="/dal:Domain"> + <xsl:variable name="domain" select="@id"/> + <xsl:variable name="dir" select="concat($destdir,'/',$domain)"/> + <xsl:choose> + <xsl:when test="contains($vendor, 'SAXON 6.2')"/> + <xsl:when test="contains($vendor, 'Apache')"> + <redirect:write file="{concat($dir,'/index.html')}"> + <xsl:apply-templates select="." mode="domain"/> + </redirect:write> + </xsl:when> + </xsl:choose> + <xsl:for-each select="dal:Devices/*"> + <xsl:variable name="file" select="concat($domain,'/',@id,'.html')"/> + <xsl:choose> + <xsl:when test="contains($vendor, 'SAXON 6.2')"/> + <xsl:when test="contains($vendor, 'Apache')"> + <redirect:write file="{concat($dir,'/',@id,'.html')}"> + <xsl:apply-templates select="."> + <xsl:with-param name="domain" select="$domain"/> + </xsl:apply-templates> + </redirect:write> + </xsl:when> + </xsl:choose> + </xsl:for-each> + </xsl:template> + + <!-- Domain - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- --> + <!-- --> + + <xsl:template match="dal:Domain" mode="domain"> + <html> + <head> + <title>Domain <xsl:value-of select="@id"/></title> + </head> + <body> + <h1>Domain <xsl:value-of select="@id"/></h1> + <h2>Devices</h2> + <ul> + <xsl:apply-templates select="dal:Devices/*" mode="domain"/> + </ul> + </body> + </html> + </xsl:template> + + <xsl:template match="dal:Device" mode="domain"> + <li> + <xsl:element name="a"> + <xsl:attribute name="href"> + <xsl:value-of select="concat(@id,'.html')"/> + </xsl:attribute> + <xsl:value-of select="dal:DeviceInfo/dal:Name"/> + </xsl:element> + </li> + </xsl:template> + + <!-- Device - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- --> + <!-- --> + + <xsl:template match="dal:Device"> + <xsl:param name="domain"/> + <html> + <head> + <title> + <xsl:value-of select="$domain"/> / <xsl:value-of select="@id"/> + </title> + </head> + <body> + <xsl:text><b>Domain:</b> </xsl:text> + <a href="index.html"><xsl:value-of select="$domain"/></a> + + <h2>Device <xsl:value-of select="dal:DeviceInfo/dal:Name"/></h2> + + <dl> + <dt><b>Vendor:</b></dt> + <dd><xsl:value-of select="dal:DeviceInfo/dal:Vendor"/></dd> + <dt><b>Device Id:</b></dt> + <dd><xsl:value-of select="@id"/></dd> + </dl> + + <xsl:apply-templates select="dal:Doc"/> + + <hr/><h2>Module Summary</h2> + + <ul> + <xsl:for-each select="dal:Modules/*"> + <xsl:apply-templates select="dal:extends" mode="check"/> + <li> + <xsl:value-of select="@name"/> + <xsl:apply-templates select="dal:extends"/> + </li> + </xsl:for-each> + </ul> + + <hr/><h2>Module Detail</h2> + + <xsl:apply-templates select="dal:Modules/*"/> + + </body> + </html> + </xsl:template> + + <!-- Modules - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- Determine the name of the super Module (if there is one) and use it --> + <!-- to fetch a list of Action nodes in this Module. These are passed to --> + <!-- the template geerating the action documentation for the module. This --> + <!-- This seems to be the least verbose way of getting inherited actions --> + <!-- and the pattern can be used for events as well --> + + <xsl:template match="dal:Module"> + <xsl:variable name="dm"> + <xsl:apply-templates select="dal:extends" mode="domain"/> + </xsl:variable> + <xsl:variable name="cl"> + <xsl:apply-templates select="dal:extends" mode="class"/> + </xsl:variable> + <xsl:variable + name="actions" + select="//dal:Domain[@id=$dm]//dal:ModuleClass[@name=$cl]//dal:Action"/> + + <h3> + Module <xsl:value-of select="@name"/> + <xsl:apply-templates select="dal:extends"/> + </h3> + <dl> + <dd> + <xsl:apply-templates select="dal:Doc"/> + </dd> + <xsl:call-template name="do-actions"> + <xsl:with-param name="actions" select="$actions"/> + </xsl:call-template> + </dl> + <hr/> + + </xsl:template> + + <!-- Actions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- The do-actions template is invoked for the module, and is passed any --> + <!-- inherited actions in the parameter 'actions'. An action section is --> + <!-- only generated if there are any actions (inherited or otherwise). --> + <!-- Inherited actions are rendered before the locally defined actions --> + + <xsl:template name="do-actions"> + <xsl:param name="actions"/> + <xsl:if test="count($actions)!=0 or .//dal:Actions"> + <dt><b>Actions</b></dt> + <dd> + <dl> + <xsl:apply-templates select="$actions"/> + <xsl:apply-templates select=".//dal:Actions"/> + </dl> + </dd> + </xsl:if> + </xsl:template> + + <xsl:template match="dal:Action"> + <dt><b><xsl:value-of select="@name"/></b></dt> + <dd> + <xsl:apply-templates select="dal:Doc"/> + <dl> + <xsl:if test="dal:Arg"> + <dt><b>Arguments</b></dt> + <xsl:apply-templates select="dal:Arg"/> + </xsl:if> + <xsl:if test="@type"> + <dt><b>Returns</b></dt> + <dd><xsl:value-of select="@type"/></dd> + </xsl:if> + </dl> + </dd> + </xsl:template> + + <xsl:template match="dal:Arg"> + <dd> + <xsl:value-of select="@type"/> + <xsl:text> </xsl:text> + <xsl:value-of select="@name"/> - + <xsl:text> </xsl:text> + <xsl:apply-templates select="dal:Doc"/> + </dd> + </xsl:template> + + <!-- Extends - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- --> + <!-- --> + + <xsl:template match="dal:extends"> + <xsl:text> </xsl:text><em>extends</em><xsl:text> </xsl:text> + <xsl:value-of select="@class"/><xsl:text> (</xsl:text> + <xsl:value-of select="@domain"/><xsl:text>)</xsl:text> + </xsl:template> + + <xsl:template match="dal:extends" mode="domain"> + <xsl:value-of select="@domain"/> + </xsl:template> + + <xsl:template match="dal:extends" mode="class"> + <xsl:value-of select="@class"/> + </xsl:template> + + <xsl:template match="dal:extends" mode="check"> + <xsl:variable name="domain" select="@domain"/> + <xsl:variable name="class" select="@class"/> + <xsl:variable + name="extends" + select="//dal:Domain[@id=$domain]//dal:ModuleClass[@name=$class]"/> + <xsl:if test="count($extends)=0"> + <xsl:message terminate="yes"> + <xsl:text>Imported module class </xsl:text> + <xsl:value-of select="$domain"/>:<xsl:value-of select="$class"/> + <xsl:text> not found</xsl:text> + </xsl:message> + </xsl:if> + </xsl:template> + + <!-- Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - --> + <!-- --> + <!-- --> + <!-- --> + + <xsl:template match="dal:em"> + <em><xsl:apply-templates/></em> + </xsl:template> + + <xsl:template match="dal:b"> + <b><xsl:apply-templates/></b> + </xsl:template> + + <xsl:template match="dal:p"> + <p><xsl:apply-templates/></p> + </xsl:template> + +</xsl:stylesheet> diff --git a/SDT/schema3.0/test/EchonetLiteExamples.xml b/SDT/schema3.0/test/EchonetLiteExamples.xml new file mode 100644 index 0000000000000000000000000000000000000000..bc99816dd703d49e6ec31059a90e78c9cf87f8e1 --- /dev/null +++ b/SDT/schema3.0/test/EchonetLiteExamples.xml @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<!-- Example SDT definition taken from EchonetLite https://github.com/ECHONET-Consortium --> + + +<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns:xi="http://www.w3.org/2001/XInclude" + id="example.based.on.echonetLite"> + + <!-- Various examples for module classes --> + + <Modules> + <ModuleClass name="operationStatus"> + <Data> + <DataPoint name="operationStatus" readable="true" writable="true"> + <Doc>This property indicates the ON/OFF status.</Doc> + <DataType> + <SimpleType type="boolean" /> + </DataType> + </DataPoint> + </Data> + </ModuleClass> + + <!-- runtime property --> + + <ModuleClass name="installationLocation"> + <Data> + <DataPoint name="installationLocation" readable="true" writable="true"> + <Doc>This property indicates the installation location</Doc> + <DataType> + <SimpleType type="string" /> + </DataType> + </DataPoint> + </Data> + <Events> + <Event name="installationLocation"> + <!-- Event payload not shown here --> + </Event> + </Events> + </ModuleClass> + + <!-- sensor readout --> + + <ModuleClass name="measuredInstantaneousPowerConsumption"> + <Data> + <DataPoint name="measuredInstantaneousPowerConsumption" readable="true" writable="false"> + <Doc>This property indicates the instantaneous power consumption of the device in watts.</Doc> + <DataType unitOfMeasure="watts"> + <SimpleType type="integer" /> + </DataType> + </DataPoint> + </Data> + </ModuleClass> + + <ModuleClass name="temperatureSensorDataPoints"> + <Data> + <DataPoint name="measuredTemperatureValue" readable="true" writable="false"> + <Doc>This property indicates the measured temperature value in units of 0.1C.</Doc> + <DataType unitOfMeasure="celsius"> + <SimpleType type="integer" /> + </DataType> + </DataPoint> + </Data> + </ModuleClass> + </Modules> + + + <!-- Very simple example for a washing machine definition --> + + <Devices> + <Device id="SimpleWaschingMachine"> + <Properties> + <Property name="Name" value="washing machine"> + <SimpleType type="string" /> + </Property> + <Property name="Vendor" value="ACME"> + <SimpleType type="string" /> + </Property> + </Properties> + + <Modules> + + <!-- Inheriting ModuleClasses from the global generic ModuleClasses --> + + <Module name="installationLocation"> + <extends domain="example.based.on.echonetLite" class="installationLocation"/> + </Module> + + <Module name="measuredInstantaneousPowerConsumption"> + <extends domain="example.based.on.echonetLite" class="measuredInstantaneousPowerConsumption"/> + </Module> + + <Module name="temperatureSensorDataPoints"> + <extends domain="example.based.on.echonetLite" class="temperatureSensorDataPoints"/> + </Module> + + + <!-- The following Module inherits and extends a global generic ModuleClass with an event. Therefore, it is renamed to express + the change of name. --> + + <Module name="washingMachineOperationStatus"> + <extends domain="example.based.on.echonetLite" class="operationStatus"/> + + <!-- This Module extends the global one with an event. --> + + <Events> + <Event name="washingMachineOperationStatus"> + <!-- Event payload not shown here --> + </Event> + </Events> + + </Module> + + + <!-- Data points local to the wasching machine device --> + + <Module name="washingMachineDataPoints"> + <Data> + <DataPoint name="door/CoverOpen/CloseStatus" readable="true" writable="false"> + <Doc>This property indicates whether the door/cover is open or closed.</Doc> + <DataType> + <SimpleType type="enum" /> + </DataType> + </DataPoint> + <DataPoint name="washingMachineSetting" readable="true" writable="true"> + <Doc>Washing machine setting</Doc> + <DataType> + <SimpleType type="enum" /> + </DataType> + </DataPoint> + <DataPoint name="currentStageOfWashingCycle" readable="true" writable="false"> + <Doc>This property indicates the current stage of the washing cycle.</Doc> + <DataType> + <SimpleType type="enum" /> + </DataType> + </DataPoint> + <DataPoint name="timeRemainingToCompleteWashingCycle" readable="true" writable="false"> + <Doc>This property indicates the time remaining to complete the current washing cycle in the HH:MM:SS format.</Doc> + <DataType> + <SimpleType type="time" /> + </DataType> + </DataPoint> + + <!-- These three data points actually would make a good + example to be moved to a separate ModuleClass for + generalization so that they can be used by any device + that would make use of a timer. --> + + <DataPoint name="onTimerReservationSetting" readable="true" writable="true"> + <Doc>Reservation ON/OFF</Doc> + <DataType> + <SimpleType type="enum" /> + </DataType> + </DataPoint> + <DataPoint name="onTimerSetting" readable="true" writable="true"> + <Doc>Timer value (HH:MM)</Doc> + <DataType> + <SimpleType type="time" /> + </DataType> + </DataPoint> + <DataPoint name="relativeTimeBasedOnTimerSetting" readable="true" writable="true"> + <Doc>Timer value (HH:MM)</Doc> + <DataType> + <SimpleType type="time" /> + </DataType> + </DataPoint> + + </Data> + </Module> + </Modules> + </Device> + </Devices> +</Domain> diff --git a/SDT/schema3.0/test/dal-core.xml b/SDT/schema3.0/test/dal-core.xml new file mode 100644 index 0000000000000000000000000000000000000000..65ec652d501ec799914a79bafa998b557b28791b --- /dev/null +++ b/SDT/schema3.0/test/dal-core.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + id="hgi.dal.core"> + + <Modules> + <ModuleClass name="BooleanState"> + <Doc> + <tt>BooleanState</tt> is the preferred module for modelling a + functionality corresponding to an underlying binary state. This + module should be used to abstract away from the actual datatype + and values in question. Note that the module does not define whether + the execution mode is blocking or non-blocking. + </Doc> + <Actions> + <Action name="get"> + <Doc>Obtain the current associated state.</Doc> + <DataType> + <SimpleType type="boolean" /> + </DataType> + </Action> + <Action name="setTarget"> + <Doc>Set the associated state to the specified value.</Doc> + <Args> + <Arg name="value"> + <Doc>The desired value of the associated state.</Doc> + <DataType> + <SimpleType type="boolean" /> + </DataType> + </Arg> + </Args> + </Action> + </Actions> + </ModuleClass> + </Modules> + +</Domain> diff --git a/SDT/schema3.0/test/dal-eg.xml b/SDT/schema3.0/test/dal-eg.xml new file mode 100644 index 0000000000000000000000000000000000000000..60a5b87029febb0e4fecadef0c8104741fb24517 --- /dev/null +++ b/SDT/schema3.0/test/dal-eg.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<Domain xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + id="com.telekom"> + + <Imports> + <xi:include href="./dal-core.xml" parse="xml" /> + </Imports> + + <Devices> + + <Device id="switch.power"> + + <Doc> + This device is intended as a demonstration of how to use the + abstract modules defined in the <em>HGI Core</em> domain. The + vendor has provided a proprietry module with two operations + <tt>on</tt> and <tt>off</tt>. This is clearly a candidate for the + module class <tt>BooleanState</tt>. + </Doc> + <Properties> + <Property name="Name"> + <Doc>Original value: PowerSwitch</Doc> + <SimpleType type="string" /> + </Property> + + <!-- The Vendor field should probably be part of the domain --> + <Property name="Vendor"> + <Doc>Original value: Telekom Innovation Laboratories</Doc> + <SimpleType type="string" /> + </Property> + </Properties> + + <Modules> + <Module name="proprietaryPower"> + <Doc> + The proprietry interface for turning the switch on and off. + Actions for setting the state to <tt>on</tt> or <tt>off</tt> + and for querying the state. + </Doc> + + <Actions> + <Action name="on"> + <Doc> + Turn the switch on. + </Doc> + </Action> + <Action name="off"> + <Doc> + Turn the switch off. + </Doc> + </Action> + <Action name="state"> + <Doc>Query the state of the switch. Returns the string "<tt>on</tt>" or "<tt>off</tt>".</Doc> + <DataType> + <SimpleType type="string" /> + </DataType> + </Action> + </Actions> + + <Events> + <Event name="switchEvent"> + <Doc>An event that indicates the new state of the switch. + </Doc> + <Data> + <DataPoint name="state" writable="false"> + <DataType> + <SimpleType type="boolean" /> + </DataType> + </DataPoint> + </Data> + </Event> + </Events> + </Module> + + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </Device> + </Devices> +</Domain> diff --git a/SDT/schema3.0/test/example1.SDT.xml b/SDT/schema3.0/test/example1.SDT.xml new file mode 100644 index 0000000000000000000000000000000000000000..82cd47876f3ab1d868dfca80e90bd6bcb5d1c7dd --- /dev/null +++ b/SDT/schema3.0/test/example1.SDT.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Example1 SDT inspired by some Echonet Lite examples --> +<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns:xi="http://www.w3.org/2001/XInclude" + id="example1.SDT"> + + <Modules> + + <!-- Various examples for module classes --> + <ModuleClass name="operationStatus"> + <Data> + <DataPoint name="operationStatus" writable="true"> + <Doc>This property sets the ON/OFF status.</Doc> + <DataType> + <SimpleType type="boolean"/> + </DataType> + </DataPoint> + </Data> + <Events> + <Event name="operationStatus"> + </Event> + </Events> + </ModuleClass> + + + <ModuleClass name="installationLocation"> + <Data> + <DataPoint name="installationLocation" writable="true"> + <Doc>This property indicates the installation location</Doc> + <DataType> + <SimpleType type="string"/> + </DataType> + </DataPoint> + </Data> + <Events> + <Event name="installationLocation"> </Event> + </Events> + </ModuleClass> + + <ModuleClass name="measuredCumulativePowerConsumption"> + <Data> + <DataPoint name="measuredCumulativePowerConsumption" writable="false"> + <Doc>This indicates cumulative power consumption of the device in increments of 0.001kWh.</Doc> + <DataType unitOfMeasure="watt"> + <SimpleType type="integer"/> + </DataType> + </DataPoint> + </Data> + </ModuleClass> + + <ModuleClass name="onTimerSetting"> + <Data> + <DataPoint name="onTimer" writable="true"> + <Doc>Timer value (HH:MM)</Doc> + <DataType> + <SimpleType type="time"/> + </DataType> + </DataPoint> + </Data> + </ModuleClass> + + <ModuleClass name="statusDoor"> + <Data> + <DataPoint name="stausDoor" writable="false"> + <Doc>This reads the open=true or closed=false status of a door </Doc> + <DataType> + <SimpleType type="boolean"/> + </DataType> + </DataPoint> + </Data> + </ModuleClass> + + </Modules> + +</Domain> diff --git a/SDT/schema3.0/test/example2.SDT.xml b/SDT/schema3.0/test/example2.SDT.xml new file mode 100644 index 0000000000000000000000000000000000000000..82090f7174a241b2fe3f9912cc88dabb236af38e --- /dev/null +++ b/SDT/schema3.0/test/example2.SDT.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Example1 SDT inspired by some Echonet Lite examples --> +<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns:xi="http://www.w3.org/2001/XInclude" + id="example2.SDT"> + + <Imports> + <xi:include href="./example1.SDT.xml" parse="xml" /> + </Imports> + + <Devices> + <Device id="airConditioner"> + <Modules> + <Module name="operationStatus"> + <extends domain="example1.SDT" class="operationStatus"/> + </Module> + <Module name="installationLocation"> + <extends domain="example1.SDT" class="installationLocation"/> + </Module> + <Module name="measuredCumulativePowerConsumption"> + <extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/> + </Module> + <Module name="measuredCumulativePowerConsumption"> + <extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/> + </Module> + <Module name="onTimerSetting"> + <extends domain="example1.SDT" class="onTimerSetting"/> + </Module> + </Modules> + </Device> + </Devices> +</Domain> \ No newline at end of file diff --git a/SDT/schema3.0/test/example3.SDT.xml b/SDT/schema3.0/test/example3.SDT.xml new file mode 100644 index 0000000000000000000000000000000000000000..cb3c1836f61578cfb6103d9eae2e5a9183f61967 --- /dev/null +++ b/SDT/schema3.0/test/example3.SDT.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!-- Example1 SDT inspired by some Echonet Lite examples --> +<Domain xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + xmlns:xi="http://www.w3.org/2001/XInclude" + id="example3.SDT"> + + <Imports> + <xi:include href="./example1.SDT.xml" parse="xml" /> + </Imports> + + <Devices> + <Device id="waschingMachine"> + <Modules> + <Module name="operationStatus"> + <extends domain="example1.SDT" class="operationStatus"/> + </Module> + <Module name="installationLocation"> + <extends domain="example1.SDT" class="installationLocation"/> + </Module> + <Module name="measuredCumulativePowerConsumption"> + <extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/> + </Module> + <Module name="measuredCumulativePowerConsumption"> + <extends domain="example1.SDT" class="measuredCumulativePowerConsumption"/> + </Module> + <Module name="onTimerSetting"> + <extends domain="example1.SDT" class="onTimerSetting"/> + </Module> + <Module name="statusDoor"> + <extends domain="example1.SDT" class="statusDoor"/> + </Module> + </Modules> + </Device> + </Devices> +</Domain> \ No newline at end of file diff --git a/SDT/schema3.0/test/mseeb.xml b/SDT/schema3.0/test/mseeb.xml new file mode 100644 index 0000000000000000000000000000000000000000..04dacf7655c7b11878c841b925df595adcf44ba8 --- /dev/null +++ b/SDT/schema3.0/test/mseeb.xml @@ -0,0 +1,304 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<!--tabstop: 4 --> + +<!-- + ++................................................+ +:Domain:org.homegatewayinitiative : +: : +: +..........................................+ : +: :Module:BooleanState : : +: : : : +: : +....................................+ : : +: : :Action:get : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Action:setTarget : : : +: : +....................................+ : : +: +..........................................+ : +: : +: +..........................................+ : +: :Device:MSEEB.root : : +: : : : +: : +....................................+ : : +: : :Module<REF>:BooleanState : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Module:extensionBlockDataPoints : : : +: : : : : : +: : : +..............................+ : : : +: : : :DataPoint:firmwareVersion : : : : +: : : +..............................+ : : : +: : : : : : +: : : +..............................+ : : : +: : : :DataPoint:powerSwitchNames : : : : +: : : +..............................+ : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :SubDevices : : : +: : : : : : +: : : +..............................+ : : : +: : : :SubDevice:switch.power.1 : : : : +: : : : : : : : +: : : :+...........................+ : : : : +: : : ::Module<REF>:BooleanState : : : : : +: : : :+...........................+ : : : : +: : : +..............................+ : : : +: : : : : : +: : : +..............................+ : : : +: : : :SubDevice:switch.power.2 : : : : +: : : : : : : : +: : : :+...........................+ : : : : +: : : ::Module<REF>:BooleanState : : : : : +: : : :+...........................+ : : : : +: : : +..............................+ : : : +: : +....................................+ : : +: +..........................................+ : ++................................................+ + +--> +<Domain xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://homegatewayinitiative.org/xml/dal/3.0" + id="org.homegatewayinitiative"> + +<!-- The following import statements include ModuleClasses from HGI --> + + <Imports> + <xi:include href="./dal-core.xml" parse="xml" /> + </Imports> + + <Modules> + <ModuleClass name="BooleanState"> + <Doc> + <tt>BooleanState</tt> is the preferred module for modelling a functionality corresponding to an underlying binary state.This module should be used to abstract away from the actual datatype and values in question. Note that the module does not define whether the execution mode is blocking or non-blocking. + </Doc> + <Actions> + <Action name="get" optional="true"> + <Doc> + Obtain the current associated state. + </Doc> + <DataType> + <SimpleType type="boolean" /> + </DataType> + </Action> + <Action name="setTarget"> + <Doc> + Set the associated state to the specified value. + </Doc> + <Args> + <Arg name="value"> + <Doc> + The desired value of the associated state. + </Doc> + <DataType> + <SimpleType type="boolean" /> + </DataType> + </Arg> + </Args> + </Action> + </Actions> + <Events> + <Event name="stateChanged" optional="true"> + <Data> + <DataPoint name="state" readable="true"> + <DataType> + <SimpleType type="boolean" /> + </DataType> + </DataPoint> + </Data> + </Event> + </Events> + </ModuleClass> + </Modules> + +<!-- Definition of the Device starts here. --> + + <Devices> + +<!-- The Device contains several sub-devices and offers one action on its own. --> + + <Device id="MSEEB.root"> + <Doc> + This device is intended as a demonstration of how to define a Root Device with multiple sub-devices. + </Doc> + <Properties> + <Property name="Name"> + <Doc>Original value: Multi Socket Electrical-Extension-Block</Doc> + <SimpleType type="string" /> + </Property> + <Property name="Vendor"> + <Doc>Original value: HGI</Doc> + <SimpleType type="string" /> + </Property> + <Property name="FirmwareVersion"> + <Doc>Original value: 1.0</Doc> + <SimpleType type="string" /> + </Property> + <Property name="VendorURL"> + <Doc>Original value: http://www.homegatewayinitative.org</Doc> + <SimpleType type="uri" /> + </Property> + <Property name="SerialNumber"> + <Doc>Original value: 1234.5</Doc> + <SimpleType type="string" /> + </Property> + </Properties> + +<!-- These are the modules for the device: + - Switch on/off all contained switches. It inherits from hgi.dal.core.BooleanState. + - A module with some data points for the firmware version of the whole device and a list of names of the containted power switches. +--> + + <Modules> + <Module name="rootPowerOnOff" optional="true"> + <extends domain="hgi.dal.core" class="BooleanState"/> + <Doc> + The proprietry interface for turning all switches of the extension block on and off. + The action "BooleanState:get" returns "true" when any of the sub-devices is in the state "on", otherwise it returns "false". + </Doc> + <Properties> + <Property name="version" value="1.0.0"> + <Doc>Version for this ModuleClass</Doc> + <SimpleType type="string" /> + </Property> + </Properties> + </Module> + <Module name="power"> + <Actions> + <Action name="getPowerConsumption"> + <Doc>Get the power consumption.</Doc> + <DataType name="consumption"> + <Struct> + <DataType name="values"> + <Array> + <DataType> + <Doc>This is an example simple data type with a minimum-value constraint.</Doc> + <SimpleType type="float" /> + <Constraints> + <Constraint name="minValue" type="float" value="0.0"> + <Doc>The value must be equal or greater 0.0</Doc> + </Constraint> + <Constraint name="step" type="float" value="0.1"> + <Doc>Steps are 0.1</Doc> + </Constraint> + </Constraints> + </DataType> + </Array> + </DataType> + <DataType name="timeFrame"> + <Array> + <DataType> + <SimpleType type="datetime" /> + </DataType> + </Array> + </DataType> + </Struct> + </DataType> + </Action> + </Actions> + </Module> + + <Module name="extensionBlockDataPoints"> + <Actions> + <Action name="getNames"> + <DataType name="names"> + <Array> + <DataType> + <SimpleType type="string" /> + </DataType> + </Array> + </DataType> + </Action> + </Actions> + <Data> + <DataPoint name="firmwareVersion" + writable="false" + readable="true"> + <Doc> + This datapoint represents the firmware version of the extension block. + </Doc> + <DataType> + <SimpleType type="string" /> + </DataType> + </DataPoint> + + <DataPoint name="powerSwitchNames" + writable="false" + readable="true"> + <Doc> + This datapoint is an array of strings with the names of the contained devices. + </Doc> + <DataType> + <Array> + <DataType> + <SimpleType type="string" /> + </DataType> + </Array> + </DataType> + </DataPoint> + </Data> + </Module> + </Modules> + +<!-- Definition of sub-devices starts here. --> + + <SubDevices> + +<!-- This is the first power switch of the extension block. For sake of simplicity no new ModuleClasses are defined, but only referenced. +--> + + <SubDevice id="switch.power.1"> + <Doc> + This sub device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em> domain. + </Doc> + <Properties> + <Property name="Name" value="PowerSwitch 1"> + <SimpleType type="string" /> + </Property> + <Property name="Vendor" value="HGI"> + <SimpleType type="string" /> + </Property> + </Properties> + <Modules> + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </SubDevice> + +<!-- This is the second power switch of the extension block. --> + + <SubDevice id="switch.power.2"> + <Doc> + This sub device is intended as a demonstration of how to use the abstract modules defined in the <em>HGI Core</em> domain. + </Doc> + <Properties> + <Property name="Name" value="PowerSwitch 2"> + <SimpleType type="string" /> + </Property> + <Property name="Vendor" value="HGI"> + <SimpleType type="string" /> + </Property> + <Property name="VendorURL" value="http://homegatwaysinitiative.org"> + <SimpleType type="uri" /> + </Property> + <Property name="maximumAltitude" value="2800"> + <SimpleType type="integer" /> + </Property> + </Properties> + <Modules> + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </SubDevice> + + </SubDevices> + + </Device> + </Devices> +</Domain>