<?xml version="1.0" encoding="UTF-8"?>
<!--
    Blueprint schema 1.1
-->

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
    targetNamespace="http://mobile.yahoo.com/widgets/schema/1.5/blueprint/"
    xmlns="http://mobile.yahoo.com/widgets/schema/1.5/blueprint/">

    <xs:element name="page">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="models" minOccurs="0"/>
                <xs:element ref="page-header" minOccurs="0"/>
                <xs:element ref="content"/>
                <xs:element ref="page-footer" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="style" default="list">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="document"/>
                        <xs:enumeration value="list"/>
                        <xs:enumeration value="form"/>
                        <xs:enumeration value="collection"/>
                        <xs:enumeration value="showcase"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="transient" type="xs:boolean" default="false"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="tracking">
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="pixel-tracking"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>

    <xs:element name="pixel-tracking">
        <xs:complexType>
            <xs:attribute name="resource" type="xs:anyURI" use="required"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="page-header">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="title-bar" minOccurs="0"/>
                <xs:choice minOccurs="0">
                    <xs:element ref="page-title"/>
                    <xs:element ref="page-logo"/>
                </xs:choice>
                <xs:element ref="back-title" minOccurs="0"/>
                <xs:choice minOccurs="0">
                    <xs:element ref="one-search"/>
                    <xs:element ref="masthead"/>
                    <xs:element ref="link-set"/>
                    <xs:element ref="search-box"/>
                </xs:choice>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="page-logo">
        <xs:complexType>
            <xs:attribute name="resource" type="xs:anyURI"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="masthead">
        <xs:annotation>
            <xs:documentation> A masthead is a placard-like layout for a header. It only supports
                the card and simple layouts. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="layout-items"/>
            </xs:sequence>
            <xs:attribute name="layout" default="simple">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="card">
                            <xs:annotation>
                                <xs:documentation> The card layout allows 0..2 images and 1..n
                                    blocks. It lays out the first image to the left and any second
                                    image to the right. The blocks are laid out top-to-bottom in the
                                    center. </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="simple">
                            <xs:annotation>
                                <xs:documentation> The simple layout allows an optional image and 1
                                    block. It lays out the image on the left and the block
                                    immediately to its right. You should use a 'small' image for
                                    this type of layout.</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="page-footer">
        <xs:complexType>
            <xs:sequence>
                <xs:group ref="FooterContents" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:group name="FooterContents">
        <xs:sequence>
            <xs:choice>
                <xs:element ref="default-footer"/>
                <xs:group ref="ModuleContents"/>
            </xs:choice>
        </xs:sequence>
    </xs:group>

    <xs:element name="default-footer">
        <xs:complexType/>
    </xs:element>

    <xs:element name="title-bar">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="logo" minOccurs="0"/>
                <xs:element ref="title" minOccurs="0"/>
                <xs:element ref="commands" minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="logo">
        <xs:complexType>
            <xs:attribute name="resource" type="xs:anyURI" use="optional"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="commands">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="3">
                <xs:element ref="ui-command"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="content">
        <xs:complexType>
            <xs:sequence>
                <xs:group ref="ModuleContents" maxOccurs="unbounded"/>
                <xs:element ref="tracking" minOccurs="0"/>
                <xs:element ref="options" minOccurs="0"/>
                <xs:element ref="goto" minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>


    <xs:element name="options">
        <xs:complexType>
            <xs:sequence minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="option"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:group name="ModuleContents">
        <xs:sequence>
            <xs:choice>
                <xs:element ref="module"/>
                <xs:element ref="group"/>
                <xs:group ref="InnerContent"/>
            </xs:choice>
        </xs:sequence>
    </xs:group>

    <xs:element name="module">
        <xs:annotation>
            <xs:documentation> A module is a basic building block of a widget. It is used to group
                like pieces of data into one container. It also typically has a header.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="header" minOccurs="0"/>
                <xs:group ref="ModuleContents" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="appearance" default="normal">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="normal"/>
                        <xs:enumeration value="group"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attributeGroup ref="ControlAttrs"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="group">
        <xs:complexType>
            <xs:sequence>
                <xs:group ref="InnerContent" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="appearance" default="full">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKENS">
                        <xs:enumeration value="full"/>
                        <xs:enumeration value="compact"/>
                        <xs:enumeration value="minimal"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="header">
        <xs:annotation>
            <xs:documentation> Headers are used for sections, modules, and submodules. You can
                include one optional ui-command in your header. You currently only need to supply a
                title (no icon).</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="layout-items"/>
                <xs:element ref="ui-command" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="layout" default="simple">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="card">
                            <xs:annotation>
                                <xs:documentation> The card layout allows 0..2 images and 1..5
                                    blocks. It lays out the first image to the left and any second
                                    image to the right. The blocks are laid out top-to-bottom in the
                                    center. </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="simple">
                            <xs:annotation>
                                <xs:documentation> The simple layout allows an optional image and 1
                                    block. It lays out the image on the left and the block
                                    immediately to its right. You should use a 'small' image for
                                    this type of layout.</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="goto">
        <xs:annotation>
            <xs:documentation> The goto element is used to add items to the Options menu (in Yahoo!
                Go). Under XHTML, the goto items are displayed in a section at the bottom of the
                page as a series of links. Please note this element should be used sparingly as
                devices may go so far as to ignore this element. It should be considered optional,
                and you should never use it as part of the core functionality of your application.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence maxOccurs="unbounded">
                <xs:element ref="option"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>


    <!-- ============= [GLOBAL] REUSABLE ELEMENTS  ================= -->
    
    <xs:element name="title" type="xs:string"/>
    <xs:element name="back-title" type="xs:string"/>
    <xs:element name="page-title" type="xs:string"/>
    <xs:element name="text" type="xs:string"/>
    <xs:element name="placeholder" type="xs:string"/>
    <xs:element name="icon" type="xs:anyURI"/>
    <xs:element name="loading-text" type="xs:string"/>
    <xs:element name="loading-title" type="xs:string"/>

    <!-- ============= MODEL ELEMENTS  ================= -->

    <xs:element name="models">
        <xs:complexType>
            <xs:sequence maxOccurs="unbounded">
                <xs:element ref="model"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="model">
        <xs:complexType>
            <xs:sequence>
                <xs:group ref="ModelContents" minOccurs="0" maxOccurs="unbounded"/>
                <xs:group ref="Actions" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attributeGroup ref="CommonAttrs"/>
        </xs:complexType>
    </xs:element>

    <xs:group name="ModelContents">
        <xs:choice>
            <xs:element ref="instance"/>
            <xs:element ref="submission"/>
        </xs:choice>
    </xs:group>

    <xs:element name="instance">
        <xs:complexType>
            <xs:sequence>
                <xs:any namespace="##any" processContents="skip" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="CommonAttrs"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="submission">
        <xs:complexType>
            <xs:attribute name="resource" type="xs:anyURI" use="optional"/>
            <xs:attribute name="secure" type="xs:boolean" default="false"/>
            <xs:attribute name="method" default="urlencoded-post">
                <xs:annotation>
                    <xs:documentation> The method attribute is used to control how data is sent to
                        the resource identified by the resource attribute. Each of the different
                        methods has a serialization method associated with it. The get and
                        urlencoded-post methods use application/x-www-form-urlencoded. The post
                        method sends the data as application/xml. </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="get"/>
                        <xs:enumeration value="post"/>
                        <xs:enumeration value="urlencoded-post"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attributeGroup ref="CommonAttrs"/>
        </xs:complexType>
    </xs:element>



    <xs:element name="ui-command">
        <xs:annotation>
            <xs:documentation> A ui command is a simple action that can be expressed in the UI with
                either a title and an optional icon. When activated, any are executed. It is similar
                to a trigger, but more restrictive in what can be displayed. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="title"/>
                <xs:element ref="icon" minOccurs="0"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>


    <!-- ============= LABEL ELEMENT  ================= -->

    <xs:element name="label">
        <xs:annotation>
            <xs:documentation> The label element is used by many of the controls as their label. For
                example, it serves as the title of a trigger (button), or as the name of an item in
                a select or select1 control. </xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:sequence>
                <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:group ref="InlineElements"/>
                </xs:choice>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <!-- ============= OPTION ELEMENT  ================= -->

    <xs:element name="option" type="MenuItemType">
        <xs:annotation>
            <xs:documentation> The option element is used to build a contextual options menu that
                can be accessed by the user either by the left-soft key on Yahoo! Go, or as a series
                of links in XHTML. For example, you might have options that related to an email you
                are currently viewing for commands such as 'reply' or even 'compose'. You can put
                option elements in many different places, and the most appropriate options will be
                displayed in the menu. For example, in an email application 'compose' might be in
                the top-level of a section element, whereas 'reply' or 'delete' might be an option
                inside a placard. When the placard is selected, the options inside of the item are
                added to the options menu. This makes it behave like a contextual menu in Mac OS or
                Windows. The option element is also used by the goto menu.</xs:documentation>
        </xs:annotation>
    </xs:element>

    <xs:complexType name="MenuItemType">
        <xs:sequence>
            <xs:element ref="label"/>
            <xs:element ref="image" minOccurs="0"/>
            <xs:group ref="Actions"/>
        </xs:sequence>
    </xs:complexType>

    <!-- ============= BLOCK ELEMENT  ================= -->

    <xs:element name="block">
        <xs:annotation>
            <xs:documentation> The block element is much like the paragraph element of HTML. It is a
                container for inline content. </xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:group ref="InlineElements"/>
            <xs:attribute name="lines" type="xs:string"/>
            <xs:attribute name="class" type="xs:NMTOKENS"/>
            <xs:attribute name="halign" default="natural">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="natural"/>
                        <xs:enumeration value="opposite"/>
                        <xs:enumeration value="right"/>
                        <xs:enumeration value="center"/>
                        <xs:enumeration value="left"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <!-- ============= CONTAINERS =================== -->

    <xs:group name="InnerContent">
        <xs:annotation>
            <xs:documentation> InnerContent represents those things that can live in any container
                (basically, controls). </xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:group ref="Controls"/>
                <xs:element ref="block"/>
            </xs:choice>
        </xs:sequence>
    </xs:group>


    <!-- ============= CONTROLS  ================= -->

    <xs:group name="Controls">
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="banner"/>
                <xs:element ref="display-ad"/>
                <xs:element ref="image-list"/>
                <xs:element ref="input"/>
                <xs:element ref="link-set"/>
                <xs:element ref="location-chooser"/>
                <xs:element ref="map"/>
                <xs:element ref="navigation-bar"/>
                <xs:element ref="one-search"/>
                <xs:element ref="page-navigator"/>
                <xs:element ref="photo"/>
                <xs:element ref="placard"/>
                <xs:element ref="search-box"/>
                <xs:element ref="secret"/>
                <xs:element ref="select"/>
                <xs:element ref="select1"/>
                <xs:element ref="submit"/>
                <xs:element ref="table"/>
                <xs:element ref="text-ad"/>
                <xs:element ref="textarea"/>
                <xs:element ref="trigger"/>
            </xs:choice>
        </xs:sequence>
    </xs:group>

    <xs:element name="banner">
        <xs:complexType>
            <xs:attribute name="resource" type="xs:anyURI" use="required"/>
            <xs:attribute name="direct" type="xs:boolean" default="false"/>
            <xs:attribute name="fill-style" type="ImageFillStyleType"/>
            <xs:attribute name="caption" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="display-ad">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="banner"/>
                <xs:element name="tagline" type="xs:string" minOccurs="0"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="item">
        <xs:annotation>
            <xs:documentation> The item element is used in select and select1 controls.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:choice>
                    <xs:element ref="label"/>
                    <xs:element ref="placard"/>
                </xs:choice>
                <xs:element name="value" type="xs:string"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="input">
        <xs:annotation>
            <xs:documentation> The input element is a simple one-line text input box.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:sequence>
                <xs:element ref="label" minOccurs="0"/>
                <xs:element ref="placeholder" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="SingleNodeBinding"/>
            <xs:attributeGroup ref="ControlAttrs"/>
            <xs:attribute name="keyboard" default="normal">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="normal"/>
                        <xs:enumeration value="email"/>
                        <xs:enumeration value="url"/>
                        <xs:enumeration value="numbers"/>
                        <xs:enumeration value="phone"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="appearance" default="full">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="full"/>
                        <xs:enumeration value="compact"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="image-list">
        <xs:annotation>
            <xs:documentation> The image-list type is a generic control which shows a given list of
                images, each of which can have an action associated with it when clicked. It
                currently tries to show one row of as many images the current device's screen width
                can accomodate. There is no guarantee that each image you include will be rendered
                on screen. It is typically used as a preview of a photostream, etc. You can specify
                a link to jump to for a 'more' link. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="image-trigger" maxOccurs="unbounded"/>
                <xs:element name="more" type="NavLink" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="size" type="ImageSizeType" default="medium"/>
            <xs:attribute name="fill-style" type="ImageFillStyleType"/>
            <xs:attribute name="wrap" type="xs:boolean" default="false"/>
            <xs:attributeGroup ref="ControlAttrs"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="image-trigger">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="image"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="link-set">
        <xs:annotation>
            <xs:documentation> An unordered set of links as inline-triggers. Display of this set is
                renderer-dependent. On iPhone it might simply be a list of placards, on XHTML it
                might be a bullet-separated list of links. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence maxOccurs="unbounded">
                <xs:element ref="inline-trigger"/>
            </xs:sequence>
            <xs:attribute name="appearance" default="tab">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="tab"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="location-chooser">
        <xs:annotation>
            <xs:documentation> The location chooser control allows the user to choose a location
                which is returned to your widget. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="label" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="SingleNodeBinding"/>
            <xs:attributeGroup ref="ControlAttrs"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="navigation-bar">
        <xs:annotation>
            <xs:documentation> The navigation-bar element is used primarily as a paging control. In
                its simplest form, it could be used as a more button. If you want to use it to
                navigate between multiple pages, you can specify both the next and prev elements. If
                you desire some sort of 'back' link, you can supply the back element. If you supply
                an element, but do not supply any actions, the element will be displayed inactive
                (grayed out). You can use this technique if you are at the first or last page, for
                example. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="back" type="NavLink" minOccurs="0"/>
                <xs:element name="prev" type="NavLink" minOccurs="0"/>
                <xs:element name="next" type="NavLink" minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:complexType name="NavLink">
        <xs:sequence>
            <xs:element ref="label" minOccurs="0"/>
            <xs:group ref="Actions"/>
        </xs:sequence>
    </xs:complexType>

    <xs:element name="one-search">
        <xs:complexType/>
    </xs:element>

    <xs:element name="page-navigator">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="page-info"/>
                <xs:element name="prev" type="NavLink" minOccurs="0"/>
                <xs:element name="next" type="NavLink" minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="page-info">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="current-page" type="xs:positiveInteger"/>
                <xs:element name="page-count" type="xs:positiveInteger"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="photo">
        <xs:complexType>
            <xs:attribute name="resource" type="xs:anyURI" use="optional"/>
            <xs:attribute name="fill-style" type="ImageFillStyleType"/>
            <xs:attribute name="caption" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="placard">
        <xs:annotation>
            <xs:documentation> The placard element is probably the most commonly used element. It
                allows you to specify text and icons in various different pre-defined layouts. It
                supports a class of "link" which will give the placard a right-pointing arrow over
                on the right.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:choice>
                    <xs:element ref="layout-items"/>
                    <xs:element ref="template-items"/>
                </xs:choice>
                <xs:group ref="Actions"/>
            </xs:sequence>
            <xs:attributeGroup ref="ControlAttrs"/>
            <xs:attribute name="layout" default="simple">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="card">
                            <xs:annotation>
                                <xs:documentation> The card layout allows 0..2 images and 1..n
                                    blocks. It lays out the first image to the left and any second
                                    image to the right. The blocks are laid out top-to-bottom in the
                                    center. </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="simple">
                            <xs:annotation>
                                <xs:documentation> The simple layout allows an optional image and 1
                                    block. It lays out the image on the left and the block
                                    immediately to its right. You should use a 'small' image for
                                    this type of layout.</xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="template">
                            <xs:annotation>
                                <xs:documentation> If the template layout is chosen, the content of
                                    the placard must be a template-items element instead of a
                                    layout-items element. Templates enforce a specific layout and
                                    provide named 'slots' to put data. These slots get pre-defined
                                    styling based on the template chosen. </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="card-with-actions">
                            <xs:annotation>
                                <xs:documentation>
                                    This means that the layout-items would be extended to allow 
                                    0..2 image-trigger element. Note that image-trigger only 
                                    appears on the right, whereas an image will appear on the left. 
                                </xs:documentation>
                            </xs:annotation>
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="layout-items">
        <xs:complexType>
            <xs:annotation>
                <xs:documentation> The layout-items type is used as a container of those items
                    needed for a layout for a placard or a header. While this element as defined
                    here allows any number of image or block elements, the type of layout might only
                    allow a certain number. Also, the interpretation of those elements is up to the
                    layout type of the placard. See the different layout types in placard and header
                    for specifics. </xs:documentation>
            </xs:annotation>
            <xs:choice minOccurs="1" maxOccurs="unbounded">
                <xs:element ref="image"/>
                <xs:element ref="image-trigger"/>
                <xs:element ref="block"/>
            </xs:choice>
        </xs:complexType>
    </xs:element>
    <xs:element name="template-items">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="template-item" maxOccurs="5"/>
            </xs:sequence>
            <xs:attribute name="format" use="required">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="title-value"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="template-item">
        <xs:complexType>
            <xs:choice>
                <xs:element ref="image"/>
                <xs:element ref="image-trigger"/>
                <xs:element ref="block"/>
            </xs:choice>
            <xs:attribute name="field" type="xs:string" use="required"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="rating">
        <xs:annotation>
            <xs:documentation> The rating element allows you to specify a rating and an optional
                number of reviews that the rating is an average of. Currently it uses a fixed 5-star
                rating scale. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="stars" minOccurs="0">
                    <xs:simpleType>
                        <xs:restriction base="xs:decimal">
                            <xs:minInclusive value="0"/>
                            <xs:maxInclusive value="5"/>
                        </xs:restriction>
                    </xs:simpleType>
                </xs:element>
                <xs:element name="reviews" type="xs:nonNegativeInteger" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="appearance">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="full"/>
                        <xs:enumeration value="compact"/>
                        <xs:enumeration value="minimal"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="search-box">
        <xs:complexType>
            <xs:attributeGroup ref="SingleNodeBinding"/>
            <xs:attribute name="submission" type="xs:IDREF" use="required"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="secret">
        <xs:annotation>
            <xs:documentation> The secret element is a simple one-line edit field that obscures the
                user's input. It is used for passwords. </xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:sequence>
                <xs:element ref="label" minOccurs="0"/>
                <xs:element ref="placeholder" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="SingleNodeBinding"/>
            <xs:attributeGroup ref="ControlAttrs"/>
            <xs:attribute name="appearance" default="full">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="full"/>
                        <xs:enumeration value="compact"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="select">
        <xs:annotation>
            <xs:documentation> The select element allows the user to select one or more items from
                the list of items presented. Currently, the only presentation types supported for
                this element are 'checkboxes' and 'toggle'. The latter is used to get the "on/off"
                look on the iPhone. If a renderer cannot render toggle, it will use checkboxes
                instead. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="label" minOccurs="0"/>
                <xs:element ref="item" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="appearance" default="checkboxes">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="checkboxes"/>
                        <xs:enumeration value="toggle"/>
                        <xs:enumeration value="placard"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attributeGroup ref="SingleNodeBinding"/>
            <xs:attributeGroup ref="ControlAttrs"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="select1">
        <xs:annotation>
            <xs:documentation> The select1 element allows the user to select only one item from the
                list of items presented. Currently, the presentation types supported for this
                element are 'popup' and 'radio-group'. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="label" minOccurs="0"/>
                <xs:element ref="item" maxOccurs="unbounded"/>
            </xs:sequence>
            <xs:attribute name="appearance" default="popup">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="popup"/>
                        <xs:enumeration value="compact-popup"/>
                        <xs:enumeration value="radio-group"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attributeGroup ref="SingleNodeBinding"/>
            <xs:attributeGroup ref="ControlAttrs"/>
        </xs:complexType>
    </xs:element>


    <xs:element name="submit">
        <xs:annotation>
            <xs:documentation> The submit element is much like a trigger and is generally displayed
                as a simple button. It's purpose is to submit the current form data as specified by
                the submission element. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="label"/>
            </xs:sequence>
            <xs:attributeGroup ref="ControlAttrs"/>
            <xs:attributeGroup ref="SingleNodeBinding"/>
            <xs:attribute name="appearance">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="full"/>
                        <xs:enumeration value="button"/>
                        <xs:enumeration value="minimal"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="text-ad">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="block"/>
                <xs:element name="byline" type="xs:string"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="textarea">
        <xs:annotation>
            <xs:documentation> The textarea element is a multi-line input area. </xs:documentation>
        </xs:annotation>
        <xs:complexType mixed="true">
            <xs:sequence>
                <xs:element ref="label" minOccurs="0"/>
                <xs:element ref="placeholder" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="ControlAttrs"/>
            <xs:attributeGroup ref="SingleNodeBinding"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="trigger">
        <xs:annotation>
            <xs:documentation> The trigger element is always visualized as a button in Blueprint. We
                allow various styles however via the appearance attribute. 'button' and 'normal' are
                synonyms. Certain renderers may ignore the appearances as far as visualizations.
                These appearances are also clues to allow renderers to treat cancel and default
                buttons specially in forms. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="label"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
            <xs:attributeGroup ref="ControlAttrs"/>
            <xs:attribute name="appearance" default="button">
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="button"/>
                        <xs:enumeration value="normal"/>
                        <xs:enumeration value="default"/>
                        <xs:enumeration value="cancel"/>
                        <xs:enumeration value="warning"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <!-- ============= TABLE CONTROL  ================= -->

    <xs:element name="table">
        <xs:complexType>
            <xs:annotation>
                <xs:documentation> Tables allow display of tabular data. They might be used for data
                    such as sports scores or financial data. The table implementation in Blueprint
                    is somewhat limited, and lays out a bit different that what you might be used to
                    in HTML. First, cells in a table can only contain text at present. Second, the
                    table structure is somewhat fixed in that the 'title' of a row (e.g. the team
                    name for a sports score) is always the leftmost column, and in fact is not
                    counted as a column at all. The columns are only the set of data to display, and
                    each column or row can have a title associated with it. A table also has the
                    notion of bias, which can affect display and layout (see the bias attribute for
                    more). To fit into tight spaces, columns are dropped in a left-to-right order,
                    with the assumption that your most important data is on the right. If you wish
                    for columns to not be dropped, you can mark them required via an attribute. It
                    is imperative you do not mark too many columns required, or else on certain
                    devices your table might not be displayed because the required columns cannot
                    fit. </xs:documentation>
            </xs:annotation>
            <xs:sequence>
                <xs:element ref="columns"/>
                <xs:element ref="rows"/>
            </xs:sequence>
            <xs:attribute name="bias" default="none">
                <xs:annotation>
                    <xs:documentation> Bias controls how a table looks as well as how it is laid
                        out. The idea stems around how data is to be viewed. Some types of data
                        might be best viewed horizontally and some might be best viewed vertically.
                        For those situations, we have 'row' and 'column' bias, respectively. These
                        generally give the rows/columns alternating bands of color to help
                        readability where it can be supported. The bias affects layout by
                        essentially stating that horizontally biased tables can split into two
                        lines, where the title of the row is on one line and the tabular data is on
                        the next. This is shown in the pictures. A bias of 'none' does no visual
                        treatment, however it uses horizontal bias layout rules by default.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="row"/>
                        <xs:enumeration value="column"/>
                        <xs:enumeration value="none"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="drop-optional" default="to-fit">
                <xs:annotation>
                    <xs:documentation> The drop-optional attribute tells the table how it should
                        drop optional columns in order to fit on the current device. If set to
                        'to-fit', columns not marked 'required' are dropped in a left-to-right order
                        on devices that can support this. If set to 'all-at-once', all optional
                        columns are dropped and only required columns are rendered.
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="to-fit"/>
                        <xs:enumeration value="all-at-once"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attributeGroup ref="ControlAttrs"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="columns">
        <xs:annotation>
            <xs:documentation> The columns element holds a non-empty set of columns. There must be
                one column element for each column you wish to display. </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="column" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="column">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="title"/>
            </xs:sequence>
            <xs:attribute name="numeric-emphasis" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation> The numeric-emphasis attribute is a boolean which tells the
                        table to effectively colorize anything that parses as a number and is
                        preceded with a - or + sign. This is useful when displaying financial data.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="required" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation> The required attribute tells the table that this column is
                        required and should not be dropped if there is not enough room to display
                        all columns. Is is imperative that you do not mark too many columns required
                        or else your table will not be displayed if the required columns cannot fit
                        (or it might be displayed in a very broken manner). </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="align" default="default">
                <xs:annotation>
                    <xs:documentation> The align attribute simply controls whether the data in the
                        column should be left, right, or center aligned. The 'default' value means
                        do whatever is appropriate for the current locale (though at present, this
                        equates to left for all locales until Blueprint supports right-to-left).
                    </xs:documentation>
                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="left"/>
                        <xs:enumeration value="right"/>
                        <xs:enumeration value="center"/>
                        <xs:enumeration value="default"/>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="rows">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="row" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="row">
        <xs:annotation>
            <xs:documentation> The row element contains the a required title followed by a cell
                element which contains the data for each column. If there are not enough cells for
                the number of columns, the table will render the remaining columns as empty. If
                there are more cells than the number of columns, the extra cells are dropped.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="title"/>
                <xs:element ref="cell" maxOccurs="unbounded"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
            <xs:attribute name="emphasized" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation> The emphasized attribute tells the table that this cell
                        should be displayed in an emphasized manner. Typically, this is rendered as
                        bold. </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="cell">
        <xs:complexType mixed="true">
            <xs:attribute name="emphasized" type="xs:boolean" default="false">
                <xs:annotation>
                    <xs:documentation> The emphasized attribute tells the table that this cell
                        should be displayed in an emphasized manner. Typically, this is rendered as
                        bold. </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <!-- ============= MAP CONTROL  ================= -->

    <xs:element name="map" type="MapType"/>

    <xs:complexType name="MapType">
        <xs:annotation>
            <xs:documentation> The map element and show-map action can be used to show a particular
                location. It supports the various map modes (hybrid, satellite, etc.) as well as
                zoom levels and traffic. It can also show points of interest.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
            <xs:element name="center" type="LocationType"/>
            <xs:element ref="map-route" minOccurs="0"/>
            <xs:element ref="map-aspect" minOccurs="0"/>
            <xs:element ref="map-zoom"/>
            <xs:element ref="map-mode"/>
            <xs:element name="map-showtraffic" type="xs:boolean" minOccurs="0"/>
            <xs:element ref="map-point" minOccurs="0" maxOccurs="50"/>
            <xs:element name="display-units" type="DisplayUnits" default="metric"/>
        </xs:sequence>
        <xs:attributeGroup ref="ControlAttrs"/>
    </xs:complexType>

    <xs:complexType name="EmptyType"/>

    <xs:element name="location" type="LocationType"/>

    <xs:complexType name="LocationType">
        <xs:all>
            <xs:element name="latitude" type="xs:double"/>
            <xs:element name="longitude" type="xs:double"/>
            <xs:element name="name" minOccurs="0"/>
            <xs:element name="street" minOccurs="0"/>
            <xs:element name="city" minOccurs="0"/>
            <xs:element name="state" minOccurs="0"/>
            <xs:element name="zip" minOccurs="0"/>
            <xs:element name="country" minOccurs="0"/>
        </xs:all>
    </xs:complexType>

    <xs:element name="map-aspect" default="square">
        <xs:simpleType>
            <xs:restriction base="xs:NMTOKEN">
                <xs:enumeration value="square"/>
                <xs:enumeration value="half-height"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:element>

    <xs:element name="map-mode">
        <xs:simpleType>
            <xs:restriction base="xs:NMTOKEN">
                <xs:enumeration value="map"/>
                <xs:enumeration value="satellite"/>
                <xs:enumeration value="hybrid"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:element>

    <xs:element name="map-point">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="location" type="LocationType"/>
                <xs:element ref="placard"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="map-route">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="origin" type="LocationType"/>
                <xs:element name="destination" type="LocationType"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

    <xs:element name="map-zoom">
        <xs:simpleType>
            <xs:restriction base="xs:positiveInteger">
                <xs:maxInclusive value="18"/>
            </xs:restriction>
        </xs:simpleType>
    </xs:element>

    <!-- ============= ACTION ELEMENTS  ================= -->


    <xs:group name="Actions">
        <xs:sequence>
            <xs:choice>
                <xs:choice minOccurs="0" maxOccurs="unbounded">
                    <xs:element ref="load"/>
                    <xs:element ref="load-page"/>
                    <xs:element ref="setfocus"/>
                    <xs:element ref="show-driving-directions"/>
                    <xs:element ref="show-map"/>
                    <xs:element ref="play-video"/>
                </xs:choice>
            </xs:choice>
        </xs:sequence>
    </xs:group>

    <xs:attributeGroup name="ActionAttributes">
        <xs:attribute name="event" type="EventID"/>
    </xs:attributeGroup>

    <xs:element name="load">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="loading-text" minOccurs="0"/>
                <xs:element ref="loading-title" minOccurs="0"/>
                <xs:element ref="tracking" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="ActionAttributes"/>
            <xs:attribute name="resource" type="xs:anyURI"/>
            <xs:attribute name="secure" type="xs:boolean" default="false"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="load-page">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="loading-text" minOccurs="0"/>
                <xs:element ref="loading-title" minOccurs="0"/>
                <xs:element ref="tracking" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="ActionAttributes"/>
            <xs:attribute name="page" type="xs:anyURI"/>
            <xs:attribute name="secure" type="xs:boolean" default="false"/>
            <xs:attribute name="use-cache" type="xs:boolean" default="true"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="setfocus">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="tracking" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute name="control" type="xs:IDREF" use="required"/>
            <xs:attributeGroup ref="ActionAttributes"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="show-driving-directions">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="origin" type="LocationType"/>
                <xs:element name="destination" type="LocationType"/>
                <xs:element ref="tracking" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="ActionAttributes"/>
        </xs:complexType>
    </xs:element>


    <xs:element name="show-map">
        <xs:complexType>
            <xs:complexContent>
                <xs:extension base="MapType">
                    <xs:sequence>
                        <xs:element ref="tracking" minOccurs="0"/>
                    </xs:sequence>
                    <xs:attributeGroup ref="ActionAttributes"/>
                </xs:extension>
            </xs:complexContent>
        </xs:complexType>
    </xs:element>

    <xs:element name="play-video">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="tracking" minOccurs="0"/>
            </xs:sequence>
            <xs:attributeGroup ref="ActionAttributes"/>
            <xs:attribute name="resource" type="xs:anyURI">
                <xs:annotation>
                    <xs:documentation>
                        The resource attribute specifies the URI to the video. Only
                        Adobe Flash Video (video/x-flv) format is supported.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="bitrate" type="BitrateType" use="optional">
                <xs:annotation>
                    <xs:documentation>
                        This is a hint to the renderer to choose
                        an actual bitrate appropriate to the device, network and
                        purpose. There is no guarantee that all values do not map
                        to the lowest supported rate!
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>


    <!-- ============= INLINE ELEMENTS  ================= -->

    <xs:group name="InlineElements">
        <xs:sequence>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="br"/>
                <xs:element ref="em"/>
                <xs:element ref="image"/>
                <xs:element ref="inline-trigger"/>
                <!--               <xs:element ref="numeric-badge"/> -->
                <xs:element ref="rating"/>
                <xs:element ref="span"/>
                <xs:element ref="strong"/>
            </xs:choice>
        </xs:sequence>
    </xs:group>

    <xs:element name="br">
        <xs:complexType/>
    </xs:element>

    <xs:element name="strong">
        <xs:complexType mixed="true">
        </xs:complexType>
    </xs:element>

    <xs:element name="em">
        <xs:complexType mixed="true">
        </xs:complexType>
    </xs:element>

    <xs:element name="span">
        <xs:complexType mixed="true">
            <xs:sequence minOccurs="0" maxOccurs="unbounded">
                <xs:choice>
                    <xs:element ref="em"/>
                    <xs:element ref="strong"/>
                </xs:choice>
            </xs:sequence>
            <xs:attribute name="class" type="xs:NMTOKENS"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="image">
        <xs:complexType>
            <xs:attribute name="size" type="ImageSizeType" default="medium">
                <xs:annotation>
                    <xs:documentation>The size attribute is used to specify the size of the image
                        canvas your image will be drawn into. In general the image resource you
                        specify should be at the size that is appropriate for the current screen at
                        the current size. The image cannot be drawn outside the canvas bounds. The
                        size attribute, if present, overrides any width or height attributes.
                    </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="width" type="ImageSizeType" default="medium">
                <xs:annotation>
                    <xs:documentation>The width and height attributes allow you to specify the
                        separate dimensions of an image. If the size attribute is present,
                        width/height are ignored. </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="height" type="ImageSizeType" default="medium">
                <xs:annotation>
                    <xs:documentation>The width and height attributes allow you to specify the
                        separate dimensions of an image. If the size attribute is present,
                        width/height are ignored. </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="fill-style" type="ImageFillStyleType" default="fill">
                <xs:annotation>
                    <xs:documentation> The fill-style attribute tells the engine how to fit images
                        that are not the same size as the canvas size you are using as specified by
                        'size'. There are three options: crop (the default), fit, and fill. Crop
                        just centers the image onto the canvas and crops it. Fit scales the image so
                        that the entire image fits into the canvas. Fill scales the image so that
                        the entire canvas is filled by the image. Any part of the image that might
                        extend past the canvas after stretching is cropped. See the reference manual
                        for examples of each. </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="resource" type="xs:anyURI" use="required">
                <xs:annotation>
                    <xs:documentation>The resource attribute specifies the URI of the image.
                        Relative URIs are considered relative to a widget's submission package. For
                        example, "warp.jpg" would reference a file of the same name inside your
                        widget's resources/images/ directory. Technically though, you need only
                        specify the name of the file, e.g. "warp", as for bundled Widgets we will
                        look up the best size to use based on what images are in your images
                        directory. See the Blueprint Developer's Guide for more information on how
                        images should be named in your widget so that the engine can deal with
                        multiple screen sizes. </xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="caption" type="xs:string"/>
        </xs:complexType>
    </xs:element>

    <xs:element name="inline-trigger">
        <xs:annotation>
            <xs:documentation> The inline-trigger element is typically used as a link.
            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="label"/>
                <xs:group ref="Actions"/>
            </xs:sequence>
            <xs:attributeGroup ref="ControlAttrs"/>
        </xs:complexType>
    </xs:element>

    <!--    <xs:element name="numeric-badge" type="xs:int"/> -->

    <!-- ============= CUSTOM TYPES  ================= -->

    <xs:simpleType name="EventID">
        <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="activate">
                <xs:annotation>
                    <xs:documentation> The activate event is sent when a control is 'clicked' or, in
                        some cases, when the enter key is pressed. </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="page-ready">
                <xs:annotation>
                    <xs:documentation> A page has loaded and is ready to run. Somewhat equivalent to
                        the 'onload' handler on a page body in HTML. </xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>

    <!-- The "banner" and "photo" sizes are deprecated. Use the corresponding elements instead. -->

    <xs:simpleType name="ImageSizeType">
        <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="small"/>
            <xs:enumeration value="small-full"/>
            <xs:enumeration value="medium"/>
            <xs:enumeration value="medium-full"/>
            <xs:enumeration value="large"/>
            <xs:enumeration value="large-full"/>
            <xs:enumeration value="x-large"/>
            <xs:enumeration value="x-large-full"/>
            <xs:enumeration value="xx-large"/>
            <xs:enumeration value="xx-large-full"/>
            <xs:enumeration value="xxx-large"/>
            <xs:enumeration value="xxx-large-full"/>
            <xs:enumeration value="banner"/>
            <xs:enumeration value="photo"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="ImageFillStyleType">
        <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="crop"/>
            <xs:enumeration value="fit"/>
            <xs:enumeration value="fill"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="XPathExpression">
        <xs:restriction base="xs:string"/>
    </xs:simpleType>

    <xs:simpleType name="DisplayUnits">
        <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="english"/>
            <xs:enumeration value="metric"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="BitrateType">
        <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="low"/>
            <xs:enumeration value="medium"/>
            <xs:enumeration value="high"/>
        </xs:restriction>
    </xs:simpleType>
    <!-- ============== BINDING ==================== -->

    <xs:attributeGroup name="SingleNodeBinding">
        <xs:attribute name="ref" type="XPathExpression" use="optional"/>
        <xs:attribute name="model" type="xs:IDREF" use="optional"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="SingleNodeBindingForAction">
        <xs:attribute name="ref" type="XPathExpression" use="optional"/>
        <xs:attribute name="model" type="xs:IDREF" use="optional"/>
    </xs:attributeGroup>


    <!-- ============== COMMON ATTRS ==================== -->

    <xs:attributeGroup name="CommonAttrs">
        <xs:attribute name="id" type="xs:ID"/>
    </xs:attributeGroup>

    <xs:attributeGroup name="ControlAttrs">
        <xs:attribute name="id" type="xs:ID"/>
        <xs:attribute name="class" type="xs:NMTOKENS"/>
    </xs:attributeGroup>

</xs:schema>
