<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================= -->
<!--                    HEADER                                     -->
<!-- ============================================================= -->
<!--  MODULE:    DITA User Interface Domain                        -->
<!--  VERSION:   1.2                                             -->
<!--  DATE:      November 2009                                     -->
<!--                                                               -->
<!-- ============================================================= -->

<!-- ============================================================= -->
<!-- SYSTEM:     Darwin Information Typing Architecture (DITA)     -->
<!--                                                               -->
<!-- PURPOSE:    Define elements and specialization attributes     -->
<!--             for User Interface Domain                         -->
<!--                                                               -->
<!-- ORIGINAL CREATION DATE:                                       -->
<!--             March 2001                                        -->
<!--                                                               -->
<!--             (C) Copyright OASIS-Open.org 2005, 2009                -->
<!--             (C) Copyright IBM Corporation 2001, 2004.         -->
<!--             All Rights Reserved.                              -->
<!-- ============================================================= -->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
  attributeFormDefault="unqualified">
  <!-- Import namespace for xml:space attribute for element screen -->
  <xs:import namespace="http://www.w3.org/XML/1998/namespace"   schemaLocation="urn:oasis:names:tc:dita:xsd:xml.xsd:1.2"/>
  
  <xs:annotation>
    <xs:appinfo>
      <dita:domainsModule xmlns:dita="http://dita.oasis-open.org/architecture/2005/">(topic ui-d)</dita:domainsModule>
    </xs:appinfo>
    <xs:documentation> 
    
    </xs:documentation>
  </xs:annotation>

  <xs:group name="ui-d-ph">
    <xs:choice>
      <xs:element ref="uicontrol"/>
      <xs:element ref="menucascade"/>
    </xs:choice>
  </xs:group>

  <xs:group name="ui-d-keyword">
    <xs:choice>
      <xs:element ref="wintitle"/>
    </xs:choice>
  </xs:group>

  <xs:group name="ui-d-pre">
    <xs:choice>
      <xs:element ref="screen"/>
    </xs:choice>
  </xs:group>

  <xs:group name="uicontrol">
    <xs:sequence>
      <xs:choice>
        <xs:element ref="uicontrol"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:group name="shortcut">
    <xs:sequence>
      <xs:choice>
        <xs:element ref="shortcut"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:group name="wintitle">
    <xs:sequence>
      <xs:choice>
        <xs:element ref="wintitle"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:group name="menucascade">
    <xs:sequence>
      <xs:choice>
        <xs:element ref="menucascade"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:group name="screen">
    <xs:sequence>
      <xs:choice>
        <xs:element ref="screen"/>
      </xs:choice>
    </xs:sequence>
  </xs:group>

  <xs:element name="uicontrol">
    <xs:annotation>
      <xs:documentation>
        The user interface control (&lt;<keyword>uicontrol</keyword>&gt;) element represents
        a button, entry field, menu item, or other object that allows the user to
        control the interface. This could also include a menu or dialog. For example,
        use the &lt;<keyword>uicontrol</keyword>&gt; element inside a &lt;<keyword>menucascade</keyword>&gt; element
        when the menu item is nested, such as <menucascade>
          <uicontrol>File</uicontrol>
          <uicontrol>New</uicontrol>
        </menucascade>. This element is part
        of the DITA user interface domain, a special set of DITA elements designed
        to document user interface tasks, concepts and reference information.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="uicontrol.class">
          <xs:attribute ref="class" default="+ topic/ph ui-d/uicontrol "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="uicontrol.class" mixed="true">
    <xs:sequence>
      <xs:group ref="uicontrol.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="uicontrol.attributes"/>
  </xs:complexType>
  
  <xs:group name="uicontrol.content">
    <xs:sequence>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="image" minOccurs="0"/>
      <xs:group ref="shortcut" minOccurs="0"/>
      <xs:group ref="words.cnt" minOccurs="0"/>
    </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="uicontrol.attributes">
    <xs:attribute name="keyref" type="xs:string"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attributeGroup ref="univ-atts"/>
  </xs:attributeGroup>

  <xs:element name="shortcut">
    <xs:annotation>
      <xs:documentation>
        The &lt;<keyword>shortcut</keyword>&gt; element identifies
        a keyboard shortcut for a menu or window action. This element is part of the
        DITA user interface domain, a special set of DITA elements designed to document
        user interface tasks, concepts and reference information.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="shortcut.class">
          <xs:attribute ref="class" default="+ topic/keyword ui-d/shortcut "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="shortcut.class" mixed="true">
    <xs:sequence>
      <xs:group ref="shortcut.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="shortcut.attributes"/>
  </xs:complexType>
  
  <xs:group name="shortcut.content">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="text" minOccurs="0"/>
    </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="shortcut.attributes">
    <xs:attribute name="keyref" type="xs:string"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attributeGroup ref="univ-atts"/>
  </xs:attributeGroup>


  <xs:element name="wintitle">
    <xs:annotation>
      <xs:documentation>
          The window title &lt;<keyword>wintitle</keyword>&gt; element represents the title
          text that appears at the top of a window or dialog, and applies to wizard
          titles, wizard page titles, and pane titles. This element is part of the DITA
          user interface domain, a special set of DITA elements designed to document
          user interface tasks, concepts and reference information.
        </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="wintitle.class">
          <xs:attribute ref="class" default="+ topic/keyword ui-d/wintitle "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="wintitle.class" mixed="true">
    <xs:sequence>
      <xs:group ref="wintitle.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="wintitle.attributes"/>
  </xs:complexType>
  
  <xs:group name="wintitle.content">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:group ref="text" minOccurs="0"/>
    </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="wintitle.attributes">
    <xs:attribute name="keyref" type="xs:string"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attributeGroup ref="univ-atts"/>
  </xs:attributeGroup>

  <xs:element name="menucascade">
    <xs:annotation>
      <xs:documentation>
        The &lt;<keyword>menucascade</keyword>&gt; element is used to document
        a series of menu choices, or to show any choice on a menu from which the user
        needs to choose. The &lt;<keyword>menucascade</keyword>&gt; element contains
        one or more user interface control (&lt;<keyword>uicontrol</keyword>&gt;) elements,
        for example: <codeph>Start &gt; Programs &gt; Accessories &gt; Notepad</codeph>. If
        there is more than one &lt;<keyword>uicontrol</keyword>&gt; element, the formatter
        may show connecting characters between the menu items to represent the menu
        cascade. This element is part of the DITA user interface domain, a special
        set of DITA elements designed to document user interface tasks, concepts and
        reference information.
      </xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="menucascade.class">
          <xs:attribute ref="class" default="+ topic/ph ui-d/menucascade "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="menucascade.class">
    <xs:sequence>
      <xs:group ref="menucascade.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="menucascade.attributes"/>
  </xs:complexType>
  
  <xs:group name="menucascade.content">
    <xs:sequence>
      <xs:choice maxOccurs="unbounded">
      <xs:group ref="uicontrol"/>
    </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="menucascade.attributes">
    <xs:attribute name="keyref" type="xs:string"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attributeGroup ref="univ-atts"/>
  </xs:attributeGroup>


  <xs:element name="screen">
    <xs:annotation>
      <xs:documentation>
        The &lt;<keyword>screen</keyword>&gt; element contains or refers to a textual representation
        of a computer screen or user interface panel (window).
      </xs:documentation>
    </xs:annotation>
    <xs:complexType mixed="true">
      <xs:complexContent>
        <xs:extension base="screen.class">
          <xs:attribute ref="class" default="+ topic/pre ui-d/screen "/>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="screen.class" mixed="true">
    <xs:sequence>
      <xs:group ref="screen.content"/>
    </xs:sequence>
    <xs:attributeGroup ref="screen.attributes"/>
  </xs:complexType>
  
  <xs:group name="screen.content">
    <xs:sequence>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:group ref="basic.ph.notm" minOccurs="0"/>
        <xs:group ref="txt.incl" minOccurs="0"/>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:group ref="data.elements.incl" minOccurs="0"/>
          <xs:group ref="foreign.unknown.incl" minOccurs="0"/>
        </xs:choice>
      </xs:choice>
    </xs:sequence>
  </xs:group>
  
  <xs:attributeGroup name="screen.attributes">
    <xs:attribute name="spectitle" type="xs:string"/>
    <xs:attribute name="outputclass" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attributeGroup ref="univ-atts"/>
    <xs:attributeGroup ref="display-atts"/>
    <xs:attribute ref="xml:space" fixed="preserve"/>
  </xs:attributeGroup>
</xs:schema>
