diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2009-03-20 17:08:11 +0000 |
---|---|---|
committer | Rob Taylor <rob.taylor@codethink.co.uk> | 2009-03-20 17:15:47 +0000 |
commit | 37ae519ae088719269f48656d331b9e83139b585 (patch) | |
tree | 8d25ef3372e6bb03b6a07c629720b9b41d85060a /spec | |
parent | 3aa67bd5975b810ef8a37133288a2090773c14cc (diff) |
Fix up provider schema to be sane.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/context.xml | 2 | ||||
-rw-r--r-- | spec/context.xsd | 138 |
2 files changed, 74 insertions, 66 deletions
diff --git a/spec/context.xml b/spec/context.xml index d47e1ee9..52d6d4a0 100644 --- a/spec/context.xml +++ b/spec/context.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<provider service="org.freedesktop.ContextKit"> +<provider bus="session" service="org.freedesktop.ContextKit.IMAGINARY" xmlns="http://contextkit.freedesktop.org/Provider" > <doc> Core Context Properties ======================= diff --git a/spec/context.xsd b/spec/context.xsd index f68761cf..132a9423 100644 --- a/spec/context.xsd +++ b/spec/context.xsd @@ -46,87 +46,95 @@ </restriction> </simpleType> - <element name="provider"> - <annotation><documentation> - A top-level declaration of a context-providing service using the - ContextKit framework. - </documentation></annotation> + <complexType name="propertyList"> + <sequence> + <element minOccurs="0" ref="provider:doc"/> + <element maxOccurs="unbounded" ref="provider:node"/> + </sequence> + </complexType> + + <complexType name="providerDefn"> + <complexContent> + <extension base="provider:propertyList"> + <attribute name="bus" use="required" type="provider:dbusBusType"> + <annotation><documentation> + Which standard D-Bus bus this service can be activated on + </documentation></annotation> + </attribute> + <attribute name="service" use="required" type="NCName"> + <annotation><documentation> + The bus name of the service that will provide these keys. + This service must be activatable on the bus specified in "bus". + </documentation></annotation> + </attribute> + </extension> + </complexContent> + </complexType> + + <element name="provider" type="provider:providerDefn"> + <annotation> + <documentation> + A top-level declaration of a context-providing service using the + ContextKit framework. + </documentation> + </annotation> + </element> + + <element name="properties" type="provider:propertyList"> + <annotation> + <documentation> + A top-level definition of property names and meaning, divorced from a + specific context providing service. + </documentation> + </annotation> + </element> + + <element name="node"> <complexType> + <annotation><documentation> + A node in the tree of provided context. + A node can have children that are keys or nodes. + </documentation></annotation> + <sequence> - <element minOccurs="0" ref="provider:doc"/> - <element name="root"> - <complexType> - <group maxOccurs="unbounded" ref="provider:nodeGroup"/> - </complexType> - </element> + <element minOccurs="0" ref="provider:doc"/> + <choice> + <element minOccurs="0" maxOccurs="unbounded" ref="provider:node"/> + <element minOccurs="0" maxOccurs="unbounded" ref="provider:key"/> + </choice> </sequence> - <attribute name="bus" use="required" type="provider:dbusBusType"> + <attribute name="name" use="required" type="NCName"> <annotation><documentation> - Which standard D-Bus bus this service can be activated on - </documentation></annotation> - </attribute> - <attribute name="service" use="required" type="NCName"> - <annotation><documentation> - The bus name of the service that will provide these keys. - This service must be activatable on the bus specified in "bus". + The name of the node. </documentation></annotation> </attribute> </complexType> </element> - <complexType name="node"> - <sequence> - <element minOccurs="0" ref="provider:doc"/> - <choice> - <group minOccurs="0" maxOccurs="unbounded" ref="provider:nodeGroup"/> - <group minOccurs="0" maxOccurs="unbounded" ref="provider:keyGroup"/> - </choice> - </sequence> - <attribute name="name" use="required" type="NCName"> - <annotation><documentation> - The name of the node. - </documentation></annotation> - </attribute> - </complexType> - - <group name="nodeGroup"> - <annotation><documentation> - A node in the tree of provided context. - A node can have children that are keys or nodes. - </documentation></annotation> - <sequence> - <element name="node" type="provider:node"/> - </sequence> - </group> - <element name="doc" type="string"> <annotation><documentation> Documentation about a key or node. </documentation></annotation> </element> - <complexType name="key"> - <sequence> - <element minOccurs="0" ref="provider:doc"/> - </sequence> - <attribute name="name" use="required" type="NCName"> - <annotation><documentation> - The name of this key. - </documentation></annotation> - </attribute> - <attribute name="type" use="required" type="provider:contextType"> - <annotation><documentation> - The type of this key. - </documentation></annotation> - </attribute> - </complexType> - - <group name="keyGroup"> - <sequence> - <element name="key" type="provider:key"/> - </sequence> - </group> + <element name="key"> + <complexType > + <sequence> + <element minOccurs="0" ref="provider:doc"/> + </sequence> + <attribute name="name" use="required" type="NCName"> + <annotation><documentation> + The name of this key. + </documentation></annotation> + </attribute> + <attribute name="type" use="required" type="provider:contextType"> + <annotation><documentation> + The type of this key. + </documentation></annotation> + </attribute> + </complexType> + </element> <simpleType name="contextType"> <annotation><documentation> |