Commit 5d1821f5 authored by AS's avatar AS

original versions

parent f3f8037f
This directory contains all contributions for changes to RWD050.
<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="Devices">
<zeroOrMore>
<element name="Device">
<attribute name="id">
<data type="Name"/>
</attribute>
<element name="DeviceInfo">
<interleave>
<element name="Name">
<text/>
</element>
<element name="Vendor">
<text/>
</element>
</interleave>
</element>
<ref name="Doc"/>
<optional>
<ref name="Modules"/>
</optional>
</element>
</zeroOrMore>
</element>
</optional>
</element>
</define>
<define name="DataType">
<choice>
<value>integer</value>
<value>boolean</value>
<value>string</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="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="Events">
<element name="Events">
<zeroOrMore>
<element name="Event">
<attribute name="name">
<text/>
</attribute>
</element>
</zeroOrMore>
</element>
</define>
<!-- -->
<!-- -->
</grammar>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://hgi.org/xml/dal/1.0"
xmlns="http://hgi.org/xml/dal/1.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="Devices"/>
</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="Devices">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Device"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Device">
<xs:complexType>
<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>
<xs:element name="DeviceInfo">
<xs:complexType>
<xs:all>
<xs:element ref="Name"/>
<xs:element ref="Vendor"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="Name" type="xs:string"/>
<xs:element name="Vendor" type="xs:string"/>
<xs:simpleType name="DataType">
<xs:restriction base="xs:token">
<xs:enumeration value="integer"/>
<xs:enumeration value="boolean"/>
<xs:enumeration value="string"/>
</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="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="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:attribute name="name" use="required"/>
</xs:complexType>
</xs:element>
<!---->
<!---->
</xs:schema>
<?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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment