gobject-introspection r101 - in trunk: . relaxng
- From: robtaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r101 - in trunk: . relaxng
- Date: Fri, 1 Feb 2008 16:47:16 +0000 (GMT)
Author: robtaylor
Date: Fri Feb 1 16:47:15 2008
New Revision: 101
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=101&view=rev
Log:
2008-02-01 Mark Doffman <mark doffman codethink co uk>
* gidl.dtd:
Correct syntax errors in the DTD file.
* relaxng/api.xml:
* relaxng/c-types.xml:
* relaxng/g-types.xml:
* relaxng/util.xml:
Add a RelaxNG specification for the GObject Introspection XML data.
The Specification has validated all of the test files.
Added:
trunk/relaxng/
trunk/relaxng/api.xml
trunk/relaxng/c-types.xml
trunk/relaxng/g-types.xml
trunk/relaxng/util.xml
Modified:
trunk/ChangeLog
trunk/gidl.dtd
Modified: trunk/gidl.dtd
==============================================================================
--- trunk/gidl.dtd (original)
+++ trunk/gidl.dtd Fri Feb 1 16:47:15 2008
@@ -36,7 +36,7 @@
get-type CDATA #REQUIRED
deprecated (0|1) #IMPLIED
cname CDATA #IMPLIED
- class CDATA #IMLIED >
+ class CDATA #IMPLIED >
<!ELEMENT implements (interface+) >
@@ -57,7 +57,7 @@
get-type CDATA #REQUIRED
deprecated (0|1) #IMPLIED
cname CDATA #IMPLIED
- class CDATA #IMLIED >
+ class CDATA #IMPLIED >
<!ELEMENT requires ((interface|object)*) >
Added: trunk/relaxng/api.xml
==============================================================================
--- (empty file)
+++ trunk/relaxng/api.xml Fri Feb 1 16:47:15 2008
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+ <include href="c-types.xml"/>
+ <include href="g-types.xml"/>
+ <include href="util.xml"/>
+
+ <define name="namespace">
+ <element name="namespace">
+ <attribute name="name"/>
+ <interleave>
+ <zeroOrMore>
+ <ref name="object"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="interface"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="enum"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="flags"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="boxed"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="function"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="callback"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="struct"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="union"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="constant"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="errordomain"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
+ <define name="api">
+ <element name="api">
+ <optional>
+ <attribute name="version"/>
+ </optional>
+ <oneOrMore>
+ <ref name="namespace"/>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <start>
+ <ref name="api"/>
+ </start>
+
+</grammar>
Added: trunk/relaxng/c-types.xml
==============================================================================
--- (empty file)
+++ trunk/relaxng/c-types.xml Fri Feb 1 16:47:15 2008
@@ -0,0 +1,211 @@
+<?xml version="1.0" encoding="utf-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+ <define name="type">
+ <attribute name="type"/>
+ </define>
+
+ <!-- CONSTANT -->
+ <define name="constant">
+ <element name="constant">
+ <attribute name="name"/>
+ <ref name="type"/>
+ <attribute name="value"/>
+ <ref name="deprecated"/>
+ </element>
+ </define>
+
+ <!-- ENUM -->
+ <define name="enum">
+ <element name="enum">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="type-name"/>
+ </optional>
+ <optional>
+ <attribute name="get-type"/>
+ </optional>
+ <ref name="deprecated"/>
+ <oneOrMore>
+ <ref name="member"/>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <define name="member">
+ <element name="member">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <ref name="deprecated"/>
+ </element>
+ </define>
+
+ <!-- UNION -->
+ <define name="union">
+ <element name="union">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="type-name"/>
+ </optional>
+ <optional>
+ <attribute name="get-type"/>
+ </optional>
+ <optional>
+ <attribute name="cname"/>
+ </optional>
+ <ref name="deprecated"/>
+ <oneOrMore>
+ <ref name="field"/>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <!-- STRUCTURE -->
+ <define name="struct">
+ <element name="struct">
+ <attribute name="name"/>
+ <ref name="deprecated"/>
+ <optional>
+ <attribute name="cname"/>
+ </optional>
+ <interleave>
+ <oneOrMore>
+ <ref name="field"/>
+ </oneOrMore>
+ <zeroOrMore>
+ <ref name="method"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
+ <define name="field">
+ <element name="field">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="branch"/>
+ </optional>
+ <optional>
+ <attribute name="cname"/>
+ </optional>
+ <optional>
+ <attribute name="offset"/>
+ </optional>
+ <optional>
+ <attribute name="bits"/>
+ </optional>
+ <optional>
+ <attribute name="readable">
+ <choice>
+ <value>0</value>
+ <value>1</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="writable">
+ <choice>
+ <value>0</value>
+ <value>1</value>
+ </choice>
+ </attribute>
+ </optional>
+ <ref name="type"/>
+ </element>
+ </define>
+
+ <!-- FUNCTION TYPE -->
+ <define name="function">
+ <element name="function">
+ <attribute name="name"/>
+ <attribute name="symbol"/>
+ <ref name="deprecated"/>
+ <ref name="signature"/>
+ </element>
+ </define>
+
+ <define name="callback">
+ <element name="callback">
+ <attribute name="name"/>
+ <ref name="deprecated"/>
+ <ref name="signature"/>
+ </element>
+ </define>
+
+ <define name="signature">
+ <interleave>
+ <optional>
+ <ref name="parameters"/>
+ </optional>
+ <element name="return-type">
+ <ref name="type"/>
+ <optional>
+ <attribute name="null-ok"/>
+ </optional>
+ <optional>
+ <attribute name="transfer">
+ <choice>
+ <value>full</value>
+ <value>shallow</value>
+ <value>transfer</value>
+ </choice>
+ </attribute>
+ </optional>
+ </element>
+ </interleave>
+ </define>
+
+ <define name="parameters">
+ <element name="parameters">
+ <oneOrMore>
+ <ref name="parameter"/>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <define name="parameter">
+ <element name="parameter">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="direction">
+ <choice>
+ <value>in</value>
+ <value>out</value>
+ <value>inout</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="optional">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="null-ok">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="retval">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="dipper">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="transfer">
+ <choice>
+ <value>full</value>
+ <value>shallow</value>
+ <value>none</value>
+ </choice>
+ </attribute>
+ </optional>
+ <ref name="type"/>
+ </element>
+ </define>
+
+</grammar>
Added: trunk/relaxng/g-types.xml
==============================================================================
--- (empty file)
+++ trunk/relaxng/g-types.xml Fri Feb 1 16:47:15 2008
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="utf-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+ <!-- TYPES -->
+
+ <define name="errordomain">
+ <element name="errordomain">
+ <attribute name="name"/>
+ <attribute name="get-quark"/>
+ <attribute name="codes"/>
+ </element>
+ </define>
+
+ <define name="flags">
+ <element name="flags">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="type-name"/>
+ </optional>
+ <optional>
+ <attribute name="get-type"/>
+ </optional>
+ <ref name="deprecated"/>
+ <oneOrMore>
+ <ref name="member"/>
+ </oneOrMore>
+ </element>
+ </define>
+
+ <define name="boxed">
+ <element name="boxed">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="type-name"/>
+ </optional>
+ <optional>
+ <attribute name="get-type"/>
+ </optional>
+ <ref name="deprecated"/>
+ <optional>
+ <attribute name="cname"/>
+ </optional>
+ <interleave>
+ <zeroOrMore>
+ <ref name="constructor"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="field"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="method"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
+ <define name="object">
+ <element name="object">
+ <attribute name="name"/>
+ <attribute name="parent"/>
+ <optional>
+ <attribute name="type-name"/>
+ </optional>
+ <optional>
+ <attribute name="get-type"/>
+ </optional>
+ <optional>
+ <attribute name="cname"/>
+ </optional>
+ <optional>
+ <attribute name="class"/>
+ </optional>
+ <ref name="deprecated"/>
+ <interleave>
+ <oneOrMore>
+ <ref name="constructor"/>
+ </oneOrMore>
+ <zeroOrMore>
+ <element name="implements">
+ <attribute name="name"/>
+ </element>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="field"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="method"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="vfunc"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="signal"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="property"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="constant"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
+ <define name="interface">
+ <element name="interface">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="type-name"/>
+ </optional>
+ <optional>
+ <attribute name="get-type"/>
+ </optional>
+ <optional>
+ <attribute name="cname"/>
+ </optional>
+ <optional>
+ <attribute name="class"/>
+ </optional>
+ <ref name="deprecated"/>
+ <interleave>
+ <zeroOrMore>
+ <element name="requires">
+ <attribute name="name"/>
+ </element>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="method"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="vfunc"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="signal"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="property"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="constant"/>
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
+ <!-- ATTRIBUTES -->
+ <define name="property">
+ <element name="property">
+ <attribute name="name"/>
+ <attribute name="readable">
+ <ref name="zero-one"/>
+ </attribute>
+ <attribute name="writable">
+ <ref name="zero-one"/>
+ </attribute>
+ <optional>
+ <attribute name="construct">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="construct-only">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <ref name="type"/>
+ </element>
+ </define>
+
+ <define name="signal">
+ <element name="signal">
+ <attribute name="name"/>
+ <attribute name="when">
+ <choice>
+ <value>FIRST</value>
+ <value>LAST</value>
+ <value>CLEANUP</value>
+ </choice>
+ </attribute>
+ <optional>
+ <attribute name="no-recurse">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="detailed">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="action">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="no-hooks">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="has-class-closure">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <ref name="signature"/>
+ </element>
+ </define>
+
+ <define name="method">
+ <element name="method">
+ <attribute name="name"/>
+ <attribute name="symbol"/>
+ <optional>
+ <attribute name="type">
+ <choice>
+ <value>getter</value>
+ <value>setter</value>
+ </choice>
+ </attribute>
+ </optional>
+ <ref name="deprecated"/>
+ <ref name="signature"/>
+ </element>
+ </define>
+
+ <define name="constructor">
+ <element name="constructor">
+ <attribute name="name"/>
+ <attribute name="symbol"/>
+ <ref name="signature"/>
+ </element>
+ </define>
+
+ <define name="vfunc">
+ <element name="vfunc">
+ <attribute name="name"/>
+ <optional>
+ <attribute name="cname"/>
+ </optional>
+ <optional>
+ <attribute name="offset"/>
+ </optional>
+ <optional>
+ <attribute name="must-chain-up">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="override">
+ <choice>
+ <value>always</value>
+ <value>never</value>
+ <value>maybe</value>
+ </choice>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="is-class-closure">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ <ref name="deprecated"/>
+ <ref name="signature"/>
+ </element>
+ </define>
+
+</grammar>
Added: trunk/relaxng/util.xml
==============================================================================
--- (empty file)
+++ trunk/relaxng/util.xml Fri Feb 1 16:47:15 2008
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0">
+
+ <define name="deprecated">
+ <optional>
+ <attribute name="deprecated">
+ <ref name="zero-one"/>
+ </attribute>
+ </optional>
+ </define>
+
+ <define name="zero-one">
+ <choice>
+ <value>0</value>
+ <value>1</value>
+ </choice>
+ </define>
+
+</grammar>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]