[gtk-doc] devhelp: fix devhelp.xsd schema



commit d7741e3e908f62c36539f0fe5234e9b2d4501703
Author: Stefan Sauer <ensonic users sf net>
Date:   Fri May 15 21:50:58 2015 +0200

    devhelp: fix devhelp.xsd schema
    
    Make the schema itself validate. Also use the smae xmlns in the generator as in the schema.

 devhelp2.xsd |   71 +++++++++++++++++++++++++++++++---------------------------
 devhelp2.xsl |    2 +-
 2 files changed, 39 insertions(+), 34 deletions(-)
---
diff --git a/devhelp2.xsd b/devhelp2.xsd
index c58b9bc..6a8815c 100644
--- a/devhelp2.xsd
+++ b/devhelp2.xsd
@@ -5,9 +5,10 @@ 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";
-  xmlns="urn:devhelp"
   targetNamespace="urn:devhelp"
-  elementFormDefault="qualified">
+  xmlns="urn:devhelp"
+  elementFormDefault="qualified"
+  attributeFormDefault="qualified">
 
   <xsd:annotation>
     <xsd:documentation>
@@ -16,6 +17,11 @@ xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
   </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"/>
@@ -28,14 +34,14 @@ xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
       <xsd:enumeration value="union"/>
       <xsd:enumeration value="variable"/>
     </xsd:restriction>
+  </xsd:simpleType>
+  
+  <xsd:simpleType name="language-type">
     <xsd:annotation>
       <xsd:documentation>
-        Known keyword types.
+        Known programing languages.
       </xsd:documentation>
     </xsd:annotation>  
-  </xsd:simpleType>
-  
-  <xsd:simpleType name="language-type">
     <xsd:restriction base="xsd:string">
       <xsd:enumeration value="c"/>
       <xsd:enumeration value="c++"/>
@@ -46,11 +52,6 @@ xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
       <xsd:enumeration value="python"/>
       <xsd:enumeration value="vala"/>
     </xsd:restriction>
-    <xsd:annotation>
-      <xsd:documentation>
-        Known programing languages.
-      </xsd:documentation>
-    </xsd:annotation>  
   </xsd:simpleType>
 
   <xsd:attribute name="title" type="xsd:string">
@@ -121,6 +122,11 @@ xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
 
 
   <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"/>
@@ -128,28 +134,28 @@ xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
        <xsd:attribute ref="name" use="required"/>
        <xsd:attribute ref="link" use="required"/>
     </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="chapters">
     <xsd:annotation>
       <xsd:documentation>
-        Sub tags for the hierachy of the chapters and parts.
+        The chapters tag encloses the structure of the reference manual. Each
+        sub unit is represented by a sub tag.
       </xsd:documentation>
     </xsd:annotation>
-  </xsd:element>
-
-  <xsd:element name="chapters">
     <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 chapters tag encloses the structure of the reference manual. Each
-        sub unit is represented by a sub tag.
+        The keyword tag points to the documentation of a api symbol.
       </xsd:documentation>
     </xsd:annotation>
-  </xsd:element>
-
-  <xsd:element name="keyword">
     <xsd:complexType>
        <xsd:attribute ref="type" use="required"/>
        <xsd:attribute ref="name" use="required"/>
@@ -157,24 +163,29 @@ xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
        <xsd:attribute ref="since"/>
        <xsd:attribute ref="deprecated"/>
     </xsd:complexType>
-      <xsd:documentation>
-        The keyword tag points to the documentation of a api symbol.
-      </xsd:documentation>
   </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:documentation>
-        The functions tag encloses all api symbols of the reference manual. Each
-        sub unit is represented by a keyword tag.
-      </xsd:documentation>
   </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"/>
@@ -187,12 +198,6 @@ xsltproc -o devhelp2.xsd.html $HOME/download/xs3p-1.1.3/xs3p.xsl devhelp2.xsd
       <xsd:attribute ref="version" use="required"/>
       <xsd:attribute ref="language" />
     </xsd:complexType>
-    <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:element>
 </xsd:schema>
 
diff --git a/devhelp2.xsl b/devhelp2.xsl
index f9c3d9a..2958baf 100644
--- a/devhelp2.xsl
+++ b/devhelp2.xsl
@@ -1,7 +1,7 @@
 <?xml version='1.0'?> <!--*- mode: xml -*-->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                 version='1.0'
-                xmlns="http://www.devhelp.net/book";
+                xmlns="urn:devhelp"
                 xmlns:str="http://exslt.org/strings";
                 exclude-result-prefixes="str">
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]