<?xml version="1.0"?> <!-- ex: set softtabstop=2 tabstop=2 shiftwidth=2: -->



<xsd:schema 
  xmlns="http://www.infrae.com/xml"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.infrae.com/xml"
  elementFormDefault="qualified"
  attributeFormDefault="unqualified"
  >

  <xsd:annotation>
    <xsd:documentation xml:lang="en">
      $Id: silva.xsd,v 1.21 2003/10/10 12:23:32 faassen Exp $
    
      Silva XML schema
      Copyright 2002 Infrae
      Author: Christian Zagrodnick, cz@gocept.com
      Valid for: Silva 0.9.3
    </xsd:documentation>
  </xsd:annotation>

  
  <xsd:element name="silva" type="Silva" />

  <xsd:complexType name="Silva">
    <xsd:choice>
      <xsd:element name="silva_root" type="Folder" />
      <xsd:element name="silva_publication" type="Folder" />
      <xsd:element name="silva_folder" type="Folder" />
      <xsd:element name="silva_newsitem" type="SilvaNewsitem" /> 
      <xsd:element name="silva_document" type="Document" />
    </xsd:choice>
  </xsd:complexType>

  <xsd:simpleType name="ID">
    <xsd:restriction base="xsd:string" />
  </xsd:simpleType>

  <xsd:complexType name="Folder">
    <xsd:annotation>
      <xsd:documentation xml:lang="en">
        folder element containing the description of the folder and its contents
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="title" type="xsd:string" minOccurs="1" />
      <xsd:choice maxOccurs="unbounded">
        <xsd:element name="silva_folder" type="Folder" />
        <xsd:element name="silva_publication" type="Folder" />
        <xsd:element name="silva_document" type="Document" />
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="id" type="ID" minOccurs="1" />
  </xsd:complexType>


  <xsd:complexType name="Document">
    <xsd:sequence>
      <xsd:element name="title" type="xsd:string" minOccurs="1" />
      <xsd:element name="doc" type="DocumentContent" minOccurs="1" />
    </xsd:sequence>
    <xsd:attribute name="id" type="ID" minOccurs="1" />
  </xsd:complexType>

  <xsd:complexType name="DocumentContent">
    <xsd:sequence>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="heading" type="Heading" />
        <xsd:element name="p" type="Paragraph" />
        <xsd:element name="list" type="List" />
        <xsd:element name="nlist" type="NestedList" />
        <xsd:element name="table" type="Table" />
        <xsd:element name="image" type="Image" />
        <xsd:element name="toc" type="TableOfContents" />
        <xsd:element name="pre" type="xsd:string" />
        <xsd:element name="externaldata" type="ExternalData" />   
        <xsd:element name="dlist" type="DefinitionList" />
      </xsd:choice>
    </xsd:sequence>
  </xsd:complexType>

  <xsd:complexType name="Heading">
    <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="type" default="normal">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="normal" />
              <xsd:enumeration value="sub" />
              <xsd:enumeration value="subsub" />
              <xsd:enumeration value="paragraph" />
              <xsd:enumeration value="subparagraph" />
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  
  <xsd:complexType name="Paragraph" mixed="true">
    <xsd:complexContent>
      <xsd:extension base="Markup">
        <xsd:attribute name="type" default="normal">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="normal" />
              <xsd:enumeration value="lead" />
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>    


  <xsd:complexType name="TableOfContents">
    <xsd:attribute name="toc_depth">
      <xsd:simpleType>
        <xsd:restriction base="xsd:integer">
          <xsd:minInclusive value="-1" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>
  
  <xsd:complexType name="Markup" mixed="true">
    <xsd:annotation>
      <xsd:documentation>
        General Markup-Type

        Usually plain text should not contain any HTML-tags. The SMI
        HTML-escapes any textual input; thus any html or xml tags which would
        be entered via the text input fields are displayed verbatim with their
        braces in the rendered view.

        There are a few exceptions where the SMI allows to add markup by
        special symbols, similar to structured text. This markup is stored
        internally as text inside special elements.

        Text with markup is rendered by some hard boiled rendering methods in
        EditorSupportNested.render_(text|heading)_as_html for public view and
        EditorSupportNested.render_text_as_editable for the edit. view.

        link -- a hyperlink; attribute url.  rendered public as a-tag with url
        as href attribute
        
        index -- index element; attribute name.  rendered public as an
        anchor with corresponding name.

        em -- emphasized text.  rendered public as em-tag
        
        strong -- strong text.  rendered public as strong-tag
        
        underline -- underlined text.  rendered public as u-tag
        
        All the elements listed above contain only one plain text node;
        especially they may not be nested.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:element name="strong" type="Markup"/>
        <xsd:element name="em" type="Markup" />
        <xsd:element name="underline" type="Markup" />
        <xsd:element name="super" type="Markup" />
        <xsd:element name="sub" type="Markup" />
        <xsd:element name="link" type="Link" />
        <xsd:element name="index" type="IndexItem" />
        <xsd:element name="br">
          <xsd:complexType />
        </xsd:element> 
      </xsd:choice>
    </xsd:sequence>
  </xsd:complexType>
     

  <xsd:complexType name="Link">
    <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute name="url" type="xsd:anyURI" />
        <xsd:attribute name="target" type="xsd:string" />
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  
  <xsd:complexType name="IndexItem">
    <xsd:complexContent>
      <xsd:restriction base="xsd:anyType">
        <xsd:attribute name="name" type="xsd:string" />
        </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="ExternalData">
    <xsd:sequence>
      <xsd:element name="parameter" maxOccurs="unbounded">
        <xsd:complexType>
          <xsd:attribute name="key" type="xsd:string" use="required" />
          <xsd:attribute name="value" type="xsd:string" use="required" />
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>      
    <xsd:attribute name="path" type="xsd:string" use="required" />
    <xsd:attribute name="show_headings" type="xsd:boolean">
      <xsd:annotation>
        <xsd:documentation xml:lang="en">
          If this attribute is left out, it is regarded true
        </xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
    <xsd:attribute name="show_caption" type="xsd:boolean">
      <xsd:annotation>
        <xsd:documentation xml:lang="en">
          If this attribute is left out, it is regarded true
        </xsd:documentation>
      </xsd:annotation>
    </xsd:attribute>
  </xsd:complexType>

  <xsd:complexType name="Image">
    <xsd:attribute name="path" type="xsd:string" />
    <xsd:attribute name="alignment">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">            
          <xsd:enumeration value="image-left" />
          <xsd:enumeration value="image-center" />
          <xsd:enumeration value="image-right" />
          <xsd:enumeration value="float-left" />
          <xsd:enumeration value="float-right" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="link" type="xsd:string" />
    <!-- there should be som uri -->
  </xsd:complexType>

  <!-- List Types -->
  <xsd:complexType name="NestedList">
    <xsd:sequence>
      <xsd:element name="li" maxOccurs="unbounded">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:choice maxOccurs="unbounded">
              <xsd:element name="p" type="Paragraph" />
              <xsd:element name="heading" type="Heading" />
              <xsd:element name="nlist" type="NestedList" />
              <xsd:element name="list" type="List" />
              <xsd:element name="image" type="Image" />
              <xsd:element name="pre" type="xsd:string" />
              <xsd:element name="dlist" type="DefinitionList" />
            </xsd:choice>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>  
    <xsd:attribute name="type" type="ListType" />
  </xsd:complexType>
  
  <xsd:complexType name="List">
    <xsd:sequence>
      <xsd:choice minOccurs="0" maxOccurs="unbounded">
        <xsd:sequence>
          <xsd:element name="li" type="Markup" />
        </xsd:sequence>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="type" type="ListType" />
  </xsd:complexType>
         
  <xsd:simpleType name="ListType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="disc" />
      <xsd:enumeration value="circle" />
      <xsd:enumeration value="square" />
      <xsd:enumeration value="dash" />
      <xsd:enumeration value="1" />
      <xsd:enumeration value="a" />
      <xsd:enumeration value="A" />
      <xsd:enumeration value="I" />
      <xsd:enumeration value="i" />
      <xsd:enumeration value="none" />
    </xsd:restriction>
  </xsd:simpleType>


  <!-- Table -->
  <xsd:complexType name="Table">
    <xsd:sequence>
      <xsd:choice maxOccurs="unbounded">

        <xsd:element name="row_heading" type="xsd:string" />
        
        <xsd:element name="row">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name="field" maxOccurs="unbounded">
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:choice maxOccurs="unbounded">
                      <xsd:element name="heading" type="Heading" />
                      <xsd:element name="p" type="Paragraph" />
                      <xsd:element name="list" type="List" />
                      <xsd:element name="nlist" type="NestedList" />
                    </xsd:choice>
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
        
      </xsd:choice>
    </xsd:sequence>
    
    <xsd:attribute name="columns" type="xsd:positiveInteger" />
    
    <xsd:attribute name="type">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="plain" />
          <xsd:enumeration value="listing" />
          <xsd:enumeration value="grid" />
          <xsd:enumeration value="datagrid" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    
    <xsd:attribute name="column_info">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:pattern value="[RCL]:\d{1,2}( ([RCL]:\d{1,2}))*" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>


  <xsd:complexType name="DefinitionList">
    <xsd:sequence>
      <xsd:element name="title" type="xsd:string" minOccurs="1" />
      <xsd:choice maxOccurs="unbounded">
        <xsd:sequence>
          <xsd:element name="dt" type="Markup" minOccurs="1">
            <xsd:annotation>
              <xsd:documentation xml:lang="en">
                Definition Term
              </xsd:documentation>
            </xsd:annotation>  
          </xsd:element> 
          <xsd:element name="dd" type="Markup" minOccurs="1">
            <xsd:annotation>
              <xsd:documentation xml:lang="en">
                Definition Description
              </xsd:documentation>
            </xsd:annotation>  
          </xsd:element> 
        </xsd:sequence>
      </xsd:choice>
    </xsd:sequence>
    <xsd:attribute name="type">
      <xsd:simpleType> 
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="normal" />
          <xsd:enumeration value="compact" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>


  <!-- NewsItem -->

  <xsd:complexType name="SilvaNewsitemLink">
    <xsd:sequence>
      <xsd:element name="url" type="xsd:string" minOccurs="1" />
      <xsd:element name="text" type="xsd:string" minOccurs="1" />
    </xsd:sequence>
  </xsd:complexType>

  
  <xsd:complexType name="SilvaNewsitem" abstract="true">
    <xsd:sequence>
      <xsd:element name="title" type="xsd:string" />
      <xsd:element name="info" type="xsd:string" />
      <xsd:element name="subject" type="xsd:string" maxOccurs="unbounded" />
      <xsd:element name="target_audience" type="xsd:string" 
        maxOccurs="unbounded" />
      <xsd:element name="embargo_datetime" type="xsd:token" minOccurs="0"/>
      <xsd:element name="link" type="SilvaNewsitemLink" 
        minOccurs="0" maxOccurs="unbounded" />
       <xsd:element name="content">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="doc" type="DocumentContent" minOccurs="1"/>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:sequence>
    <xsd:attribute name="id" type="ID" />
    <xsd:attribute name="type">
      <xsd:simpleType>
        <xsd:restriction base="xsd:string">
          <xsd:enumeration value="EURAnnouncement" />
          <xsd:enumeration value="EURArticle" />
          <xsd:enumeration value="EUREvent" />
          <xsd:enumeration value="EUROration" />
          <xsd:enumeration value="EURValidictoryLecture" />
          <xsd:enumeration value="EURPromotion" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
  </xsd:complexType>

  <xsd:complexType name="EURAnnouncement">
    <xsd:complexContent>
      <xsd:extension base="SilvaNewsitem" />
     </xsd:complexContent>
  </xsd:complexType>


   <xsd:complexType name="EURArticle">
    <xsd:complexContent>
      <xsd:extension base="SilvaNewsitem">
        <xsd:sequence>
          <xsd:element name="subheader" type="xsd:string" />
          <xsd:element name="lead" type="xsd:string" />
          <xsd:element name="pressnote" type="xsd:string" />
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

   <xsd:complexType name="EURAgendaItem" abstract="true">
    <xsd:complexContent>
      <xsd:extension base="SilvaNewsitem">
        <xsd:sequence>
          <xsd:element name="start_datetime" type="xsd:token" />
          <xsd:element name="location" type="xsd:string" />
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="EUREvent">
    <xsd:complexContent>
      <xsd:extension base="EURAgendaItem">
        <xsd:sequence>
          <xsd:element name="speakers" type="xsd:string" />
          <xsd:element name="end_datetime" type="xsd:token" />
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>


  
   <xsd:complexType name="EUROration">
    <xsd:complexContent>
      <xsd:extension base="EURAgendaItem">
        <xsd:sequence>
          <xsd:element name="subheader" type="xsd:string" />
          <xsd:element name="pressheader" type="xsd:string" />
          <xsd:element name="academic" type="xsd:string" />
          <xsd:element name="chair" type="xsd:string" />
          <xsd:element name="lead" type="xsd:string" />
          <xsd:element name="pressnote" type="xsd:string" />
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>

 <xsd:complexType name="EURPromotion">
    <xsd:complexContent>
      <xsd:extension base="SilvaNewsitem">
        <xsd:sequence>
          <xsd:element name="subheader" type="xsd:string" />
          <xsd:element name="pressheader" type="xsd:string" />
          <xsd:element name="promovendus" type="xsd:string" />
          <xsd:element name="promoter" type="xsd:string" />
          <xsd:element name="co_promoter" type="xsd:string" />
          <xsd:element name="lead" type="xsd:string" />
          <xsd:element name="pressnote" type="xsd:string" />
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>


   <xsd:complexType name="EURValidictoryLecture">
    <xsd:complexContent>
      <xsd:extension base="EURAgendaItem">
        <xsd:sequence>
          <xsd:element name="subheader" type="xsd:string" />
          <xsd:element name="pressheader" type="xsd:string" />
          <xsd:element name="academic" type="xsd:string" />
          <xsd:element name="chair" type="xsd:string" />
          <xsd:element name="lead" type="xsd:string" />
          <xsd:element name="pressnote" type="xsd:string" />
        </xsd:sequence>
      </xsd:extension>
     </xsd:complexContent>
  </xsd:complexType>
  
</xsd:schema>
  

