Skip to topic | Skip to bottom
Home

Tesi
Tesi.FileXsdr1.6 - 12 Feb 2006 - 15:21 - ChiaraPilotopic end

Start of topic | Skip to actions

Xml Schema della proposta

proposal.xsd

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" 
    targetNamespace="http://www.cs.unibo.it/CAP/1.0/proposal.xsd"
    xmlns="http://www.cs.unibo.it/CAP/1.0/proposal.xsd">
    
    <!--ELEMENTI-->
    <xs:element name="proposal" type="Tproposal"/>
    
    <xs:complexType name="Tproposal">
        <xs:sequence>
            <xs:element name="sender" type="TpartyInfo" maxOccurs="1"/>
            <xs:element name="request" type="Trequest" maxOccurs="1"/>
            <xs:element name="conversation" type="Tconversation" maxOccurs="unbounded"/>
        </xs:sequence>
        <xs:attribute  name="renegotiable" type="Treneg" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="TpartyInfo">
        <xs:sequence>
            <xs:element name="name" type="xs:string" minOccurs="0"/>
            <xs:element name="certificate" type="Tcertificate" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="uniqueName" type="xs:string" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="Tcertificate">
        <xs:sequence>
            <xs:any namespace="##other"  maxOccurs="1" processContents="lax"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="Trequest">
         <xs:sequence>
            <xs:element name="invited" type="Tinvited"/>
         </xs:sequence>
         <xs:attribute name="type" type="Ttype">
    </xs:complexType>
    
    <xs:complexType name="Tinvited">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
            <xs:element name="party" type="TpartyInfo"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="Tconversation">
        <xs:sequence>
            <xs:choice>
                <xs:element name="onResource" type="TonRes"/>
                <xs:element name="isResource" type="TisRes"/>
                <xs:element name="aboutResource" type="TaboutRes"/>
            </xs:choice>
            <xs:element name="transport" type="Ttransport"/>
        </xs:sequence>
        <xs:attribute name="media" type="Tmedia" use="required"/>
        <xs:attribute name="id" type="xs:ID" use="required"/>
        <xs:attribute name="combineWith" type="xs:string" use="optional"/>
        <xs:attribute name="favorite" type="Tfavorite"/>
        <xs:attribute name="quality" type="Tquality"/>
    </xs:complexType> 
    
    <xs:complexType name="TonRes">
        <xs:choice>
            <xs:element name="localLock" type="TlocalLock"/>
            <xs:element name="globalLock" type="TglobalLock"/>
            <xs:element name="noLock" type="TnoLock"/>
        </xs:choice>
        <xs:attribute name="uri" type="xs:anyURI" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="TisRes">
        <xs:choice>
            <xs:element name="localLock" type="TlocalLock"/>
            <xs:element name="globalLock" type="TglobalLock"/>
            <xs:element name="noLock" type="TnoLock"/>
        </xs:choice>
    </xs:complexType>
    
    <xs:complexType name="TaboutRes">
        <xs:sequence>
            <xs:element name="noLock" type="TnoLock"/>
        </xs:sequence>
        <xs:attribute name="uri" type="xs:anyURI" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="TlocalLock">
        <xs:choice>
            <xs:element name="multipleUtterance" type="TUtterance"/>
            <xs:element name="singleUtterance" type="TUtterance"/>
        </xs:choice>
        <xs:attribute name="grain" type="Tgrain" use="required"/>
        <xs:attribute name="token" type="Ttoken" use="optional"/>
    </xs:complexType>
    
    <xs:complexType name="TglobalLock">
        <xs:choice>
            <xs:element name="multipleUtterance" type="TUtterance"/>
            <xs:element name="singleUtterance" type="TUtterance"/>
        </xs:choice>
        <xs:attribute name="token" type="Ttoken" use="optional"/>
    </xs:complexType>
    
    <xs:complexType name="TnoLock">
        <xs:sequence>
            <xs:element name="multipleUtterance" type="TUtterance"/>
        </xs:sequence>
    </xs:complexType>
    
     <xs:complexType name="TUtterance">
        <xs:attribute name="update" type="Tupdate" use="required"/>
        <xs:attribute name="visibility" type="Tvisibility" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="Ttransport">
        <xs:sequence>
            <xs:element name="transportProtocol" type="TProtocol" maxOccurs="unbounded"/>
            <xs:element name="securityProtocol" type="TProtocol" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    
    <xs:complexType name="TProtocol" mixed="true">
          <xs:attribute name="version" type="xs:string" use="optional"/>
    </xs:complexType>
      
    <!--ATTRIBUTI-->
    
    <xs:simpleType name="Treneg">
        <xs:restriction base="xs:boolean">
            <xs:pattern value="true|false"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="Ttype">
        <xs:restriction base="xs:string">
            <xs:enumeration value="createNew"/>
            <xs:enumeration value="partecipate"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="Tmedia">
        <xs:restriction base="xs:string">
            <xs:enumeration value="text/plain"/>
            <xs:enumeration value="text/html"/>
            <xs:enumeration value="text/xml"/>
            <xs:enumeration value="audio/mpeg"/>
            <xs:enumeration value="video/mpeg"/>
            <xs:enumeration value="image/gif"/>
            <xs:enumeration value="image/jpg"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="Tfavorite">
        <xs:restriction base="xs:string">
            <xs:pattern value="true|false"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="Tquality">
        <xs:restriction base="xs:decimal">
            <xs:pattern value="1.00|0.80|0.50|0.30|0.00"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="Tgrain">
        <xs:restriction base="xs:string">
            <xs:enumeration value="character"/>
            <xs:enumeration value="word"/>
            <xs:enumeration value="line"/>
            <xs:enumeration value="paragraph"/>
            <xs:enumeration value="chapter"/>
            <xs:enumeration value="page"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="Ttoken">
        <xs:restriction base="xs:string">
            <xs:enumeration value="pool"/>
            <xs:enumeration value="client"/>
            <xs:enumeration value="server"/>
            <xs:enumeration value="user"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="Tupdate">
        <xs:restriction base="xs:string">
            <xs:enumeration value="pseudoPush"/>
            <xs:enumeration value="realPush"/>
            <xs:enumeration value="pull"/>
        </xs:restriction>
    </xs:simpleType>
    
    <xs:simpleType name="Tvisibility">
        <xs:restriction base="xs:string">
            <xs:enumeration value="private"/>
            <xs:enumeration value="public"/>
        </xs:restriction>
    </xs:simpleType>
    
</xs:schema>

Xml Schema della utterance

utterance.xsd


<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" 
    targetNamespace="http://www.cs.unibo.it/CUML/1.0/utterance.xsd"
    xmlns="http://www.cs.unibo.it/CUML/1.0/utterance.xsd">
    
    <xs:element name="utterance" type="Tutterance"/>
    
    <xs:complexType name="Tutterance">
        <xs:sequence>
            <xs:element name="conversation" type="Tconversation"/>
            <xs:element name="sender" type="Tsender"/>
            <xs:element name="resource" type="Tresource"/>
            <xs:element name="content" type="Tcontent"/>
        </xs:sequence>
    </xs:complexType>
        
    <xs:complexType name="Tcontent">
        <xs:attribute name="media" type="Tmedia" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="Tconversation">
        <xs:attribute name="id" type="xs:ID" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="Tsender">
        <xs:attribute name="uniqueName" type="xs:string" use="required"/>
    </xs:complexType>
    
    <xs:complexType name="Tresource">
        <xs:attribute name="uri" type="xs:anyURI" use="required"/>
    </xs:complexType>
    
    <xs:simpleType name="Tmedia">
        <xs:restriction base="xs:string">
            <xs:enumeration value="text/plain"/>
            <xs:enumeration value="text/html"/>
            <xs:enumeration value="text/xml"/>
            <xs:enumeration value="audio/mpeg"/>
            <xs:enumeration value="video/mpeg"/>
            <xs:enumeration value="image/gif"/>
            <xs:enumeration value="image/jpg"/>
        </xs:restriction>
    </xs:simpleType>
</xs:schema>

-- ChiaraPilo - 06 Jan 2006
to top

Copyright © 1999-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Fabio's Wiki? Send feedback