Blob Blame History Raw
<?xml version="1.0" encoding="UTF-8"?>
<!--
get http://xml.fiforms.org/xs3p/ and generate docs
xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
-->
<xsd:schema
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.devhelp.net/book"
  xmlns="http://www.devhelp.net/book"
  elementFormDefault="qualified">

  <xsd:annotation>
    <xsd:documentation>
      Devhelp2 files are use in the 'devhelp' documentation browser.
    </xsd:documentation>
  </xsd:annotation>

  <xsd:simpleType name="keyword-type">
    <xsd:annotation>
      <xsd:documentation>
        Known keyword types.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="constant"/>
      <xsd:enumeration value="enum"/>
      <xsd:enumeration value="function"/>
      <xsd:enumeration value="macro"/>
      <xsd:enumeration value="member"/>
      <xsd:enumeration value="property"/>
      <xsd:enumeration value="signal"/>
      <xsd:enumeration value="struct"/>
      <xsd:enumeration value="typedef"/>
      <xsd:enumeration value="union"/>
      <xsd:enumeration value="variable"/>
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:simpleType name="language-type">
    <xsd:annotation>
      <xsd:documentation>
        Known programing languages.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="c"/>
      <xsd:enumeration value="c++"/>
      <xsd:enumeration value="c#"/>
      <xsd:enumeration value="java"/>
      <xsd:enumeration value="javascript"/>
      <xsd:enumeration value="perl"/>
      <xsd:enumeration value="python"/>
      <xsd:enumeration value="vala"/>
    </xsd:restriction>
  </xsd:simpleType>


  <xsd:element name="sub">
    <xsd:annotation>
      <xsd:documentation>
        Sub tags for the hierachy of the chapters and parts.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sub" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
       <xsd:attribute name="name" type="xsd:string" use="required"/>
       <xsd:attribute name="link" type="xsd:string" use="required"/>
    </xsd:complexType>
  </xsd:element>

  <xsd:element name="chapters">
    <xsd:annotation>
      <xsd:documentation>
        The chapters tag encloses the structure of the reference manual. Each
        sub unit is represented by a sub tag.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="sub" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <xsd:element name="keyword">
    <xsd:annotation>
      <xsd:documentation>
        The keyword tag points to the documentation of a api symbol.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:attribute name="type" type="keyword-type" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Type of the keyword.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="name" type="xsd:string" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Keyword name.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="link" type="xsd:string" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Relative link for the keyword.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="since" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>
            Version since that the keyword is part of the API.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="deprecated" type="xsd:string">
      <xsd:annotation>
        <xsd:documentation>
          Marks the keyword as deprecated.
        </xsd:documentation>
      </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="stability" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>
            Document the stability status.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
    </xsd:complexType>
  </xsd:element>

  <xsd:element name="functions">
    <xsd:annotation>
      <xsd:documentation>
        The functions tag encloses all api symbols of the reference manual. Each
        sub unit is represented by a keyword tag.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="keyword" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <xsd:element name="book">
    <xsd:annotation>
      <xsd:documentation>
        Toplevel element of a devhelp book. A devhelp book list the structure of
        a developer manual together with development related metadata.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="chapters" minOccurs="1" maxOccurs="1"/>
        <xsd:element ref="functions" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
      <xsd:attribute name="title" type="xsd:string" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Title of the reference manual.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="link" type="xsd:string" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Entry point to the manual. Can be given as a relative path to the
            location of the devhelp2 file.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="author" type="xsd:string" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Author of the document. Multiple authors are separated by ','.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="name" type="xsd:string" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Short name of the manual.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="version" type="xsd:integer" use="required">
        <xsd:annotation>
          <xsd:documentation>
            Version of the devhelp xml specification (2).
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="language" type="language-type">
        <xsd:annotation>
          <xsd:documentation>
            Programing language this manual refers to.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
      <xsd:attribute name="online" type="xsd:string">
        <xsd:annotation>
          <xsd:documentation>
            URL for the online version of the docs.
          </xsd:documentation>
        </xsd:annotation>
      </xsd:attribute>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>