diff options
author | Adam Hooper <adamh@src.gnome.org> | 2004-09-14 09:24:42 +0800 |
---|---|---|
committer | Adam Hooper <adamh@src.gnome.org> | 2004-09-14 09:24:42 +0800 |
commit | e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb (patch) | |
tree | 52f433fc0f06ffa410f82b9919e06314a979b869 /data/epiphany-extension.xsd | |
parent | 809f1aca44d03364d59d33780684ad8c524a0025 (diff) | |
download | gsoc2013-epiphany-e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb.tar gsoc2013-epiphany-e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb.tar.gz gsoc2013-epiphany-e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb.tar.bz2 gsoc2013-epiphany-e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb.tar.lz gsoc2013-epiphany-e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb.tar.xz gsoc2013-epiphany-e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb.tar.zst gsoc2013-epiphany-e40e2cff4000f665f4b7c99f376b94f6c4e4b3bb.zip |
Added (proposed) XML schema for Extension metadata files (work in
progress).
Diffstat (limited to 'data/epiphany-extension.xsd')
-rw-r--r-- | data/epiphany-extension.xsd | 181 |
1 files changed, 181 insertions, 0 deletions
diff --git a/data/epiphany-extension.xsd b/data/epiphany-extension.xsd new file mode 100644 index 000000000..aca452b2b --- /dev/null +++ b/data/epiphany-extension.xsd @@ -0,0 +1,181 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Epiphany Web Browser extension metadata schema. + Copyright (c) 2004 Adam Hooper + </xsd:documentation> + </xsd:annotation> + + <xsd:element name="extension-list" type="ExtensionListType"/> + + <xsd:complexType name="ExtensionListType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + List of extensions. Each extension has its set + of metadata. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="extension" + type="ExtensionType" + minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="ExtensionType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + Metadata about an extension. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="filename" + type="ExtensionFilenameType" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="name" + type="xsd:string" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="description" + type="xsd:string" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="version" + type="ExtensionVersionType" + minOccurs="1" maxOccurs="1"/> +<!-- + <xsd:element name="min-epiphany-version" + type="EpiphanyVersionType" + maxOccurs="1"/> + <xsd:element name="max-epiphany-version" + type="EpiphanyVersionType" + maxOccurs="1"/> + <xsd:element name="min-mozilla-version" + type="MozillaVersionType" + maxOccurs="1"/> + <xsd:element name="max-mozilla-version" + type="MozillaVersionType" + maxOccurs="1"/> +--> + <xsd:element name="author" type="AuthorType"/> + <xsd:element name="url" type="xsd:anyURI"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:simpleType name="ExtensionFilenameType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The "core" of the extension's + filename. For example, use "gestures" + for an extension with a shared object name of + "libgesturesextension.so". + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="[a-zA-Z0-9_-]+"/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="ExtensionVersionType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The version of the extension's API. For most + extensions, this number will remain at + "1" indefinitely. The only reason to + increase it would be if any GObject classess + within the extension change parents. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:positiveInteger"/> + </xsd:simpleType> + +<!-- + <xsd:complexType name="EpiphanyVersionType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + An Epiphany version (major.minor.micro). + Extensions may function properly across a range + of Epiphany versions, as long as the relevant + parts of the Epiphany API have not changed. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="major" + type="xsd:positiveInteger" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="minor" + type="xsd:positiveInteger" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="micro" + type="xsd:positiveInteger" + minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="MozillaVersionType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + A Mozilla version (major, minor, type, micro). + Extensions my function properly across a range + of Mozilla versions, as long as the relevant + parts of the Mozilla API have not changed. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="major" + type="xsd:positiveInteger" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="minor" + type="xsd:positiveInteger" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="type" + type="MozillaVersionTypeType" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="micro" + type="xsd:positiveInteger" + minOccurs="1" maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:simpleType name="MozillaVersionTypeType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + The "type" of a Mozilla version. 1 + means Alpha, 2 means Beta, 3 means RC and 4 + means release. + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:positiveInteger"> + <xsd:minInclusive value="1"/> + <xsd:maxInclusive value="4"/> + </xsd:restriction> + </xsd:simpleType> +--> + + <xsd:complexType name="AuthorType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + An extension author -- a name and (optionally) + an email address. + </xsd:documentation> + </xsd:annotation> + <xsd:sequence> + <xsd:element name="name" + type="xsd:normalizedString" + minOccurs="1" maxOccurs="1"/> + <xsd:element name="email" + type="EmailType" + maxOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:simpleType name="EmailType"> + <xsd:annotation> + <xsd:documentation xml:lang="en"> + An email address + </xsd:documentation> + </xsd:annotation> + <xsd:restriction base="xsd:string"> + <xsd:pattern value="[\.a-zA-Z0-9_-]+@([a-zA-Z0-9_-])+(([a-zA-Z0-9_-])*\.([a-zA-Z0-9_-])+)+"/> + </xsd:restriction> + </xsd:simpleType> +</xsd:schema> |