<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
          xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension"
    targetNamespace="http://schemas.microsoft.com/wix/VSExtension"
              xmlns="http://schemas.microsoft.com/wix/VSExtension">
    <xs:annotation>
        <xs:documentation>
            Copyright (c) Microsoft Corporation.  All rights reserved.
            
            The use and distribution terms for this software are covered by the
            Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
            which can be found in the file CPL.TXT at the root of this distribution.
            By using this software in any fashion, you are agreeing to be bound by
            the terms of this license.
            
            You must not remove this notice, or any other, from this software.

            The source code schema for the Windows Installer XML Toolset Visual Studio Extension.
        </xs:documentation>
    </xs:annotation>

    <xs:element name="HelpCollection">
        <xs:annotation>
            <xs:documentation>
                Help Namespace for a help collection.  The parent file is the key for the HxC (Collection) file.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2003/01/wi" ref="File" />
            </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="HelpFileRef" />
                <xs:element ref="HelpFilterRef" />
                <xs:element ref="PlugCollectionInto" />
            </xs:choice>
            <xs:attribute name="Id" type="xs:string" use="required">
                <xs:annotation><xs:documentation>Primary Key for HelpNamespace.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="Description" type="xs:string">
                <xs:annotation><xs:documentation>Friendly name for Namespace.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="Name" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Internal Microsoft Help ID for this Namespace.</xs:documentation></xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="HelpFilter">
        <xs:annotation>
            <xs:documentation>
                Filter for Help Namespace.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2003/01/wi" ref="Fragment" />
                <xse:parent namespace="http://schemas.microsoft.com/wix/2003/01/wi" ref="Product" />
            </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="Id" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Primary Key for HelpFilter.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="FilterDefinition" type="xs:string">
                <xs:annotation><xs:documentation>Query String for Help Filter.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="Name" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Friendly name for Filter.</xs:documentation></xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="HelpFile">
        <xs:annotation>
            <xs:documentation>
                File for Help Namespace.  The parent file is the key for HxS (Title) file.
            </xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2003/01/wi" ref="File" />
            </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="Id" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Primary Key for HelpFile Table.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="AttributeIndex" type="xs:string">
                <xs:annotation><xs:documentation>Key for HxR (Attributes) file.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="Index" type="xs:string">
                <xs:annotation><xs:documentation>Key for HxI (Index) file.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="Language" type="xs:integer">
                <xs:annotation><xs:documentation>Language ID for content file.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="Name" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Internal Microsoft Help ID for this HelpFile.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="SampleLocation" type="xs:string">
                <xs:annotation><xs:documentation>Key for a file that is in the "root" of the samples directory for this HelpFile.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="Search" type="xs:string">
                <xs:annotation><xs:documentation>Key for HxQ (Query) file.</xs:documentation></xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="PlugCollectionInto">
        <xs:annotation><xs:documentation>Plugin for Help Namespace.</xs:documentation></xs:annotation>
        <xs:complexType>
            <xs:attribute name="Attributes" type="xs:string">
                <xs:annotation><xs:documentation>Key for HxA (Attributes) file of child namespace.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="TableOfContents" type="xs:string">
                <xs:annotation><xs:documentation>Key for HxT  file of child namespace.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="TargetCollection" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Foriegn Key into HelpNamespace table for the parent namespace into which the child will be inserted.</xs:documentation></xs:annotation>
            </xs:attribute>
            <xs:attribute name="TargetTableOfContents" type="xs:string">
                <xs:annotation><xs:documentation>Key for HxT  file of parent namespace that now includes the new child namespace.</xs:documentation></xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="HelpFileRef">
        <xs:annotation><xs:documentation>Create a reference to a HelpFile element in another Fragment.</xs:documentation></xs:annotation>
        <xs:complexType>
            <xs:attribute name="Id" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Primary Key for HelpFile Table.</xs:documentation></xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="HelpFilterRef">
        <xs:annotation><xs:documentation>Create a reference to a HelpFile element in another Fragment.</xs:documentation></xs:annotation>
        <xs:complexType>
            <xs:attribute name="Id" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Primary Key for HelpFilter.</xs:documentation></xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

    <xs:element name="HelpCollectionRef">
        <xs:annotation>
            <xs:documentation>Create a reference to a HelpCollection element in another Fragment.</xs:documentation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2003/01/wi" ref="Fragment" />
                <xse:parent namespace="http://schemas.microsoft.com/wix/2003/01/wi" ref="Product" />
            </xs:appinfo>
        </xs:annotation>
        <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
                <xs:element ref="HelpFileRef" />
            </xs:choice>
            <xs:attribute name="Id" use="required" type="xs:string">
                <xs:annotation><xs:documentation>Primary Key for HelpNamespace Table.</xs:documentation></xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>

</xs:schema>
