<!-- ===================================================================== -->
<!--
     Conglomerate Display Specification

     A document type that provides information for Conglomerate on how to 
     display XML documents of a particular type, together with hints about
     which DTD might be applicable, filename extensions, etc.

     See http://www.conglomerate.org
-->

<!--
@root dispspec
-->
<!-- ===================================================================== -->
<!-- Top-level element                                                     -->
<!-- ===================================================================== -->
<!ELEMENT dispspec ( metadata, 
                     serialisation?,
                     document-models?, 
                     element-list ) >

<!-- <metadata>:  High-level information about this dispspec -->
<!ELEMENT metadata ( name, description ) >

<!-- <serialisation>: A list of serialisation formats: -->
<!ELEMENT serialisation ( format+) >

<!-- <format>: Information about a serialisation format: -->
<!ELEMENT format EMPTY >
<!ATTLIST format
   extension  NMTOKEN  #REQUIRED 
>

<!-- <document-models>:  Information about the DTD/schemas of various kinds 
     that might relate to this document type: 
-->
<!ELEMENT document-models (external-document-model*) >
<!ELEMENT external-document-model EMPTY >
<!ATTLIST external-document-model 
   type       (dtd | w3c-xml-schema | relax-ng-schema)  #REQUIRED
   public-id  CDATA                                     #IMPLIED
   system-id  CDATA                                     #IMPLIED
>

<!-- ===================================================================== -->
<!-- <element-list>: A list of elements of various kinds:                  -->
<!-- ===================================================================== -->
<!ELEMENT element-list ( (typical-prefix*),( (element|structural-element|span-element|plugin-element)*)) >
<!ATTLIST element-list  
   nsURI               CDATA                                                           #IMPLIED
>

<!ELEMENT typical-prefix EMPTY>
<!ATTLIST typical-prefix
   prefix  NMTOKEN  #IMPLIED
>

<!-- ===================================================================== -->
<!-- The various types of element:                                         -->
<!-- ===================================================================== -->
<!-- Content model shared by all element types: -->
<!ENTITY % element.content "( name*, 
                              short-desc*,
                              header-info?, 
                              property-dialog?,
                              key-value-list?) ">

<!-- Attributes shared by all types of element: -->
<!ENTITY % element.att
"  
   localName           ID                                                                #REQUIRED
   icon                CDATA                                                             #IMPLIED
   whitespace          (normalize | preserve)                                            'normalize'

   color               CDATA                                                             #IMPLIED
   filenameXPath       CDATA                                                             #IMPLIED
">

<!-- The element types themselves: -->
<!-- FIXME:  only <element> is currently supported by the loaders: -->
<!ELEMENT structural-element %element.content; >
<!ATTLIST structural-element  
   %element.att;
>

<!ELEMENT span-element       %element.content; >
<!ATTLIST span-element        
   %element.att;
>

<!ELEMENT plugin-element     %element.content; >
<!ATTLIST plugin-element      
   %element.att;
   service-id           NMTOKEN                                                          #IMPLIED
>

<!ELEMENT element     %element.content; >
<!ATTLIST element      
   %element.att;
   type                ( plugin | embed-external-file | span | structural )              #REQUIRED
   service-id           NMTOKEN                                                          #IMPLIED
   spellcheck                ( yes | no ) #IMPLIED
>

<!-- ===================================================================== -->
<!-- Building-block elements below the main "element" elements:            -->
<!-- ===================================================================== -->

<!ELEMENT header-info EMPTY >
<!ATTLIST header-info 
   xpath  CDATA  #IMPLIED
>

<!ELEMENT name ( #PCDATA ) >
<!ATTLIST name 
   xml:lang  CDATA #IMPLIED
>

<!ELEMENT description ( #PCDATA ) >
<!ATTLIST description 
   xml:lang  CDATA #IMPLIED
>

<!ELEMENT short-desc ( #PCDATA ) >
<!ATTLIST short-desc 
   xml:lang  CDATA  #IMPLIED
>

<!ELEMENT property-dialog EMPTY >
<!ATTLIST property-dialog 
   service-id  NMTOKEN  #REQUIRED
>

<!ELEMENT key-value-list (key-value-pair)* >

<!ELEMENT key-value-pair EMPTY >
<!ATTLIST key-value-pair
   key CDATA #REQUIRED
   value CDATA #REQUIRED
>

