<!-- Entity for booleans -->
<!-- =================== -->

<!ENTITY % boolean "(TRUE|FALSE)">


<!-- Entities for symbol types -->
<!-- ========================= -->

<!ENTITY % sdlSymbolTypes1      "sdlSysDgmFrm|sdlSysTypeDgmFrm|sdlBlkDgmFrm|sdlBlkTypeDgmFrm|sdlBlkType|sdlBlk|sdlBlkTypeInst|sdlPrcsType|sdlPrcs|sdlPrcsTypeInst">
<!ENTITY % sdlSymbolTypes2      "sdlInherits|sdlPrcsTypeDgmFrm|sdlPrcsDgmFrm|sdlPrcdDgmFrm|sdlStart|sdlState|sdlInputSig|sdlSendSig|sdlSaveSig|sdlContSig">
<!ENTITY % sdlSymbolTypes3      "sdlTask|sdlDecision|sdlTransOpt|sdlJoin|sdlText|sdlComment|sdlTextExt|sdlCnctrOut|sdlCnctrIn|sdlPrcsCreation|sdlStop|sdlObjCre">
<!ENTITY % sdlSymbolTypes4      "sdlInitTimer|sdlResetTimer|sdlSemDecl|sdlSemTake|sdlSemGive|sdlPrcdProto|sdlPrcdDecl|sdlPrcdCall|sdlPrcdStart|sdlPrcdReturn">
<!ENTITY % sdlSymbolTypes5      "sdlCompState|sdlCompStateDef|sdlService|sdlCompStateDgmFrm|sdlServDgmFrm">
<!ENTITY % sdlSymbolTypes       "%sdlSymbolTypes1;|%sdlSymbolTypes2;|%sdlSymbolTypes3;|%sdlSymbolTypes4;|%sdlSymbolTypes5;">

<!ENTITY % mscSymbolTypes1      "mscExternalFrm|mscInlineExpr|mscLifeline|mscSemaphore|mscLostMsg|mscFoundMsg|mscComment">
<!ENTITY % mscSymbolTypes2      "mscGenNameArea|mscText|mscAbsTimeConstr|mscCondition|mscMscRef|mscInlineExprZone|mscSave">
<!ENTITY % mscSymbolTypes       "%mscSymbolTypes1;|%mscSymbolTypes2;">

<!ENTITY % hmscSymbolTypes      "hmscDgmFrm|hmscParallel|hmscStart|hmscEnd|hmscCondition|hmscMscRef|hmscAlternativePoint">
<!ENTITY % mscdocSymbolTypes    "mscdocDgmFrm|mscdocMscRef|mscdocHeader">

<!ENTITY % umlClassSymbolTypes  "umlClassDgmFrm|umlPckg|umlClass|umlComment|umlSys|umlBlkCls|umlBlk|umlPrcsCls|umlPrcs">
<!ENTITY % umlDeplSymbolTypes   "umlDeplDgmFrm|umlNode|umlComp|umlFile">
<!ENTITY % umlUCSymbolTypes     "umlUCDgmFrm|umlUseCase|umlActor">

<!ENTITY % SymbolType "(%sdlSymbolTypes;|%mscSymbolTypes;|%hmscSymbolTypes;|%mscdocSymbolTypes;|%umlClassSymbolTypes;|%umlDeplSymbolTypes;|%umlUCSymbolTypes;)">


<!-- Entity for lifeline component type -->
<!-- ================================== -->

<!ENTITY % LifelineComponentType "(norm|susp|meth|coreg|act)">


<!-- Entity for time interval type -->
<!-- ============================= -->

<!ENTITY % TimeIntervalType "(start|end|timeout|constraint)">


<!-- Entity for connector types -->
<!-- ========================== -->

<!ENTITY % ConnectorType "(void|chnl|chnlgate|sdlarrow|mscvoid|mscgate|mscarrowgate|hmscarrow|umlcvoid|umlassoc|umlrole|umldvoid)">


<!-- Entity for side for connectors -->
<!-- ============================== -->

<!ENTITY % Side "(n|s|w|e|x|y)">


<!-- Entity for end types for connectors -->
<!-- =================================== -->

<!ENTITY % ConnectorEndType "(voidend|arrow|midarrow|fullarrow|outltri|outldiam|filldiam|outldiamarw|filldiamarw)">


<!-- Entity for link segment orientation -->
<!-- =================================== -->

<!ENTITY % Orientation "(h|v)">


<!-- Entity for link types -->
<!-- ===================== -->

<!ENTITY % LinkType "(sbvoid|dbvoid|ssvoid|dsvoid|chnl|dec|transopt|msg|meth|rtn|instcre|assoc|spec|aggr|comp|cnx|dep)">


<!-- Entity for diagram types -->
<!-- ======================== -->

<!ENTITY % DiagramType "(sys|systype|blk|blktype|prcs|prcstype|prcd|msc|hmsc|mscdoc|class|usec|depl|compstate|service)">


<!-- Element for text in symbols/links/... -->
<!-- ===================================== -->

<!ELEMENT Text (#PCDATA)>
<!ATTLIST Text
  id  CDATA "0"
>


<!-- Element for lifeline symbol components (MSC specific) -->
<!-- ===================================================== -->
<!-- The "Text" component and "width" attribute are only for action symbols -->

<!ELEMENT LifelineComponent (Text?)>
<!ATTLIST LifelineComponent
  type    %LifelineComponentType;   #REQUIRED
  height  CDATA                     #REQUIRED
  color   CDATA                     "#000000"
  width   CDATA                     "-1"
>


<!-- Element for lifeline symbol time intervals (MSC specific) -->
<!-- ========================================================= -->

<!ELEMENT TimeInterval (Text)>
<!ATTLIST TimeInterval
  type      %TimeIntervalType;  #REQUIRED
  startpos  CDATA               #REQUIRED
  endpos    CDATA               "-1"
  offset    CDATA               #REQUIRED
  color     CDATA               "#000000"
>


<!-- Element for spanned lifelines for spanning symbols (MSC specific) -->
<!-- ================================================================= -->

<!ELEMENT SpannedLifeline EMPTY>
<!ATTLIST SpannedLifeline
  lifelineId  IDREF   #REQUIRED
>


<!-- Element for inline expression zones (MSC specific) -->
<!-- ================================================== -->

<!ELEMENT Zone EMPTY>
<!ATTLIST Zone
  zoneSymbolId  IDREF   #REQUIRED
>


<!-- Element for symbols -->
<!-- =================== -->
<!-- The "LifelineComponent" and "TimeInterval" components and the "dies" attribute are only for lifelines symbols -->
<!-- The "Zone" component is only for inline expression symbols -->
<!-- The "SpannedLifeline" component is only for spanning symbols in MSC diagrams -->
<!-- The "Symbol*" component is for contained symbols and does not apply to MSC lifelines or spanning symbols -->

<!ELEMENT Symbol (Text+, (((LifelineComponent*), (TimeInterval*)) | ((SpannedLifeline*), (Zone*)) | (Symbol*)))>
<!ATTLIST Symbol
  symbolId        ID            #REQUIRED
  type            %SymbolType;  #REQUIRED
  xCenter         CDATA         #REQUIRED
  yCenter         CDATA         #REQUIRED
  fixedDimensions %boolean;     "FALSE"
  width           CDATA         "10"
  height          CDATA         "10"
  color           CDATA         "#000000"
  fillColor       CDATA         "#ffffff"
  dies            %boolean;     "FALSE"
>


<!-- Element for connectors -->
<!-- ====================== -->

<!ELEMENT Connector (Text, Text)>
<!ATTLIST Connector
  connectorId       CDATA               ""
  attachedSymbolId  IDREF               #REQUIRED
  type              %ConnectorType;     #REQUIRED
  isOutside         %boolean;           #REQUIRED
  side              %Side;              #REQUIRED
  position          CDATA               #REQUIRED
  endType           %ConnectorEndType;  #REQUIRED
>


<!-- Element for link segments -->
<!-- ========================= -->

<!ELEMENT LinkSegment EMPTY>
<!ATTLIST LinkSegment
  orientation %Orientation; #REQUIRED
  length      CDATA         #REQUIRED
>


<!-- Element for links -->
<!-- ================= -->

<!ELEMENT Link (Text, Connector, Connector, LinkSegment*)>
<!ATTLIST Link
  linkId          CDATA       ""
  type            %LinkType;  #REQUIRED
  textSegmentNum  CDATA       #REQUIRED
  color           CDATA       "#000000"
  reverseRead     %boolean;   "FALSE"
>


<!-- Element PageSpecification -->
<!-- ========================= -->
<!-- Attributes for diagram pages; all dimensions are centimetres -->

<!ELEMENT PageSpecification EMPTY>
<!ATTLIST PageSpecification
  pageWidth     CDATA       "21"
  pageHeight    CDATA       "29.7"
  topMargin     CDATA       "1.5"
  bottomMargin  CDATA       "1.5"
  leftMargin    CDATA       "1.5"
  rightMargin   CDATA       "1.5"
  pageFooter    %boolean;   "TRUE"
>


<!-- Element DiagramPartition -->
<!-- ======================== -->
<!-- A partition in a diagram -->

<!ELEMENT DiagramPartition (PageSpecification, Symbol, Link*)>
<!ATTLIST DiagramPartition
  name      CDATA   ""
  nbPagesH  CDATA   "1"
  nbPagesV  CDATA   "1"
>


<!-- Element for diagrams -->
<!-- ==================== -->

<!ELEMENT Diagram (DiagramPartition+)>
<!ATTLIST Diagram
  type                  %DiagramType; #REQUIRED
  name                  CDATA         ""
  cellWidthMm           CDATA         "5"
  linksCrossingAllowed  %boolean;     "FALSE"
>
