diff --git a/Links.md b/Links.md new file mode 100644 index 0000000000000000000000000000000000000000..2061efbc7f5a6fd3321b83433aa171ff58df97a6 --- /dev/null +++ b/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) +Free UML drawing tool +- **Apache Ant** : [http://ant.apache.org](http://ant.apache.org) +Build tool + + diff --git a/README.md b/README.md index 095ab9177c0ab10f3d0191b363594d38a8e5bb7a..d348fbf8f5ebd1db6e497c60114cd5a1f26ca93d 100644 --- a/README.md +++ b/README.md @@ -6,12 +6,24 @@ Note that this project runs under Apache 2.0 license. Read the [LICENSE](LICENSE Any contributions made to this project must comply with the forementioned license. ---- +## Content You can find further Information here: - [SDT Components](SDT_Components.md) -- [FAQ](FAQ.md) - [SDT Build System](SDT%20Build%20System.md) +- [FAQ](FAQ.md) +- [Links & References](Links.md) - [LICENSE](LICENSE) + +## Changes in 2.0 +- Introduced RootDevice to handle +- Added new data types (byte, float, array, enum, date, time, datetime, blob) +- Added attributes to data points (readable, eventable) +- Added otional ``<SerialNumber>``, ``<VendorURL>`` and ``<FirmwareVersion>`` elements to DeviceInfo +- Added optional ``<Doc>`` element to Event +- Added [UML diagram](SDT_Components.md) + + + diff --git a/SDT Build System.md b/SDT Build System.md index f5fedd86c7759638612e47125ae561c98d04cb57..58c713b012c5f345278e2ee1b4e0a383bd095926 100644 --- a/SDT Build System.md +++ b/SDT Build System.md @@ -1,16 +1,18 @@ # 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 **2.0** of the SDT. + ## Directory Structure and Important Files -- [SDT/schema/](SDT/schema/) : Base directory -- [SDT/schema/src/](SDT/schema/src/) : Source files of the SDT. - - [domain.rng](SDT/schema/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). +- [SDT/schema2.0/](SDT/schema2.0/) : Base directory +- [SDT/schema2.0/src/](SDT/schema2.0/src/) : Source files of the SDT. + - [domain.rng](SDT/schema2.0/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](SDT/schema/src/domain.xsd) : The SDT schema defintion that is generated from *domain.rng*. - - [xml.xsd](SDT/schema/src/xml.xsd) : General schema definitions for the SDT -- [SDT/schema/test/](SDT/schema/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/schema/build.xml](SDT/schema/build.xml) : This is the definition file for the ant build system. -- [SDT/schema/etc/](SDT/schema/etc/), [SDT/schema/lib/](SDT/schema/lib/), [SDT/schema/style/](SDT/schema/style/) : internal directories for the build system. Please, don't make unnecessary changes to these files. + - [domain.xsd](SDT/schema2.0/src/domain.xsd) : The SDT schema defintion that is generated from *domain.rng*. + - [xml.xsd](SDT/schema2.0/src/xml.xsd) : General schema definitions for the SDT +- [SDT/schema2.0/test/](SDT/schema2.0/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/schema2.0/build.xml](SDT/schema2.0/build.xml) : This is the definition file for the ant build system. +- [SDT/schema2.0/etc/](SDT/schema2.02.0/etc/), [SDT/schema2.0/lib/](SDT/schema2.0/lib/), [SDT/schema2.0/style/](SDT/schema2.0/style/) : internal directories for the build system. Please, don't make unnecessary changes to these files. ## Installation - Install Java on your computer @@ -23,7 +25,7 @@ This document describes the SDT build system and how to build the SDT and valida After cloning the repository go to the directoy *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/schema/src/domain.rng](SDT/schema/src/domain.rng) and writes it to [SDT/schema/src/domain.xsd](SDT/schema/src/domain.xsd) +Running *ant* without any parameter builds the schema definition from the rng-definition [SDT/schema/src/domain.rng](SDT/schema2.0/src/domain.rng) and writes it to [SDT/schema/src/domain.xsd](SDT/schema/src/domain.xsd) $ cd SDT/schema $ ant @@ -44,3 +46,21 @@ Otherwise you most likely receive a stacktrace. Search the output for the line * >[schemavalidate] /Users/someone/Sources/git/RWD050/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](SDT/schema2.0/src/domain.rng) and converted to the XML schema definition [domain.xsd](SDT/schema2.0/src/domain.xsd) during the build process. + +**All changes to the schema must therefore be made in [domain.rng](SDT/schema2.0/src/domain.rng), NOT [domain.xsd](SDT/schema2.0/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/schema2.0/build.xml](SDT/schema2.0/build.xml) +e.g. in the *ant* target "validate" +- [SDT/schema2.0/etc/dal.rnc](SDT/schema2.0/etc/dal.rnc) +e.g. the entry "default namespace xsl" +- [SDT/schema2.0/etc/schema.xmlns](SDT/schema2.0/etc/schema.xmlns) +- [SDT/schema2.0/etc/schemas.xml](SDT/schema2.0/etc/schemas.xml) diff --git a/SDT/schema/test/mseeb.xml b/SDT/schema/test/mseeb.xml new file mode 100644 index 0000000000000000000000000000000000000000..e61a83fb10e790e99b3c914292c055a0a945b19f --- /dev/null +++ b/SDT/schema/test/mseeb.xml @@ -0,0 +1,200 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<!--tabstop: 4 --> + +<!-- + ++................................................+ +:Domain:org.hgi : +: : +: +..........................................+ : +: :Module:BooleanState : : +: : : : +: : +....................................+ : : +: : :Action:get : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Action:setTarget : : : +: : +....................................+ : : +: +..........................................+ : +: : +: +..........................................+ : +: :RootDevice:MSEEB.root : : +: : : : +: : +....................................+ : : +: : :Module<REF>:BooleanState : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Module:extensionBlockDataPoints : : : +: : : : : : +: : : +..............................+ : : : +: : : :DataPoint:firmwareVersion : : : : +: : : +..............................+ : : : +: : : : : : +: : : +..............................+ : : : +: : : :DataPoint:powerSwitchNames : : : : +: : : +..............................+ : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Devices : : : +: : : : : : +: : : +..............................+ : : : +: : : :Device:switch.power.1 : : : : +: : : : : : : : +: : : :+...........................+ : : : : +: : : ::Module<REF>:BooleanState : : : : : +: : : :+...........................+ : : : : +: : : +..............................+ : : : +: : : : : : +: : : +..............................+ : : : +: : : :Device:switch.power.2 : : : : +: : : : : : : : +: : : :+...........................+ : : : : +: : : ::Module<REF>:BooleanState : : : : : +: : : :+...........................+ : : : : +: : : +..............................+ : : : +: : +....................................+ : : +: +..........................................+ : ++................................................+ + +--> +<Domain xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://hgi.org/xml/dal/2.0" + id="org.hgi"> + + + <Modules> + + +<!-- The following module should be imported from dal-core.xml. + + <Imports> + <xi:include href="./dal-core.xml" parse="xml" /> + </Imports> + + It is included directly for tangibility. + It is still referenced in this XML via + "<extends domain="hgi.dal.core" class="BooleanState"/>" +--> + + <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" type="boolean"> + <Doc> + Obtain the current associated state. + </Doc> + </Action> + <Action name="setTarget"> + <Doc> + Set the associated state to the specified value. + </Doc> + <Arg name="value" type="boolean"> + <Doc> + The desired value of the associated state. + </Doc> + </Arg> + </Action> + </Actions> + </ModuleClass> + </Modules> + +<!-- Definition of the Root Device starts here. --> + + <RootDevices> + +<!-- The Root Device contains several sub-devices and offers one action on its own. --> + + <RootDevice id="MSEEB.root"> + <DeviceInfo> + <Name>Multi Socket Electrical-Extension-Block</Name> + <Vendor>HGI</Vendor> + </DeviceInfo> + <Doc> + This device is intended as a demonstration of how to define a Root Device with multiple sub-devices. + </Doc> + +<!-- These are the modules for the root 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"> + <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> + </Module> + + <Module name="extensionBlockDataPoints"> + <Data> + <DataPoint name="firmwareVersion" + type="String" + writeable="false"> + <Doc> + This datapoint represents the firmware version of the extension block. + </Doc> + </DataPoint> + + <DataPoint name="powerSwitchNames" + type="StringArray" + writeable="false"> + <Doc> + This datapoint is an array of strings with the names of the contained devices. + </Doc> + </DataPoint> + </Data> + </Module> + </Modules> + +<!-- Definition of sub-devices starts here. --> + + <Devices> + +<!-- This is the first power switch of the extension block. For sake of simplicity no new ModuleClasses are defined, but only referenced. +--> + + <Device id="switch.power.1"> + <DeviceInfo> + <Name>PowerSwitch 1</Name> + <Vendor>HGI</Vendor> + </DeviceInfo> + <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> + <Modules> + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </Device> + +<!-- This is the seconcd power switch of the extension block. --> + + <Device id="switch.power.2"> + <DeviceInfo> + <Name>PowerSwitch 2</Name> + <Vendor>HGI</Vendor> + </DeviceInfo> + <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> + <Modules> + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </Device> + + </Devices> + + </RootDevice> + </RootDevices> +</Domain> diff --git a/SDT/schema2.0/build.xml b/SDT/schema2.0/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..38d73d721290489fbed147288a832adde76e7281 --- /dev/null +++ b/SDT/schema2.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://hgi.org/xml/dal/2.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/schema2.0/etc/XInclude.xsd b/SDT/schema2.0/etc/XInclude.xsd new file mode 100644 index 0000000000000000000000000000000000000000..8fbe0c8ee4a086074cdca852f6a5b656d73bcd05 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/XMLSchema-datatypes.xsd b/SDT/schema2.0/etc/XMLSchema-datatypes.xsd new file mode 100644 index 0000000000000000000000000000000000000000..574949db19c49daca2077543c9c30c73d427068b --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/XMLSchema.dtd b/SDT/schema2.0/etc/XMLSchema.dtd new file mode 100644 index 0000000000000000000000000000000000000000..e8e8f7625a994596f8ade6565b9711398fb502b5 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/XMLSchema.xsd b/SDT/schema2.0/etc/XMLSchema.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2e9a2729ec5dcf3cba092c68cbe82de0d4527903 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/anttasks.xml b/SDT/schema2.0/etc/anttasks.xml new file mode 100644 index 0000000000000000000000000000000000000000..a2035d59f811636b86e83c9e00cd67c2f7afb3ff --- /dev/null +++ b/SDT/schema2.0/etc/anttasks.xml @@ -0,0 +1,39 @@ +<?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> + +<!-- BND tool --> +<taskdef resource="aQute/bnd/ant/taskdef.properties"> + <classpath> + <pathelement location="${path.libs}/ant/bnd-0.0.378.jar"/> + </classpath> +</taskdef> + +<!-- Set the log level --> +<taskdef name="setloglevel" + classname="de.berkom.ehome.tools.ant.setloglevel.SetLogLevel" + classpath="${path.libs}/ant/antSetLogLevel.jar"/> + +<!-- Ant Thinlet Dialog --> +<taskdef name="dialog" + classname="de.berkom.ehome.tools.ant.dialog.Dialog" + classpath="${path.libs}/ant/antDialog.jar"/> + +<!-- SVN Library --> +<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml"> + <classpath> + <pathelement location="${path.libs}/ant/svnant.jar"/> + <pathelement location="${path.libs}/ant/svnClientAdapter.jar"/> + <pathelement location="${path.libs}/ant/svnjavahl.jar"/> + </classpath> +</taskdef> + +</project> + diff --git a/SDT/schema2.0/etc/common.xml b/SDT/schema2.0/etc/common.xml new file mode 100644 index 0000000000000000000000000000000000000000..c05a65e7966231a0e874e8f25c48e41362e69b7b --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/dal.rnc b/SDT/schema2.0/etc/dal.rnc new file mode 100644 index 0000000000000000000000000000000000000000..735196ad3839b8ec1d1b45d7fb3cf550c8c74a2f --- /dev/null +++ b/SDT/schema2.0/etc/dal.rnc @@ -0,0 +1,15 @@ + +namespace local = "" +default namespace xsl = "http://hgi.org/xml/dal/2.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/schema2.0/etc/default.properties b/SDT/schema2.0/etc/default.properties new file mode 100644 index 0000000000000000000000000000000000000000..6c1e9ad0f26632f0d0c7375c229a08b02eef79e0 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/domain.rnc b/SDT/schema2.0/etc/domain.rnc new file mode 100644 index 0000000000000000000000000000000000000000..7a4248a0999837d030330e9e76d04a67e5f798ca --- /dev/null +++ b/SDT/schema2.0/etc/domain.rnc @@ -0,0 +1,116 @@ +start = Domain + +Domain = + element Domain { + # still having some problems with included documents ... + # the included document is given the attribute xml:base ... + # but my schema does not permit this ... + # + # This almost generates the correct schema ... but it + # doesn't have the correct schemaLocation + # + # <attribute ns="http://www.w3.org/XML/1998/namespace" name="base"> <data type="anyURI"/> + # </attribute> + attribute xml:base { xsd:anyURI }?, + attribute id { xsd:ID }, + Imports, + element Modules { + element ModuleClass { ModuleDef }* + }?, + element RootDevices { + element RootDevice { + attribute id { xsd:Name }, + DeviceInfo, + Doc, + Modules?, + element Devices { + element Device { DeviceDef }* + }? + }* + }? + } +DeviceDef = + attribute id { xsd:Name }, + DeviceInfo, + Doc, + Modules? +DeviceInfo = + element DeviceInfo { + element Name { text } + & element Vendor { text } + & element FirmwareVersion { text }? + & element SerialNumber { text }? + & element VendorURL { xsd:anyURI }? + } +DataType = + "integer" + | "boolean" + | "string" + | "byte" + | "float" + | "array" + | "enum" + | "date" + | "time" + | "datetime" + | "blob" +DocText = + (text + | element em { text } + | element b { text } + | element tt { text })* +Doc = + element Doc { + DocText + | (element p { DocText } + | element img { + attribute src { text }, + element caption { text } + })* + }? +ModuleDef = + attribute name { text }, + element extends { + attribute domain { xsd:IDREF }, + attribute class { text } + }?, + Doc, + Actions?, + Data?, + Events? +Modules = + element Modules { + element Module { ModuleDef }* + } +Actions = + element Actions { + element Action { + attribute name { text }, + attribute type { DataType }?, + Doc, + element Arg { + attribute name { text }, + attribute type { DataType }, + Doc + }* + }* + } +Data = + element Data { + element DataPoint { + attribute name { text }, + attribute type { DataType }?, + attribute writable { xsd:boolean }?, + attribute readable { xsd:boolean }?, + attribute eventable { xsd:boolean }?, + Doc + }* + } +Events = + element Events { + element Event { + attribute name { text }, + Data, + Doc + }* + } diff --git a/SDT/schema2.0/etc/properties.xml b/SDT/schema2.0/etc/properties.xml new file mode 100644 index 0000000000000000000000000000000000000000..ce8aba6bd44a74c609b638b4d82424b492fbe3b0 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/schema.xmlns b/SDT/schema2.0/etc/schema.xmlns new file mode 100644 index 0000000000000000000000000000000000000000..619292d6925966723981428e653c1a6d18a6f817 --- /dev/null +++ b/SDT/schema2.0/etc/schema.xmlns @@ -0,0 +1,4 @@ +targetNamespace="http://hgi.org/xml/dal/2.0" + xmlns="http://hgi.org/xml/dal/2.0" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + diff --git a/SDT/schema2.0/etc/schemas.xml b/SDT/schema2.0/etc/schemas.xml new file mode 100644 index 0000000000000000000000000000000000000000..a92a4e9d57a85468595b4f55d82b9cc67af96515 --- /dev/null +++ b/SDT/schema2.0/etc/schemas.xml @@ -0,0 +1,9 @@ +<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> + + <namespace ns="http://hgi.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/schema2.0/etc/tasks/_addPrivateLibs.xml b/SDT/schema2.0/etc/tasks/_addPrivateLibs.xml new file mode 100644 index 0000000000000000000000000000000000000000..b6a4fcad28e10ae82d353881e8433be9c4513be7 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_buildNative.xml b/SDT/schema2.0/etc/tasks/_buildNative.xml new file mode 100644 index 0000000000000000000000000000000000000000..2d03b5dea4c6dcdeb9937d8060f4dcfb1bf758fc --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_checkDependentProjects.xml b/SDT/schema2.0/etc/tasks/_checkDependentProjects.xml new file mode 100644 index 0000000000000000000000000000000000000000..6ad985573a996e31702c7a2fd60610f9a5b0bd0f --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_cleanDependentProjects.xml b/SDT/schema2.0/etc/tasks/_cleanDependentProjects.xml new file mode 100644 index 0000000000000000000000000000000000000000..851233972d0b0a7bc1cc7f91ba6d43aa131e2a75 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_getBuildNumber.xml b/SDT/schema2.0/etc/tasks/_getBuildNumber.xml new file mode 100644 index 0000000000000000000000000000000000000000..ea24ad5ffa9e8948cdb09abf0d2ef28d4bbf535b --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_handleProjectProperties.xml b/SDT/schema2.0/etc/tasks/_handleProjectProperties.xml new file mode 100644 index 0000000000000000000000000000000000000000..4bccaa8b7d14da65300543fb336a4f48e54f6ce5 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_importManifest.xml b/SDT/schema2.0/etc/tasks/_importManifest.xml new file mode 100644 index 0000000000000000000000000000000000000000..84097da891db3231afeb57446521dc25d37f2c1f --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_includeExternalResourcesInJar.xml b/SDT/schema2.0/etc/tasks/_includeExternalResourcesInJar.xml new file mode 100644 index 0000000000000000000000000000000000000000..b03ab105d4fae133c4604c02c546f4f417a785b5 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_prepare.xml b/SDT/schema2.0/etc/tasks/_prepare.xml new file mode 100644 index 0000000000000000000000000000000000000000..0658dffe73ee7c1cd0a61127db64d3c51dae9238 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_preparebuild.xml b/SDT/schema2.0/etc/tasks/_preparebuild.xml new file mode 100644 index 0000000000000000000000000000000000000000..3df6082e757a557c57d0f6745267406549845467 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/_setClassPath.xml b/SDT/schema2.0/etc/tasks/_setClassPath.xml new file mode 100644 index 0000000000000000000000000000000000000000..bebe50b7a56ed333822a6048494eec68485c3c3f --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/all.xml b/SDT/schema2.0/etc/tasks/all.xml new file mode 100644 index 0000000000000000000000000000000000000000..1859e09fe7bcc18b5f7f726bfdddb056976c2958 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/allforced.xml b/SDT/schema2.0/etc/tasks/allforced.xml new file mode 100644 index 0000000000000000000000000000000000000000..32f73751b478cf800e7623f3bebee89c55f71a2c --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/build.xml b/SDT/schema2.0/etc/tasks/build.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b87b3e0bdbfa8cff9e3eb73f122f6d7734e6d65 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/buildjar.xml b/SDT/schema2.0/etc/tasks/buildjar.xml new file mode 100644 index 0000000000000000000000000000000000000000..119545a2ba817a6dc1b8aaaa4dfbc544a4620536 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/clean.xml b/SDT/schema2.0/etc/tasks/clean.xml new file mode 100644 index 0000000000000000000000000000000000000000..8d86e0be8f13e14fc9914ad1b67562a383fd0e62 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/collect.xml b/SDT/schema2.0/etc/tasks/collect.xml new file mode 100644 index 0000000000000000000000000000000000000000..f34e547012a667cd0d9d1472ff2280bca44e92c9 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/compile.xml b/SDT/schema2.0/etc/tasks/compile.xml new file mode 100644 index 0000000000000000000000000000000000000000..74f5382884758226bba2dfd809dbecf4dab40b3b --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/compilenative.xml b/SDT/schema2.0/etc/tasks/compilenative.xml new file mode 100644 index 0000000000000000000000000000000000000000..8ad51f72712afe00f61c900bfc288d368533eca2 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/doc.xml b/SDT/schema2.0/etc/tasks/doc.xml new file mode 100644 index 0000000000000000000000000000000000000000..add2e25f7a066fafdcd73de61647bfbe6a796b09 --- /dev/null +++ b/SDT/schema2.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/schema2.0/etc/tasks/eclipse.xml b/SDT/schema2.0/etc/tasks/eclipse.xml new file mode 100644 index 0000000000000000000000000000000000000000..bbab65e89cbbc2326cbe46aeb7afb379d52e7560 --- /dev/null +++ b/SDT/schema2.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/schema2.0/gen/html/com.telekom/index.html b/SDT/schema2.0/gen/html/com.telekom/index.html new file mode 100644 index 0000000000000000000000000000000000000000..3a35cfa4f717c342ca2c45cc41563201c954bbcf --- /dev/null +++ b/SDT/schema2.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/schema2.0/gen/html/com.telekom/switch.power.html b/SDT/schema2.0/gen/html/com.telekom/switch.power.html new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/SDT/schema2.0/gen/html/dal-core.html b/SDT/schema2.0/gen/html/dal-core.html new file mode 100644 index 0000000000000000000000000000000000000000..89a325edfb1bba8e2a7ece8f8475e9285ecfe5df --- /dev/null +++ b/SDT/schema2.0/gen/html/dal-core.html @@ -0,0 +1 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> diff --git a/SDT/schema2.0/gen/html/hgi.dal.core/index.html b/SDT/schema2.0/gen/html/hgi.dal.core/index.html new file mode 100644 index 0000000000000000000000000000000000000000..456cbf8c1f0cc2779533792f5f42a084e9e84b10 --- /dev/null +++ b/SDT/schema2.0/gen/html/hgi.dal.core/index.html @@ -0,0 +1,10 @@ +<?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 hgi.dal.core</title> +</head> +<body> +<h1>Domain hgi.dal.core</h1> +<h2>Devices</h2> +<ul/> +</body> +</html> diff --git a/SDT/schema2.0/lib/ant/ant-contrib-1.0b3.jar b/SDT/schema2.0/lib/ant/ant-contrib-1.0b3.jar new file mode 100644 index 0000000000000000000000000000000000000000..062537661a514c2ce97d18948f4f25f7226cc1a0 Binary files /dev/null and b/SDT/schema2.0/lib/ant/ant-contrib-1.0b3.jar differ diff --git a/SDT/schema2.0/lib/ant/antDialog.jar b/SDT/schema2.0/lib/ant/antDialog.jar new file mode 100644 index 0000000000000000000000000000000000000000..a4a294ad407350638b4e34643d841abb50c3cd24 Binary files /dev/null and b/SDT/schema2.0/lib/ant/antDialog.jar differ diff --git a/SDT/schema2.0/lib/ant/antSetLogLevel.jar b/SDT/schema2.0/lib/ant/antSetLogLevel.jar new file mode 100644 index 0000000000000000000000000000000000000000..59e6a22d692662b8a19139ae484aac6dacecde9c Binary files /dev/null and b/SDT/schema2.0/lib/ant/antSetLogLevel.jar differ diff --git a/SDT/schema2.0/lib/ant/bnd-0.0.378.jar b/SDT/schema2.0/lib/ant/bnd-0.0.378.jar new file mode 100644 index 0000000000000000000000000000000000000000..a6924eefde7a38299c7690fb812de883305a2f06 Binary files /dev/null and b/SDT/schema2.0/lib/ant/bnd-0.0.378.jar differ diff --git a/SDT/schema2.0/lib/ant/svnClientAdapter.jar b/SDT/schema2.0/lib/ant/svnClientAdapter.jar new file mode 100644 index 0000000000000000000000000000000000000000..ed37ba467147596fde3c7ae73d1cde4cbf788626 Binary files /dev/null and b/SDT/schema2.0/lib/ant/svnClientAdapter.jar differ diff --git a/SDT/schema2.0/lib/ant/svnant.jar b/SDT/schema2.0/lib/ant/svnant.jar new file mode 100644 index 0000000000000000000000000000000000000000..af52be0de6b8d504d807023eb592c16bfe8b219c Binary files /dev/null and b/SDT/schema2.0/lib/ant/svnant.jar differ diff --git a/SDT/schema2.0/lib/ant/svnjavahl.jar b/SDT/schema2.0/lib/ant/svnjavahl.jar new file mode 100644 index 0000000000000000000000000000000000000000..71873057866091c4bd5edda26e879ab0c1c9a778 Binary files /dev/null and b/SDT/schema2.0/lib/ant/svnjavahl.jar differ diff --git a/SDT/schema2.0/lib/trang.jar b/SDT/schema2.0/lib/trang.jar new file mode 100644 index 0000000000000000000000000000000000000000..b3d3de14794b34d79af3523bf56a2cb40f7e07ee Binary files /dev/null and b/SDT/schema2.0/lib/trang.jar differ diff --git a/SDT/schema2.0/properties b/SDT/schema2.0/properties new file mode 100644 index 0000000000000000000000000000000000000000..9ecd260ab42950151f29291dfd8899d621604c97 --- /dev/null +++ b/SDT/schema2.0/properties @@ -0,0 +1 @@ +loglevel=debug diff --git a/SDT/schema2.0/src/domain.rng b/SDT/schema2.0/src/domain.rng new file mode 100644 index 0000000000000000000000000000000000000000..1e0caca7fc589f5ab1f3aec94dbb204fe40425cc --- /dev/null +++ b/SDT/schema2.0/src/domain.rng @@ -0,0 +1,292 @@ +<grammar xmlns="http://relaxng.org/ns/structure/1.0" + datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> + + + <start> + <ref name="Domain"/> + </start> + + <define name="Imports"> + <optional> + <element name="Imports"> + <zeroOrMore> + <ref name="Domain"/> + </zeroOrMore> + </element> + </optional> + </define> + + <define name="Domain"> + <element name="Domain"> + <optional> + + <!-- still having some problems with included documents ... + the included document is given the attribute xml:base ... + but my schema does not permit this ... + + This almost generates the correct schema ... but it + doesn't have the correct schemaLocation + + <attribute ns="http://www.w3.org/XML/1998/namespace" name="base"> <data type="anyURI"/> + </attribute> + --> + + <attribute name="xml:base"> + <data type="anyURI"/> + </attribute> + </optional> + <attribute name="id"> + <data type="ID"/> + </attribute> + <ref name="Imports"/> + <optional> + <element name="Modules"> + <zeroOrMore> + <element name="ModuleClass"> + <ref name="ModuleDef"/> + </element> + </zeroOrMore> + </element> + </optional> + <optional> + <element name="RootDevices"> + <zeroOrMore> + <element name="RootDevice"> + <attribute name="id"> + <data type="Name"/> + </attribute> + <ref name="DeviceInfo"/> + <ref name="Doc"/> + <optional> + <ref name="Modules"/> + </optional> + <optional> + <element name="Devices"> + <zeroOrMore> + <element name="Device"> + <ref name="DeviceDef"/> + </element> + </zeroOrMore> + </element> + </optional> + </element> + </zeroOrMore> + </element> + </optional> + </element> + </define> + + <define name="DeviceDef"> + <attribute name="id"> + <data type="Name"/> + </attribute> + <ref name="DeviceInfo"/> + <ref name="Doc"/> + <optional> + <ref name="Modules"/> + </optional> + </define> + + + <define name="DeviceInfo"> + <element name="DeviceInfo"> + <interleave> + <element name="Name"> + <text/> + </element> + <element name="Vendor"> + <text/> + </element> + <optional> + <element name="FirmwareVersion"> + <text/> + </element> + </optional> + <optional> + <element name="SerialNumber"> + <text/> + </element> + </optional> + <optional> + <element name="VendorURL"> + <data type="anyURI"/> + </element> + </optional> + </interleave> + </element> + </define> + + + <define name="DataType"> + <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> + </choice> + </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> + + + <define name="Doc"> + <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> + <element name="extends"> + <attribute name="domain"> + <data type="IDREF"/> + </attribute> + <attribute name="class"/> + </element> + </optional> + <ref name="Doc"/> + <optional> + <ref name="Actions"/> + </optional> + <optional> + <ref name="Data"/> + </optional> + <optional> + <ref name="Events"/> + </optional> + </define> + + + <define name="Modules"> + <element name="Modules"> + <zeroOrMore> + <element name="Module"> + <ref name="ModuleDef"/> + </element> + </zeroOrMore> + </element> + </define> + + + <define name="Actions"> + <element name="Actions"> + <zeroOrMore> + <element name="Action"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="type"> + <ref name="DataType"/> + </attribute> + </optional> + <ref name="Doc"/> + <zeroOrMore> + <element name="Arg"> + <attribute name="name"/> + <attribute name="type"> + <ref name="DataType"/> + </attribute> + <ref name="Doc"/> + </element> + </zeroOrMore> + </element> + </zeroOrMore> + </element> + </define> + + + <define name="Data"> + <element name="Data"> + <zeroOrMore> + <element name="DataPoint"> + <attribute name="name"> + <text/> + </attribute> + <optional> + <attribute name="type"> + <ref name="DataType"/> + </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="Doc"/> + </element> + </zeroOrMore> + </element> + </define> + + + <define name="Events"> + <element name="Events"> + <zeroOrMore> + <element name="Event"> + <attribute name="name"> + <text/> + </attribute> + <ref name="Data" /> + <ref name="Doc"/> + </element> + </zeroOrMore> + </element> + </define> + + +</grammar> + diff --git a/SDT/schema2.0/src/domain.xsd b/SDT/schema2.0/src/domain.xsd new file mode 100644 index 0000000000000000000000000000000000000000..f8b8ca421fd999cacd2d97cc104ab6bbb5e66dc8 --- /dev/null +++ b/SDT/schema2.0/src/domain.xsd @@ -0,0 +1,226 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema targetNamespace="http://hgi.org/xml/dal/2.0" + xmlns="http://hgi.org/xml/dal/2.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:group name="Imports"> + <xs:sequence> + <xs:element minOccurs="0" ref="Imports"/> + </xs:sequence> + </xs:group> + <xs:element name="Imports"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="Domain"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Domain"> + <xs:complexType> + <xs:sequence> + <xs:group ref="Imports"/> + <xs:element minOccurs="0" name="Modules"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="ModuleClass"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element minOccurs="0" ref="RootDevices"/> + </xs:sequence> + <xs:attribute ref="xml:base"/> + <xs:attribute name="id" use="required" type="xs:ID"/> + </xs:complexType> + </xs:element> + <xs:element name="ModuleClass" type="ModuleDef"/> + <xs:element name="RootDevices"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="RootDevice"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="RootDevice"> + <xs:complexType> + <xs:sequence> + <xs:element ref="DeviceInfo"/> + <xs:group ref="Doc"/> + <xs:element minOccurs="0" ref="Modules"/> + <xs:element minOccurs="0" ref="Devices"/> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:Name"/> + </xs:complexType> + </xs:element> + <xs:element name="Devices"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="Device"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Device" type="DeviceDef"/> + <xs:complexType name="DeviceDef"> + <xs:sequence> + <xs:element ref="DeviceInfo"/> + <xs:group ref="Doc"/> + <xs:element minOccurs="0" ref="Modules"/> + </xs:sequence> + <xs:attribute name="id" use="required" type="xs:Name"/> + </xs:complexType> + <xs:element name="DeviceInfo"> + <xs:complexType> + <xs:all> + <xs:element ref="Name"/> + <xs:element ref="Vendor"/> + <xs:element minOccurs="0" ref="FirmwareVersion"/> + <xs:element minOccurs="0" ref="SerialNumber"/> + <xs:element minOccurs="0" ref="VendorURL"/> + </xs:all> + </xs:complexType> + </xs:element> + <xs:element name="Name" type="xs:string"/> + <xs:element name="Vendor" type="xs:string"/> + <xs:element name="FirmwareVersion" type="xs:string"/> + <xs:element name="SerialNumber" type="xs:string"/> + <xs:element name="VendorURL" type="xs:anyURI"/> + <xs:simpleType name="DataType"> + <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:restriction> + </xs:simpleType> + <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"/> + <xs:group name="Doc"> + <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="Doc"/> + <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: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 minOccurs="0" 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 minOccurs="0" maxOccurs="unbounded" ref="Action"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Action"> + <xs:complexType> + <xs:sequence> + <xs:group ref="Doc"/> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="Arg"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + <xs:attribute name="type" type="DataType"/> + </xs:complexType> + </xs:element> + <xs:element name="Arg"> + <xs:complexType> + <xs:group ref="Doc"/> + <xs:attribute name="name" use="required"/> + <xs:attribute name="type" use="required" type="DataType"/> + </xs:complexType> + </xs:element> + <xs:element name="Data"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="DataPoint"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="DataPoint"> + <xs:complexType> + <xs:group ref="Doc"/> + <xs:attribute name="name" use="required"/> + <xs:attribute name="type" type="DataType"/> + <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 minOccurs="0" maxOccurs="unbounded" ref="Event"/> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="Event"> + <xs:complexType> + <xs:sequence> + <xs:element ref="Data"/> + <xs:group ref="Doc"/> + </xs:sequence> + <xs:attribute name="name" use="required"/> + </xs:complexType> + </xs:element> +</xs:schema> diff --git a/SDT/schema2.0/src/xml.xsd b/SDT/schema2.0/src/xml.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d60043f94c9aba9e189a37fcb30ebdfe83ccd71b --- /dev/null +++ b/SDT/schema2.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/schema2.0/style/html.xsl b/SDT/schema2.0/style/html.xsl new file mode 100644 index 0000000000000000000000000000000000000000..c7fab6ec30ecb76b0ee54359b850d089522fba0f --- /dev/null +++ b/SDT/schema2.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://hgi.org/xml/dal/1.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/schema2.0/test/dal-core.xml b/SDT/schema2.0/test/dal-core.xml new file mode 100644 index 0000000000000000000000000000000000000000..beb3a80e67632a40dcde6963b1b27178a9720ef8 --- /dev/null +++ b/SDT/schema2.0/test/dal-core.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<Domain xmlns="http://hgi.org/xml/dal/2.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" type="boolean"> + <Doc> + Obtain the current associated state. + </Doc> + </Action> + <Action name="setTarget"> + <Doc> + Set the associated state to the specified value. + </Doc> + <Arg name="value" type="boolean"> + <Doc> + The desired value of the associated state. + </Doc> + </Arg> + </Action> + </Actions> + </ModuleClass> + </Modules> + +</Domain> diff --git a/SDT/schema2.0/test/dal-eg.xml b/SDT/schema2.0/test/dal-eg.xml new file mode 100644 index 0000000000000000000000000000000000000000..afe7bb9e39393504017f3cdfdbbb6217b7da67a4 --- /dev/null +++ b/SDT/schema2.0/test/dal-eg.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<Domain xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://hgi.org/xml/dal/2.0" + id="com.telekom"> + + <Imports> + <xi:include href="./dal-core.xml" parse="xml" /> + </Imports> + + <Modules> + </Modules> + + <RootDevices> + + <RootDevice id="switch.power"> + <DeviceInfo> + <Name>PowerSwitch</Name> + <!-- The Vendor field should probably be part of the domain --> + <Vendor>Telekom Innovation Laboratories</Vendor> + </DeviceInfo> + + <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> + + <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" type="string"> + <Doc> + Query the state of the switch. Returns the string "<tt>on</tt>" + or "<tt>off</tt>". + </Doc> + </Action> + </Actions> + + <Events> + <Event name="switchEvent"> + <Data> + <DataPoint name="state" type="boolean" writable="false"> + </DataPoint> + </Data> + <Doc>An event that indicates the new state of the switch. + </Doc> + </Event> + </Events> + </Module> + + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </RootDevice> + </RootDevices> +</Domain> diff --git a/SDT/schema2.0/test/mseeb.xml b/SDT/schema2.0/test/mseeb.xml new file mode 100644 index 0000000000000000000000000000000000000000..aaec601b196b6ffa0a339baf761927745a270200 --- /dev/null +++ b/SDT/schema2.0/test/mseeb.xml @@ -0,0 +1,195 @@ +<?xml version="1.0" encoding="iso-8859-1"?> + +<!--tabstop: 4 --> + +<!-- + ++................................................+ +:Domain:org.hgi : +: : +: +..........................................+ : +: :Module:BooleanState : : +: : : : +: : +....................................+ : : +: : :Action:get : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Action:setTarget : : : +: : +....................................+ : : +: +..........................................+ : +: : +: +..........................................+ : +: :RootDevice:MSEEB.root : : +: : : : +: : +....................................+ : : +: : :Module<REF>:BooleanState : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Module:extensionBlockDataPoints : : : +: : : : : : +: : : +..............................+ : : : +: : : :DataPoint:firmwareVersion : : : : +: : : +..............................+ : : : +: : : : : : +: : : +..............................+ : : : +: : : :DataPoint:powerSwitchNames : : : : +: : : +..............................+ : : : +: : +....................................+ : : +: : : : +: : +....................................+ : : +: : :Devices : : : +: : : : : : +: : : +..............................+ : : : +: : : :Device:switch.power.1 : : : : +: : : : : : : : +: : : :+...........................+ : : : : +: : : ::Module<REF>:BooleanState : : : : : +: : : :+...........................+ : : : : +: : : +..............................+ : : : +: : : : : : +: : : +..............................+ : : : +: : : :Device:switch.power.2 : : : : +: : : : : : : : +: : : :+...........................+ : : : : +: : : ::Module<REF>:BooleanState : : : : : +: : : :+...........................+ : : : : +: : : +..............................+ : : : +: : +....................................+ : : +: +..........................................+ : ++................................................+ + +--> +<Domain xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://hgi.org/xml/dal/2.0" + id="org.hgi"> + +<!-- 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" type="boolean"> + <Doc> + Obtain the current associated state. + </Doc> + </Action> + <Action name="setTarget"> + <Doc> + Set the associated state to the specified value. + </Doc> + <Arg name="value" type="boolean"> + <Doc> + The desired value of the associated state. + </Doc> + </Arg> + </Action> + </Actions> + </ModuleClass> + </Modules> + +<!-- Definition of the Root Device starts here. --> + + <RootDevices> + +<!-- The Root Device contains several sub-devices and offers one action on its own. --> + + <RootDevice id="MSEEB.root"> + <DeviceInfo> + <Name>Multi Socket Electrical-Extension-Block</Name> + <Vendor>HGI</Vendor> + <FirmwareVersion>1.0</FirmwareVersion> + <VendorURL>http://www.homegatewayinitative.org</VendorURL> + <SerialNumber>1234.5</SerialNumber> + </DeviceInfo> + <Doc> + This device is intended as a demonstration of how to define a Root Device with multiple sub-devices. + </Doc> + +<!-- These are the modules for the root 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"> + <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> + </Module> + + <Module name="extensionBlockDataPoints"> + <Data> + <DataPoint name="firmwareVersion" + type="string" + writable="false"> + <Doc> + This datapoint represents the firmware version of the extension block. + </Doc> + </DataPoint> + + <DataPoint name="powerSwitchNames" + type="array" + writable="false"> + <Doc> + This datapoint is an array of strings with the names of the contained devices. + </Doc> + </DataPoint> + </Data> + </Module> + </Modules> + +<!-- Definition of sub-devices starts here. --> + + <Devices> + +<!-- This is the first power switch of the extension block. For sake of simplicity no new ModuleClasses are defined, but only referenced. +--> + + <Device id="switch.power.1"> + <DeviceInfo> + <Name>PowerSwitch 1</Name> + <Vendor>HGI</Vendor> + </DeviceInfo> + <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> + <Modules> + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </Device> + +<!-- This is the seconcd power switch of the extension block. --> + + <Device id="switch.power.2"> + <DeviceInfo> + <Name>PowerSwitch 2</Name> + <Vendor>HGI</Vendor> + </DeviceInfo> + <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> + <Modules> + <Module name="power"> + <extends domain="hgi.dal.core" class="BooleanState"/> + </Module> + </Modules> + </Device> + + </Devices> + + </RootDevice> + </RootDevices> +</Domain> diff --git a/SDT_Components.md b/SDT_Components.md new file mode 100644 index 0000000000000000000000000000000000000000..f4c7d81d70ee9b90eb0c8c214b0e70b0b9b925e7 --- /dev/null +++ b/SDT_Components.md @@ -0,0 +1,34 @@ +# SDT Components +In this document an overview about the SDT 2.0 ødefinitions and component hierarchy is given. + +## SDT Overview +The followng UML diagram presents an overview about the SDT components. + + + +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 + +### Domain + +### RootDevice +#### DeviceInfo + +### Device + +### Module, ModuleClass, ModuleDef + +### Action + +### Data +#### DataPoint + +### Event + + + + diff --git a/SDT_UML.uxf b/SDT_UML.uxf new file mode 100644 index 0000000000000000000000000000000000000000..597e7675011d4afb5a6bd75acc6f2067ab289e97 --- /dev/null +++ b/SDT_UML.uxf @@ -0,0 +1,572 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<diagram program="umlet" version="13.2"> + <zoom_level>10</zoom_level> + <element> + <id>UMLClass</id> + <coordinates> + <x>360</x> + <y>190</y> + <w>150</w> + <h>130</h> + </coordinates> + <panel_attributes>ModuleDef +-- +*@ name : text* +/- extends: Extends/ +/- Doc : Doc/ +/- Actions : Actions/ +/- Data : Data/ +/- Events : Events/ +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>610</x> + <y>280</y> + <w>140</w> + <h>100</h> + </coordinates> + <panel_attributes>Action +-- +*@ name : text* +/@ type : DataType/ +/- Doc : Doc/ +/- Arg : Arg/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>500</x> + <y>190</y> + <w>130</w> + <h>70</h> + </coordinates> + <panel_attributes>lt=<- +m1=0,1 +</panel_attributes> + <additional_attributes>110.0;10.0;40.0;10.0;40.0;50.0;10.0;50.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>830</x> + <y>350</y> + <w>160</w> + <h>80</h> + </coordinates> + <panel_attributes>Arg +-- +*@ name ; text* +*@ type : DataType* +/- Doc : Doc/ +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>740</x> + <y>350</y> + <w>110</w> + <h>40</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..*</panel_attributes> + <additional_attributes>90.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>90</x> + <y>320</y> + <w>200</w> + <h>100</h> + </coordinates> + <panel_attributes>Domain +-- +*@ id : ID* +/- imports/ +/- Modules : ModuleClass/ +/- RootDevices : RootDevice/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>280</x> + <y>370</y> + <w>100</w> + <h>50</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>360</x> + <y>710</y> + <w>190</w> + <h>100</h> + </coordinates> + <panel_attributes>Device +-- +*@ id : Name* +/- Doc : Doc/ +/- Modules : Module/ +/- DeviceInfo : DeviceInfo/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>270</x> + <y>390</y> + <w>50</w> + <h>250</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>10.0;230.0;10.0;180.0;30.0;180.0;30.0;10.0;20.0;10.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>610</x> + <y>700</y> + <w>180</w> + <h>130</h> + </coordinates> + <panel_attributes>DeviceInfo +-- +*- name : text* +*- vendor : text* +/- serialNumber : text/ +/- vendorURL : URL/ +/- firmwareVersion : text/ +/- Doc : Doc/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>540</x> + <y>700</y> + <w>90</w> + <h>120</h> + </coordinates> + <panel_attributes>lt=<- +m2=0,1</panel_attributes> + <additional_attributes>70.0;10.0;40.0;10.0;40.0;90.0;10.0;90.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>830</x> + <y>120</y> + <w>160</w> + <h>210</h> + </coordinates> + <panel_attributes><<Enumeration>> +DataType +-- +boolean +byte +integer +float +string +enum +date +time +datetime +blob</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>880</x> + <y>740</y> + <w>110</w> + <h>50</h> + </coordinates> + <panel_attributes>Doc +-- +- ...</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>610</x> + <y>180</y> + <w>130</w> + <h>80</h> + </coordinates> + <panel_attributes><<Attributes>> +Extends +-- +@domain : IDRF +@class : text +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>500</x> + <y>260</y> + <w>130</w> + <h>60</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>110.0;30.0;80.0;30.0;80.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>740</x> + <y>130</y> + <w>110</w> + <h>220</h> + </coordinates> + <panel_attributes>lt=<- +m1=0,1 +</panel_attributes> + <additional_attributes>90.0;10.0;40.0;10.0;40.0;200.0;10.0;200.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>810</x> + <y>730</y> + <w>90</w> + <h>50</h> + </coordinates> + <panel_attributes>lt=<.. +m1=0..* +</panel_attributes> + <additional_attributes>70.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>980</x> + <y>200</y> + <w>50</w> + <h>220</h> + </coordinates> + <panel_attributes>lt=<- +m1= 1 +</panel_attributes> + <additional_attributes>10.0;10.0;30.0;10.0;30.0;200.0;10.0;200.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>610</x> + <y>430</y> + <w>170</w> + <h>50</h> + </coordinates> + <panel_attributes>Data +-- +/- dataPoint : DataPoint/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>500</x> + <y>280</y> + <w>130</w> + <h>190</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>110.0;160.0;50.0;160.0;50.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>770</x> + <y>440</y> + <w>80</w> + <h>50</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>60.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>830</x> + <y>450</y> + <w>160</w> + <h>130</h> + </coordinates> + <panel_attributes>DataPoint +-- +*@ name : text* +/@ type : DataType/ +/@ writable : boolean/ +/@ readable : boolean/ +/@ eventable : boolean/ +/- Doc : Doc/ +</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>610</x> + <y>620</y> + <w>150</w> + <h>50</h> + </coordinates> + <panel_attributes>Events +-- +/- event : Event/ + +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>830</x> + <y>620</y> + <w>160</w> + <h>80</h> + </coordinates> + <panel_attributes>Event +-- +*@ name : text* +/- data : Data/ +- Doc : Doc +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>500</x> + <y>290</y> + <w>130</w> + <h>370</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>110.0;340.0;30.0;340.0;30.0;10.0;10.0;10.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>750</x> + <y>610</y> + <w>100</w> + <h>50</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>360</x> + <y>650</y> + <w>120</w> + <h>30</h> + </coordinates> + <panel_attributes>Module +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>360</x> + <y>380</y> + <w>120</w> + <h>30</h> + </coordinates> + <panel_attributes>ModuleClass +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>410</x> + <y>310</y> + <w>100</w> + <h>90</h> + </coordinates> + <panel_attributes>lt=<<<. +<<extends>> +</panel_attributes> + <additional_attributes>10.0;10.0;10.0;70.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>470</x> + <y>650</y> + <w>110</w> + <h>140</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>10.0;10.0;90.0;10.0;90.0;120.0;80.0;120.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>410</x> + <y>400</y> + <w>100</w> + <h>270</h> + </coordinates> + <panel_attributes>lt=<<<. +<<extends>></panel_attributes> + <additional_attributes>10.0;10.0;10.0;250.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>680</x> + <y>470</y> + <w>350</w> + <h>220</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>10.0;10.0;10.0;130.0;330.0;130.0;330.0;200.0;310.0;200.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>980</x> + <y>130</y> + <w>70</w> + <h>390</h> + </coordinates> + <panel_attributes>lt=<- +m1=1 +</panel_attributes> + <additional_attributes>10.0;10.0;50.0;10.0;50.0;370.0;10.0;370.0</additional_attributes> + </element> + <element> + <id>UMLClass</id> + <coordinates> + <x>100</x> + <y>620</y> + <w>190</w> + <h>110</h> + </coordinates> + <panel_attributes>RootDevice +-- +*@ id : Name* +/- Doc : Doc/ +/- Modules : Module/ +/- DeviceInfo : DeviceInfo/ +/- Devices : Device/ +fg=blue</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>280</x> + <y>700</y> + <w>100</w> + <h>50</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>UMLNote</id> + <coordinates> + <x>90</x> + <y>120</y> + <w>200</w> + <h>130</h> + </coordinates> + <panel_attributes>bg=#FAF8C8 +fontsize=10 +@elementAttribute +*@mandatoryElementAttribute* +- element +- element : Subclass +/- optionalElement/ + +"Contains" Relation + +Subclassing</panel_attributes> + <additional_attributes/> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>190</x> + <y>180</y> + <w>100</w> + <h>40</h> + </coordinates> + <panel_attributes>lt=<- +fontsize=10 +m1=0..* +</panel_attributes> + <additional_attributes>80.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>190</x> + <y>210</y> + <w>110</w> + <h>40</h> + </coordinates> + <panel_attributes>lt=<<<. +<<extends>> +fontsize=10</panel_attributes> + <additional_attributes>90.0;20.0;10.0;20.0</additional_attributes> + </element> + <element> + <id>Relation</id> + <coordinates> + <x>280</x> + <y>650</y> + <w>100</w> + <h>50</h> + </coordinates> + <panel_attributes>lt=<- +m1=0..* +</panel_attributes> + <additional_attributes>80.0;10.0;30.0;10.0;30.0;30.0;10.0;30.0</additional_attributes> + </element> +</diagram> diff --git a/images/SDT2.0_UML.png b/images/SDT2.0_UML.png new file mode 100644 index 0000000000000000000000000000000000000000..0234c75fb23b0dcd1764f265132d8ac1e447334f Binary files /dev/null and b/images/SDT2.0_UML.png differ