<!-- DTD for CORBA Component Descriptor. The root element is
     <corbacomponent>. Elements are listed alphabetically.
-->

<!-- Simple xml link attributes based on W3C WD-xlink-19980303.
     May change when XLL is finalized. -->

<!ENTITY % simple-link-attributes "
    xml:link    CDATA   #FIXED 'SIMPLE'
    href        CDATA   #REQUIRED
">

<!ELEMENT accessmode EMPTY>
<!ATTLIST accessmode
    mode (READ_ONLY|READ_WRITE) #REQUIRED >

<!ELEMENT componentfeatures
    ( inheritscomponent?
    , supportsinterface*
    , ports
    , operationpolicies?
    , extension*
    ) >
<!ATTLIST componentfeatures
    name    CDATA #REQUIRED
    repid   CDATA #REQUIRED >

<!ELEMENT componentkind
    ( service
    | session
    | process
    | entity
    | unclassified
    ) >

<!ELEMENT componentproperties
    ( fileinarchive
    ) >

<!ELEMENT componentrepid EMPTY >
<!ATTLIST componentrepid
    repid   CDATA #IMPLIED >

<!ELEMENT containermanagedpersistence
    ( storagehome
    , pssimplementation?
    , accessmode
    , psstransaction
    , params?
    ) >

<!ELEMENT configurationcomplete EMPTY >
<!ATTLIST configurationcomplete
    set ( true | false ) #REQUIRED >

<!ELEMENT consumes
    ( eventpolicy
    , extension* ) >
<!ATTLIST consumes
    consumesname    CDATA   #REQUIRED
    eventtype       CDATA   #REQUIRED >

<!ELEMENT corbacomponent
    ( corbaversion
    , cormponentrepid
    , homerepid
    , componentkind
    , interop?
    , transaction?
    , security?
    , threading
    , configurationcomplete
    , extendedpoapolicy*
    , repository?
    , segment*
    , componentproperties?
    , homeproperties?
    , homefeatures+
    , componentfeatures+
    , interface*
    , extension*
    ) >

<!ELEMENT corbaversion (#PCDATA) >

<!ELEMENT description ( #PCDATA ) >

<!ELEMENT emits
    ( eventpolicy
    , extension* ) >
<!ATTLIST emits
    emitsname CDATA #REQUIRED
    eventtype CDATA #REQUIRED >

<!ELEMENT entity
    ( servant ) >

<!ELEMENT eventpolicy EMPTY>
<!ATTLIST eventpolicy
    policy ( normal | default | transaction ) #IMPLIED>

<!ELEMENT extendedpoapolicy EMPTY>
<!ATTLIST extendedpoapolicy
    name    CDATA #REQUIRED
    value   CDATA #REQUIRED >

<!-- The "extension" element is used for vendor-specific extensions -->
<!ELEMENT extension (#PCDATA) >
<!ATTLIST extension
    class     CDATA #REQUIRED
    origin    CDATA #REQUIRED
    id        ID #IMPLIED
    extra     CDATA #IMPLIED
    html-form CDATA #IMPLIED >

<!-- The "fileinarchive" element is used to specify a file in the
     archive. If the file is in another archive then link is used to
     point to the archive in which the file may be found.
  -->
<!ELEMENT fileinarchive
    ( link? ) >
<!ATTLIST fileinarchive
    name CDATA #REQUIRED >

<!ELEMENT homefeatures
    ( inheritshome?
    , operationpolicies?
    , extension* ) >
<!ATTLIST homefeatures
    name  CDATA #REQUIRED
    repid CDATA #REQUIRED >

<!ELEMENT homeproperties
    ( fileinarchive
    ) >

<!ELEMENT homerepid EMPTY >
<!ATTLIST homerepid
    repid CDATA #IMPLIED >

<!ELEMENT inheritscomponent EMPTY>
<!ATTLIST inheritscomponent
    repid CDATA #REQUIRED>

<!ELEMENT inheritshome EMPTY>
<!ATTLIST inheritshome
    repid CDATA #REQUIRED>

<!ELEMENT inheritsinterface EMPTY>
<!ATTLIST inheritsinterface
    repid CDATA #REQUIRED>

<!ELEMENT ins EMPTY>
<!ATTLIST ins
    name CDATA #REQUIRED >

<!ELEMENT interface
    ( inheritsinterface*
    , operationpolicies? ) >
<!ATTLIST interface
    name  CDATA #REQUIRED
    repid CDATA #REQUIRED >

<!ELEMENT interop EMPTY>
<!ATTLIST interop
    type        CDATA                   #REQUIRED
    direction   ( hasview | isview )    #REQUIRED
    descriptor  CDATA                   #REQUIRED >

<!ELEMENT link ( #PCDATA ) >
<!ATTLIST link
    %simple-link-attributes; >

<!ELEMENT objref EMPTY>
<!ATTLIST objref
    string CDATA #REQUIRED >

<!ELEMENT operation
    ( transaction?
    , requiredrights? ) >
<!ATTLIST operation
    name CDATA #REQUIRED >

<!-- an operation name of "*" specifies all operations in the current
scope -->
<!ELEMENT operationpolicies
    ( operation+ ) >

<!ELEMENT param EMPTY >
<!ATTLIST param
    name  CDATA #REQUIRED
    value CDATA #REQUIRED >

<!ELEMENT params (param+) >

<!ELEMENT poapolicies EMPTY>
<!ATTLIST poapolicies
    thread              (ORB_CTRL_MODEL | SINGLE_THREAD_SAFE )  #REQUIRED
    lifespan            (TRANSIENT | PERSISTENT )               #REQUIRED
    iduniqueness        (UNIQUE_ID | MULTIPLE_ID)               #REQUIRED
    idassignment        (USER_ID | SYSTEM_ID)                   #REQUIRED
    servantretention    (RETAIN | NON_RETAIN)                   #REQUIRED
    requestprocessing   (USE_ACTIVE_OBJECT_MAP_ONLY
                        |USE_DEFAULT_SERVANT
                        |USE_SERVANT_MANAGER)                   #REQUIRED
    implicitactivation  (IMPLICIT_ACTIVATION
                        |NON_IMPLICIT_ACTIVATION)               #REQUIRED >

<!ELEMENT ports
    ( uses
    | provides
    | emits
    | publishes
    | consumes
    )* >

<!ELEMENT process
    ( servant ) >

<!ELEMENT provides
    ( operationpolicies?
    , extension* ) >
<!ATTLIST provides
    providesname    CDATA #REQUIRED
    repid           CDATA #REQUIRED
    facettag        CDATA #REQUIRED >

<!ELEMENT pssimplementation EMPTY>
<!ATTLIST pssimplementation
    id CDATA #REQUIRED >

<!ELEMENT psstransaction (psstransactionisolationlevel?) >
<!ATTLIST psstransaction
    policy (TRANSACTIONAL|NON_TRANSACTIONAL) #REQUIRED >

<!ELEMENT psstransactionisolationlevel EMPTY>
<!ATTLIST psstransactionisolationlevel
    level (READ_UNCOMMITTED|READ_COMMITTED|REPEATABLE_READ|SERIALIZABLE)
            #REQUIRED >

<!ELEMENT publishes
    ( eventpolicy
    , extension* ) >
<!ATTLIST publishes
    publishesname   CDATA #REQUIRED
    eventtype       CDATA #REQUIRED >

<!ELEMENT repository
    ( ins
    | objref
    | link
    ) >
<!ATTLIST repository
    type CDATA #IMPLIED >

<!ELEMENT requiredrights
    ( right* ) >

<!ELEMENT right
    ( description? ) >
<!ATTLIST right
    name CDATA #REQUIRED >

<!ELEMENT security
    ( requiredrights? ) >
<!ATTLIST security
    rightsfamily        CDATA #REQUIRED
    rightscombinator    (secallrights | secanyrights) #REQUIRED >

<!ELEMENT segment
    ( segmentmember+
    , containermanagedpersistence?
    , extension*
    ) >
<!ATTLIST segment
    name        CDATA #REQUIRED
    segmenttag  CDATA #REQUIRED >

<!ELEMENT segmentmember EMPTY>
<!ATTLIST segmentmember
    facettag CDATA #REQUIRED >

<!ELEMENT servant EMPTY >
<!ATTLIST servant
    lifetime (component|method|transaction|container) #REQUIRED >

<!ELEMENT service EMPTY >

<!ELEMENT session
    ( servant ) >

<!ELEMENT storagehome EMPTY>
<!ATTLIST storagehome
    id CDATA #REQUIRED >

<!ELEMENT supportsinterface
    ( operationpolicies?
    , extension* ) >
<!ATTLIST supportsinterface
    repid CDATA #REQUIRED >

<!ELEMENT threading EMPTY>
<!ATTLIST threading
    policy ( serialize | multithread ) #REQUIRED >

<!ELEMENT transaction EMPTY >
<!ATTLIST transaction
    use (self-managed|not-supported|required|supports|requiresnew|
        mandatory|never) #REQUIRED >
<!ELEMENT unclassified
    ( poapolicies ) >

<!ELEMENT uses ( extension* ) >
<!ATTLIST uses
    usesname    CDATA #REQUIRED
    repid       CDATA #REQUIRED >
