WiX Database XML Schema

Element: Fragment

Description

The Fragment element is the building block of creating an installer database in WiX.

Derived By

Restricting anyType

Attributes

Name  Type  Required?  Default  Description 
Id  string  No    Optional identifier for a Fragment.

Content Model

Contains elements as defined in the following table.

Component  Type  Occurs  Description 
    0..*   
any    1..1  Allow any element from the ##other namespace.
AppId  anyType (restriction)  1..1  Application ID containing DCOM information for the associated application GUID.

Binary  anyType (restriction)  1..1  Binary data used for CustomAction elements and UI controls.
ComplianceCheck  anyType (restriction)  1..1  Adds a row to the CCPSearch table.
Component  anyType (restriction)  1..1  Component for parent Directory
ComponentGroup  anyType (restriction)  1..1  Groups together multiple components to be used in other locations.
Condition  string (extension)  1..1  Conditions for components, controls, features, and products.
CustomAction  string (extension)  1..1  Specifies a custom action to be added to the MSI CustomAction table.
CustomActionRef  anyType (restriction)  1..1  This will cause the entire contents of the Fragment containing the referenced CustomAction to be included in the installer database.
CustomTable  anyType (restriction)  1..1  Defines a custom table for use from a custom action.
Directory  anyType (restriction)  1..1  Directory layout for the product.
DirectoryRef  anyType (restriction)  1..1  Create a reference to a Directory element in another Fragment.
EmbeddedChainer  string (extension)  1..1   
EmbeddedChainerRef  anyType (restriction)  1..1  Reference to an EmbeddedChainer element.
EnsureTable  anyType (restriction)  1..1  Use this element to ensure that a table appears in the installer database, even if its empty.
Feature  anyType (restriction)  1..1  A feature for the Feature table.
FeatureGroup  anyType (restriction)  1..1  Groups together multiple components, features, and merges to be used in other locations.
FeatureRef  anyType (restriction)  1..1  Create a reference to a Feature element in another Fragment.
Icon  anyType (restriction)  1..1  Icon used for Shortcut, ProgId, or Class elements (but not UI controls)
IgnoreModularization  anyType (restriction)  1..1  This element has been deprecated.
Media  anyType (restriction)  1..1  Media element describes a disk that makes up the source media for the installation.
PatchCertificates  anyType (restriction)  1..1  Identifies the possible signer certificates used to digitally sign patches.
PatchFamily  anyType (restriction)  1..1  Collection of items that should be kept from the differences between two products.
Property  anyType (restriction)  1..1  Property value for a Product or Module.
PropertyRef  anyType (restriction)  1..1  Reference to a Property value.
    1..1   
InstallExecuteSequence  anyType (restriction)  0..1   
InstallUISequence  anyType (restriction)  0..1   
AdminExecuteSequence  anyType (restriction)  0..1   
AdminUISequence  anyType (restriction)  0..1   
AdvertiseExecuteSequence  anyType (restriction)  0..1   
SetDirectory  string (extension)  1..1  Sets a Directory to a particular value.
SetProperty  string (extension)  1..1  Sets a Property to a particular value.
SFPCatalog  anyType (restriction)  1..1  Adds a system file protection update catalog file
UI  anyType (restriction)  1..1  Enclosing element to compartmentalize UI specifications.
UIRef  anyType (restriction)  1..1  Reference to a UI element. This will force the entire referenced Fragment's contents to be included in the installer database.
Upgrade  anyType (restriction)  1..1  Upgrade info for a particular UpgradeCode
WixVariable  anyType (restriction)  1..1  This element exposes advanced WiX functionality.

Remarks

Once defined, the Fragment becomes an immutable, atomic unit which can either be completely included or excluded from a product. The contents of a Fragment element can be linked into a product by utilizing one of the many *Ref elements. When linking in a Fragment, it will be necessary to link in all of its individual units. For instance, if a given Fragment contains two Component elements, you must link both under features using ComponentRef for each linked Component. Otherwise, you will get a linker warning and have a floating Component that does not appear under any Feature.

Definition

<xs:element name="Fragment">
<xs:annotation>
<xs:documentation>
The Fragment element is the building block of creating an installer database in WiX. Once defined,
the Fragment becomes an immutable, atomic unit which can either be completely included or excluded
from a product. The contents of a Fragment element can be linked into a product by utilizing one
of the many *Ref elements. When linking in a Fragment, it will be necessary to link in all of its
individual units. For instance, if a given Fragment contains two Component elements, you must link
both under features using ComponentRef for each linked Component. Otherwise, you will get a linker
warning and have a floating Component that does not appear under any Feature.
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="AppId" />
<xs:element ref="Binary" />
<xs:element ref="ComplianceCheck" />
<xs:element ref="Component" />
<xs:element ref="ComponentGroup" />
<xs:element ref="Condition" />
<xs:element ref="CustomAction" />
<xs:element ref="CustomActionRef" />
<xs:element ref="CustomTable" />
<xs:element ref="Directory" />
<xs:element ref="DirectoryRef" />
<xs:element ref="EmbeddedChainer" />
<xs:element ref="EmbeddedChainerRef" />
<xs:element ref="EnsureTable" />
<xs:element ref="Feature" />
<xs:element ref="FeatureGroup" />
<xs:element ref="FeatureRef" />
<xs:element ref="Icon" />
<xs:element ref="IgnoreModularization" />
<xs:element ref="Media" />
<xs:element ref="PatchCertificates" />
<xs:element ref="PatchFamily" />
<xs:element ref="Property" />
<xs:element ref="PropertyRef" />
<xs:element ref="SetDirectory" />
<xs:element ref="SetProperty" />
<xs:element ref="SFPCatalog" />
<xs:element ref="UI" />
<xs:element ref="UIRef" />
<xs:element ref="Upgrade" />
<xs:element ref="WixVariable" />
<xs:sequence>
<xs:element ref="InstallExecuteSequence" minOccurs="0" />
<xs:element ref="InstallUISequence" minOccurs="0" />
<xs:element ref="AdminExecuteSequence" minOccurs="0" />
<xs:element ref="AdminUISequence" minOccurs="0" />
<xs:element ref="AdvertiseExecuteSequence" minOccurs="0" />
</xs:sequence>
<xs:any namespace="##other" processContents="lax">
<xs:annotation>
<xs:documentation>
Extensibility point in the WiX XML Schema. Schema extensions can register additional
elements at this point in the schema.
</xs:documentation>
</xs:annotation>
</xs:any>
</xs:choice>
<xs:attribute name="Id" type="xs:string">
<xs:annotation>
<xs:documentation>
Optional identifier for a Fragment. Should only be set by advanced users to tag sections.
</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>