diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2015-07-07 19:39:32 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2015-07-07 19:39:32 +0200 |
commit | b8796962fcbdfdb02797b4d6f6c83d9b868effbe (patch) | |
tree | b95ce5176b9901d7ee0f866f7330e718dfe9bd40 | |
parent | f3734d03a756c00cc88cb82b855e32e7be725e7f (diff) | |
download | gobject-introspection-b8796962fcbdfdb02797b4d6f6c83d9b868effbe.tar.gz |
[wip]: gir xml schemawip/dieterv/schema
reset && time find /home/dieterv/gnome.org/checkout/gobject-introspection/gir/ /home/dieterv/gnome.org/prefix/share/gir-1.0/ -name "*.gir" -exec xmllint --noout --nonet --schema /home/dieterv/gnome.org/checkout/gobject-introspection/giscanner/gir/gir.xsd '{}' \;
-rw-r--r-- | gir/DBus-1.0.gir | 7 | ||||
-rw-r--r-- | gir/DBusGLib-1.0.gir | 9 | ||||
-rw-r--r-- | giscanner/gir/c.xsd | 53 | ||||
-rw-r--r-- | giscanner/gir/gir.xsd | 736 | ||||
-rw-r--r-- | giscanner/gir/glib.xsd | 94 | ||||
-rw-r--r-- | giscanner/gir/xml.xsd | 286 |
6 files changed, 1177 insertions, 8 deletions
diff --git a/gir/DBus-1.0.gir b/gir/DBus-1.0.gir index 4ce03091..58034bdd 100644 --- a/gir/DBus-1.0.gir +++ b/gir/DBus-1.0.gir @@ -2,13 +2,12 @@ <repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" - xmlns:glib="http://www.gtk.org/introspection/glib/1.0" - c:identifier-prefixes="DBus" - c:symbol-prefixes="DBus"> + xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> <package name="dbus-1"/> <namespace name="DBus" version="1.0" - c:prefix="DBus"> + c:identifier-prefixes="DBus" + c:symbol-prefixes="DBus"> <enumeration name="BusType" c:type="DBusBusType"> <member name="session" value="0" c:identifier="DBUS_BUS_SESSION"/> <member name="system" value="1" c:identifier="DBUS_BUS_SYSTEM"/> diff --git a/gir/DBusGLib-1.0.gir b/gir/DBusGLib-1.0.gir index ff619316..bc12703f 100644 --- a/gir/DBusGLib-1.0.gir +++ b/gir/DBusGLib-1.0.gir @@ -2,12 +2,13 @@ <repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" - xmlns:glib="http://www.gtk.org/introspection/glib/1.0" - c:identifier-prefixes="DBus" - c:symbol-prefixes="DBus"> + xmlns:glib="http://www.gtk.org/introspection/glib/1.0"> <include name="GObject" version="2.0"/> <package name="dbus-glib-1"/> - <namespace name="DBusGLib" version="1.0" c:prefix="DBusG"> + <namespace name="DBusGLib" + version="1.0" + c:identifier-prefixes="DBusG" + c:symbol-prefixes="DBusG"> <record name="Connection" c:type="DBusGConnection"/> <record name="MethodInvocation" c:type="DBusGMethodInvocation"/> <class name="Proxy" c:type="DBusGProxy" parent="GObject.Object" diff --git a/giscanner/gir/c.xsd b/giscanner/gir/c.xsd new file mode 100644 index 00000000..af24ee62 --- /dev/null +++ b/giscanner/gir/c.xsd @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema targetNamespace="http://www.gtk.org/introspection/c/1.0" + elementFormDefault="qualified" + version="1.2" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:c="http://www.gtk.org/introspection/c/1.0"> + + <!-- Attributes --> + + <xs:attribute name="identifier" type="xs:string" /> + + <xs:attribute name="identifier-prefixes" type="xs:string" /> + + <xs:attribute name="prefix" type="xs:string"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed for backwards compatibility (vala + supposedly stil generates this attribute) + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="symbol-prefixes" type="xs:string"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py: generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="symbol-prefix" type="xs:string"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="type" type="xs:string" /> + + <!-- Elements --> + + <xs:element name="include"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" /> + </xs:complexType> + </xs:element> + +</xs:schema> diff --git a/giscanner/gir/gir.xsd b/giscanner/gir/gir.xsd new file mode 100644 index 00000000..f0a1286f --- /dev/null +++ b/giscanner/gir/gir.xsd @@ -0,0 +1,736 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema targetNamespace="http://www.gtk.org/introspection/core/1.0" + elementFormDefault="qualified" + version="1.2" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:xml="http://www.w3.org/XML/1998/namespace" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:c="http://www.gtk.org/introspection/c/1.0" + xmlns:glib="http://www.gtk.org/introspection/glib/1.0" + xmlns:gi="http://www.gtk.org/introspection/core/1.0"> + + <xs:import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="xml.xsd" /> + <xs:import namespace="http://www.gtk.org/introspection/c/1.0" + schemaLocation="c.xsd"/> + <xs:import namespace="http://www.gtk.org/introspection/glib/1.0" + schemaLocation="glib.xsd"/> + + <!-- Types --> + + <xs:simpleType name="boolean"> + <xs:annotation> + <xs:documentation> + • g-ir-scanner : generates {1, 0} + • g-ir-compiler: parses {1, 0} but not {true, false, 1, 0} (xs:boolean) + so we define our own gi:boolean type + </xs:documentation> + </xs:annotation> + <xs:restriction base="xs:integer"> + <xs:pattern value="1|0" /> + </xs:restriction> + </xs:simpleType> + + <!-- Attributes --> + + <xs:attributeGroup name="function-attributes"> + <xs:attribute name="throws" type="gi:boolean" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute name="moved-to" type="xs:string" /> + <xs:attribute name="shadows" type="xs:string" /> + <xs:attribute name="shadowed-by" type="xs:string" /> + <xs:attribute ref="c:identifier" use="optional" /> + </xs:attributeGroup> + + <xs:attributeGroup name="generic-attributes"> + <xs:attribute name="deprecated" type="gi:boolean" /> + <xs:attribute name="deprecated-version" type="xs:string" /> + <xs:attribute name="introspectable" type="gi:boolean" /> + <xs:attribute name="stability" type="xs:string" /> + </xs:attributeGroup> + + <xs:attributeGroup name="parameter-attributes"> + <xs:attribute name="allow-none" type="gi:boolean" /> + <xs:attribute name="caller-allocates" type="gi:boolean" /> + <xs:attribute name="closure" type="xs:string" /> + <xs:attribute name="destroy" type="xs:string" /> + <xs:attribute name="direction" type="xs:string" /> + <xs:attribute name="name" type="xs:string" /> + <xs:attribute name="nullable" type="gi:boolean" /> + <xs:attribute name="optional" type="gi:boolean" /> + <xs:attribute name="retval" type="gi:boolean"> + <xs:annotation> + <xs:documentation> + • g-ir-scanner : not generated. + • g-ir-compiler: possible left-over from gidlparser days, see commit + 1675d0574f188d627d1f18d7c1c78279bb4ae102 (Initial revision) + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="scope" type="xs:string" /> + <xs:attribute name="skip" type="xs:string" /> + <xs:attribute name="transfer-ownership" type="xs:string" /> + </xs:attributeGroup> + + <!-- Groups --> + + <xs:group name="callable-group"> + <xs:sequence> + <xs:group ref="gi:generic-group" /> + <xs:element ref="gi:return-value" minOccurs="0" maxOccurs="1" /> + <xs:element ref="gi:parameters" minOccurs="0" maxOccurs="1" /> + </xs:sequence> + </xs:group> + + <xs:group name="generic-group"> + <xs:sequence> + <xs:element ref="gi:attribute" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:doc" minOccurs="0" maxOccurs="1"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: ignored + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element ref="gi:doc-deprecated" minOccurs="0" maxOccurs="1"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: ignored + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element ref="gi:doc-stability" minOccurs="0" maxOccurs="1"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: ignored + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element ref="gi:doc-version" minOccurs="0" maxOccurs="1"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: ignored + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:sequence> + </xs:group> + + <xs:group name="parameter-group"> + <xs:sequence> + <xs:group ref="gi:generic-group" /> + <xs:choice minOccurs="1" maxOccurs="1"> + <xs:element ref="gi:array" /> + <xs:element ref="gi:type" /> + <xs:element ref="gi:varargs" /> + </xs:choice> + </xs:sequence> + </xs:group> + + <!-- Root element --> + + <xs:element name="repository"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="gi:include" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:namespace" minOccurs="1" maxOccurs="1" /> + <xs:element ref="gi:package" minOccurs="0" maxOccurs="1" /> + <xs:element ref="c:include" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attribute name="version" type="xs:string" fixed="1.2" /> + </xs:complexType> + </xs:element> + + <!-- Elements --> + + <xs:element name="alias"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:choice minOccurs="0"> + <xs:element ref="gi:array" /> + <xs:element ref="gi:type" /> + </xs:choice> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute ref="c:type"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="array"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="gi:type" maxOccurs="unbounded" /> + <xs:element ref="gi:array" /> + </xs:choice> + + <xs:attribute name="fixed-size" type="xs:string" /> + <xs:attribute name="length" type="xs:string" /> + <xs:attribute name="name" type="xs:string" /> + <xs:attribute name="zero-terminated" type="xs:string" /> + <xs:attribute ref="c:type" /> + </xs:complexType> + </xs:element> + + <xs:element name="attribute"> + <xs:complexType mixed="true"> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="value" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + + <xs:element name="bitfield"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:choice minOccurs="0" maxOccurs="unbounded" > + <xs:element ref="gi:field" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:member" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:record" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:union" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute ref="glib:get-type" /> + <xs:attribute ref="glib:type-name" /> + <xs:attribute ref="c:type" /> + </xs:complexType> + </xs:element> + + <xs:element name="callback"> + <xs:complexType> + <xs:group ref="gi:callable-group" /> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attributeGroup ref="gi:function-attributes"/> + <xs:attribute name="name" type="xs:string" /> + <xs:attribute ref="c:type" /> + </xs:complexType> + </xs:element> + + <xs:element name="class"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:element ref="gi:implements" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:constant" minOccurs="0" maxOccurs="unbounded"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element ref="gi:constructor" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:field" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:method" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:property" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:record" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:union" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:virtual-method" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="glib:signal" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute name="parent" type="xs:string" /> + <xs:attribute name="abstract" type="gi:boolean" /> + <xs:attribute ref="glib:type-name" use="required" /> + <xs:attribute ref="glib:get-type" /> + <xs:attribute ref="glib:type-struct" /> + <xs:attribute ref="glib:fundamental" /> + <xs:attribute ref="glib:ref-func" /> + <xs:attribute ref="glib:unref-func" /> + <xs:attribute ref="glib:set-value-func" /> + <xs:attribute ref="glib:get-value-func" /> + <xs:attribute ref="c:symbol-prefix"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="c:type"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="constant"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:choice minOccurs="0"> + <xs:element ref="gi:type" /> + <xs:element ref="gi:array" /> + </xs:choice> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="value" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute ref="c:type"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="constructor"> + <xs:complexType> + <xs:sequence> + <xs:group ref="gi:callable-group" /> + </xs:sequence> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attributeGroup ref="gi:function-attributes" /> + <xs:attribute name="name" type="xs:string" /> + </xs:complexType> + </xs:element> + + <xs:element name="discriminator"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed, TODO: figure out parent nodes... + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:attribute name="type" type="xs:string" use="required" /> + <xs:attribute name="offset" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + + <xs:element name="doc"> + <xs:complexType mixed="true"> + <xs:attribute ref="xml:space" /> + </xs:complexType> + </xs:element> + + <xs:element name="doc-deprecated"> + <xs:complexType mixed="true"> + <xs:attribute ref="xml:space" /> + </xs:complexType> + </xs:element> + + <xs:element name="doc-stability"> + <xs:complexType mixed="true"> + <xs:attribute ref="xml:space" /> + </xs:complexType> + </xs:element> + + <xs:element name="doc-version"> + <xs:complexType mixed="true"> + <xs:attribute ref="xml:space" /> + </xs:complexType> + </xs:element> + + <xs:element name="enumeration"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:element ref="gi:member" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute ref="glib:get-type" /> + <xs:attribute ref="glib:error-domain"/> + <xs:attribute ref="glib:type-name" /> + <xs:attribute ref="c:type"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="field"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="gi:callback" /> + <xs:element ref="gi:record" /> + <xs:element ref="gi:union" /> + <xs:element ref="gi:type" /> + <xs:element ref="gi:array" /> + + <xs:element ref="gi:doc" minOccurs="0" maxOccurs="1"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: ignored + </xs:documentation> + </xs:annotation> + </xs:element> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="readable" type="gi:boolean" /> + <xs:attribute name="writable" type="gi:boolean" /> + <xs:attribute name="bits" type="xs:string" /> + <xs:attribute name="branch" type="xs:string"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="private" type="xs:string"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="function"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:callable-group" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attributeGroup ref="gi:function-attributes" /> + <xs:attribute name="name" type="xs:string" /> + </xs:complexType> + </xs:element> + + <xs:element name="include"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" /> + <xs:attribute name="version" type="xs:string" /> + </xs:complexType> + </xs:element> + + <xs:element name="instance-parameter"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:parameter-group" /> + </xs:choice> + + <xs:attributeGroup ref="gi:parameter-attributes" /> + </xs:complexType> + </xs:element> + + <xs:element name="implements"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + + <xs:element name="interface"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:element name="prerequisite" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:constant" minOccurs="0" maxOccurs="unbounded"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:element> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:virtual-method" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:method" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:property" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:field" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:record" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:union" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="glib:signal" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute ref="glib:type-name" use="required" /> + <xs:attribute ref="glib:get-type" use="required" /> + <xs:attribute ref="glib:type-struct" /> + <xs:attribute ref="c:symbol-prefix"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute ref="c:type"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="member"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + </xs:choice> + + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="value" type="xs:string" /> + <xs:attribute ref="glib:nick" /> + <xs:attribute ref="c:identifier" /> + </xs:complexType> + </xs:element> + + <xs:element name="method"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:callable-group" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attributeGroup ref="gi:function-attributes" /> + <xs:attribute name="name" type="xs:string" /> + </xs:complexType> + </xs:element> + + <xs:element name="namespace"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="gi:alias" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:bitfield" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:callback" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:class" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:constant" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:enumeration" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:interface" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:record" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:union" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="glib:boxed" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attribute name="name" type="xs:string" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute name="shared-library" type="xs:string" /> + <xs:attribute ref="c:identifier-prefixes" /> + <xs:attribute ref="c:symbol-prefixes" /> + <xs:attribute ref="c:prefix" /> + </xs:complexType> + </xs:element> + + <xs:element name="package"> + <xs:complexType> + <xs:attribute name="name" type="xs:string" /> + </xs:complexType> + </xs:element> + + <xs:element name="parameter"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:parameter-group" /> + </xs:choice> + + <xs:attributeGroup ref="gi:parameter-attributes" /> + </xs:complexType> + </xs:element> + + <xs:element name="parameters"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="gi:instance-parameter" minOccurs="0" maxOccurs="1" /> + <xs:element ref="gi:parameter" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + </xs:complexType> + </xs:element> + + <xs:element name="property"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:choice minOccurs="0"> + <xs:element ref="gi:type" /> + <xs:element ref="gi:array" /> + </xs:choice> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute name="readable" type="gi:boolean" default="1" /> + <xs:attribute name="writable" type="gi:boolean" /> + <xs:attribute name="construct" type="gi:boolean" /> + <xs:attribute name="construct-only" type="gi:boolean" /> + <xs:attribute name="transfer-ownership" type="xs:string" /> + </xs:complexType> + </xs:element> + + <xs:element name="record"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:element ref="gi:field" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:record" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:union" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:constructor" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:method" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute name="disguised" type="gi:boolean" /> + <xs:attribute name="foreign" type="xs:string" /> + <xs:attribute ref="glib:get-type" /> + <xs:attribute ref="glib:is-gtype-struct-for" /> + <xs:attribute ref="glib:type-name" /> + <xs:attribute ref="c:type" /> + <xs:attribute ref="c:symbol-prefix" /> + </xs:complexType> + </xs:element> + + <xs:element name="return-value"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:choice minOccurs="0"> + <xs:element ref="gi:type" /> + <xs:element ref="gi:array" /> + </xs:choice> + </xs:choice> + + <xs:attribute name="nullable" type="gi:boolean" /> + <xs:attribute name="skip" type="xs:string" /> + <xs:attribute name="transfer-ownership" type="xs:string" /> + </xs:complexType> + </xs:element> + + <xs:element name="type"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="gi:type" maxOccurs="unbounded" /> + <xs:element ref="gi:array" /> + <xs:element ref="gi:varargs" /> + </xs:choice> + + <xs:attribute name="name" /> + <xs:attribute name="zero-terminated" /> + <xs:attribute name="fixed-size" /> + <xs:attribute name="length" /> + <xs:attribute name="foreign" /> + <xs:attribute ref="c:type" /> + </xs:complexType> + </xs:element> + + <xs:element name="union"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:generic-group" /> + <xs:element ref="gi:field" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:record" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:union" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:constructor" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:method" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="name" type="xs:string" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute ref="glib:get-type" /> + <xs:attribute ref="glib:type-name" /> + <xs:attribute ref="c:symbol-prefix" /> + <xs:attribute ref="c:type" /> + </xs:complexType> + </xs:element> + + <xs:element name="varargs"> + <xs:complexType></xs:complexType> + </xs:element> + + <xs:element name="virtual-method"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:group ref="gi:callable-group" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="invoker" type="xs:string" /> + <xs:attribute name="is-class-closure" type="gi:boolean"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="must-chain-up" type="gi:boolean"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="offset" type="xs:string"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="override" type="xs:string"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="throws" type="gi:boolean" /> + <xs:attribute name="version" type="xs:string" /> + </xs:complexType> + </xs:element> + +</xs:schema> diff --git a/giscanner/gir/glib.xsd b/giscanner/gir/glib.xsd new file mode 100644 index 00000000..22d3eea5 --- /dev/null +++ b/giscanner/gir/glib.xsd @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema targetNamespace="http://www.gtk.org/introspection/glib/1.0" + elementFormDefault="qualified" + version="1.2" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:c="http://www.gtk.org/introspection/c/1.0" + xmlns:glib="http://www.gtk.org/introspection/glib/1.0" + xmlns:gi="http://www.gtk.org/introspection/core/1.0"> + + <xs:import namespace="http://www.gtk.org/introspection/c/1.0" + schemaLocation="c.xsd"/> + <xs:import namespace="http://www.gtk.org/introspection/core/1.0" + schemaLocation="gir.xsd"/> + + <!-- Attributes --> + + <xs:attribute name="error-domain" type="xs:string" /> + + <xs:attribute name="fundamental" type="xs:string" /> + + <xs:attribute name="get-type" type="xs:string" /> + + <xs:attribute name="get-value-func" type="xs:string" /> + + <xs:attribute name="is-gtype-struct-for" type="xs:string" /> + + <xs:attribute name="name" type="xs:string" /> + + <xs:attribute name="nick" type="xs:string" /> + + <xs:attribute name="ref-func" type="xs:string" /> + + <xs:attribute name="set-value-func" type="xs:string" /> + + <xs:attribute name="type-name" type="xs:string" /> + + <xs:attribute name="type-struct" type="xs:string" /> + + <xs:attribute name="unref-func" type="xs:string" /> + + <!-- Elements --> + + <xs:element name="boxed"> + <xs:complexType> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="gi:constructor" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:method" minOccurs="0" maxOccurs="unbounded" /> + <xs:element ref="gi:function" minOccurs="0" maxOccurs="unbounded" /> + </xs:choice> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute ref="glib:get-type" use="required" /> + <xs:attribute ref="glib:name" use="required" /> + <xs:attribute ref="glib:type-name" use="required" /> + <xs:attribute ref="c:symbol-prefix" use="optional"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : generated + • girepository/girparser.c: not parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + + <xs:element name="signal"> + <xs:complexType> + <xs:sequence> + <xs:group ref="gi:generic-group" /> + <xs:element ref="gi:return-value" minOccurs="0" maxOccurs="1" /> + <xs:element ref="gi:parameters" minOccurs="0" maxOccurs="1" /> + </xs:sequence> + + <xs:attributeGroup ref="gi:generic-attributes" /> + <xs:attribute name="action" type="gi:boolean" /> + <xs:attribute name="detailed" type="gi:boolean" /> + <xs:attribute name="name" type="xs:string" use="required" /> + <xs:attribute name="no-hooks" type="xs:string" /> + <xs:attribute name="no-recurse" type="gi:boolean" /> + <xs:attribute name="version" type="xs:string" /> + <xs:attribute name="when" type="xs:string" use="optional" /> + <xs:attribute name="has-class-closure" type="gi:boolean"> + <xs:annotation> + <xs:documentation> + • giscanner/girwriter.py : not generated + • girepository/girparser.c: parsed + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + +</xs:schema> diff --git a/giscanner/gir/xml.xsd b/giscanner/gir/xml.xsd new file mode 100644 index 00000000..cb5aac7d --- /dev/null +++ b/giscanner/gir/xml.xsd @@ -0,0 +1,286 @@ +<?xml version='1.0'?> +<?xml-stylesheet href="http://www.w3.org/2008/09/xsd.xsl" type="text/xsl"?> +<xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns ="http://www.w3.org/1999/xhtml" + xml:lang="en"> + + <xs:annotation> + <xs:documentation> + <div> + <h1>About the XML namespace</h1> + + <div class="bodytext"> + <p> + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + </p> + <p> + See <a href="http://www.w3.org/XML/1998/namespace.html"> + http://www.w3.org/XML/1998/namespace.html</a> and + <a href="http://www.w3.org/TR/REC-xml"> + http://www.w3.org/TR/REC-xml</a> for information + about this namespace. + </p> + <p> + Note that local names in this namespace are intended to be + defined only by the World Wide Web Consortium or its subgroups. + The names currently defined in this namespace are listed below. + They should not be used with conflicting semantics by any Working + Group, specification, or document instance. + </p> + <p> + See further below in this document for more information about <a + href="#usage">how to refer to this schema document from your own + XSD schema documents</a> and about <a href="#nsversioning">the + namespace-versioning policy governing this schema document</a>. + </p> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:attribute name="lang"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>lang (as an attribute name)</h3> + <p> + denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification.</p> + + </div> + <div> + <h4>Notes</h4> + <p> + Attempting to install the relevant ISO 2- and 3-letter + codes as the enumerated possible values is probably never + going to be a realistic possibility. + </p> + <p> + See BCP 47 at <a href="http://www.rfc-editor.org/rfc/bcp/bcp47.txt"> + http://www.rfc-editor.org/rfc/bcp/bcp47.txt</a> + and the IANA language subtag registry at + <a href="http://www.iana.org/assignments/language-subtag-registry"> + http://www.iana.org/assignments/language-subtag-registry</a> + for further information. + </p> + <p> + The union allows for the 'un-declaration' of xml:lang with + the empty string. + </p> + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:union memberTypes="xs:language"> + <xs:simpleType> + <xs:restriction base="xs:string"> + <xs:enumeration value=""/> + </xs:restriction> + </xs:simpleType> + </xs:union> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="space"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>space (as an attribute name)</h3> + <p> + denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification.</p> + + </div> + </xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:NCName"> + <xs:enumeration value="default"/> + <xs:enumeration value="preserve"/> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + + <xs:attribute name="base" type="xs:anyURI"> <xs:annotation> + <xs:documentation> + <div> + + <h3>base (as an attribute name)</h3> + <p> + denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xmlbase/">http://www.w3.org/TR/xmlbase/</a> + for information about this attribute. + </p> + </div> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attribute name="id" type="xs:ID"> + <xs:annotation> + <xs:documentation> + <div> + + <h3>id (as an attribute name)</h3> + <p> + denotes an attribute whose value + should be interpreted as if declared to be of type ID. + This name is reserved by virtue of its definition in the + xml:id specification.</p> + + <p> + See <a + href="http://www.w3.org/TR/xml-id/">http://www.w3.org/TR/xml-id/</a> + for information about this attribute. + </p> + </div> + </xs:documentation> + </xs:annotation> + </xs:attribute> + + <xs:attributeGroup name="specialAttrs"> + <xs:attribute ref="xml:base"/> + <xs:attribute ref="xml:lang"/> + <xs:attribute ref="xml:space"/> + <xs:attribute ref="xml:id"/> + </xs:attributeGroup> + + <xs:annotation> + <xs:documentation> + <div> + + <h3>Father (in any context at all)</h3> + + <div class="bodytext"> + <p> + denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + </p> + <blockquote> + <p> + In appreciation for his vision, leadership and + dedication the W3C XML Plenary on this 10th day of + February, 2000, reserves for Jon Bosak in perpetuity + the XML name "xml:Father". + </p> + </blockquote> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + <div xml:id="usage" id="usage"> + <h2><a name="usage">About this schema document</a></h2> + + <div class="bodytext"> + <p> + This schema defines attributes and an attribute group suitable + for use by schemas wishing to allow <code>xml:base</code>, + <code>xml:lang</code>, <code>xml:space</code> or + <code>xml:id</code> attributes on elements they define. + </p> + <p> + To enable this, such a schema must import this schema for + the XML namespace, e.g. as follows: + </p> + <pre> + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/xml.xsd"/> + </pre> + <p> + or + </p> + <pre> + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2009/01/xml.xsd"/> + </pre> + <p> + Subsequently, qualified reference to any of the attributes or the + group defined below will have the desired effect, e.g. + </p> + <pre> + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + </pre> + <p> + will define a type which will schema-validate an instance element + with any of those attributes. + </p> + </div> + </div> + </xs:documentation> + </xs:annotation> + + <xs:annotation> + <xs:documentation> + <div id="nsversioning" xml:id="nsversioning"> + <h2><a name="nsversioning">Versioning policy for this schema document</a></h2> + <div class="bodytext"> + <p> + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a>. + </p> + <p> + At the date of issue it can also be found at + <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd</a>. + </p> + <p> + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML + Schema itself, or with the XML namespace itself. In other words, + if the XML Schema or XML namespaces change, the version of this + document at <a href="http://www.w3.org/2001/xml.xsd"> + http://www.w3.org/2001/xml.xsd + </a> + will change accordingly; the version at + <a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd + </a> + will not change. + </p> + <p> + Previous dated (and unchanging) versions of this schema + document are at: + </p> + <ul> + <li><a href="http://www.w3.org/2009/01/xml.xsd"> + http://www.w3.org/2009/01/xml.xsd</a></li> + <li><a href="http://www.w3.org/2007/08/xml.xsd"> + http://www.w3.org/2007/08/xml.xsd</a></li> + <li><a href="http://www.w3.org/2004/10/xml.xsd"> + http://www.w3.org/2004/10/xml.xsd</a></li> + <li><a href="http://www.w3.org/2001/03/xml.xsd"> + http://www.w3.org/2001/03/xml.xsd</a></li> + </ul> + </div> + </div> + </xs:documentation> + </xs:annotation> + +</xs:schema> |