Title: Question about UtilExtension

Hi, was just wondering if the plan with the utilextension is to pull this out into a util.xsd file in V3?
As the other extensions like iis has their own .xsd files.

For others who want to add intellisense for XMLFile this is how to do it:

1. Created the file Util.xsd (or whatever) in %iprogramfiles%\Windows Installer XML v3\doc (if default install location is used)

2. Copy and paste the content below util.xsd into the file you created.
3. Edit catalog.xml in %programfiles%\Microsoft Visual Studio 8\Xml\Schemas
4. Add the following line :

<Schema href="" Files\Windows Installer XML v3\doc\util.xsd"
          targetNamespace="http://schemas.microsoft.com/wix/UtilExtension" />  

5. Ready to go, and the nice ting is you can add more of the util schema if the need presents itself.

6. To use this in VS 2005, add the following at the top of the wix file:

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

7. To access the XMLFile element with intellisense just write <util: in you'r wix code.
8. That's it.

    

Util.xsd :

<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:html="http://www.w3.org/1999/xhtml"
            xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
             xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension"
      targetNamespace="http://schemas.microsoft.com/wix/UtilExtension"
                xmlns="http://schemas.microsoft.com/wix/UtilExtension">
    <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 Internet Information Services Extension.
        </xs:documentation>
    </xs:annotation>

    <xs:import namespace="http://schemas.microsoft.com/wix/2006/wi" />
   
    <xs:element name="XmlFile">
        <xs:annotation>
            <xs:appinfo>
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" />
            </xs:appinfo>
            <xs:documentation>
                Adds or removes .xml file entries.  If you use the XmlFile element you must link with wixca.wixlib because it requires the XmlFile custom actions.

            </xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:attribute name="Id" use="required" type="xs:string">
                <xs:annotation>
                    <xs:documentation>Identifier for xml file modification.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="ElementPath" use="required" type="xs:string">
                <xs:annotation>
                    <xs:documentation>The XPath of the element to be modified.  Note that this is a formatted field and therefore, square brackets in the XPath must be escapted.</xs:documentation>

                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="File" use="required" type="xs:string">
                <xs:annotation>
                <xs:documentation>Path of the .xml file to configure.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="Name" type="xs:string">
                <xs:annotation>
                <xs:documentation>Name of XML node to set/add to the specified element.  Not setting this attribute causes the element's text value to be set.  Otherwise this specified the attribute name that is set.</xs:documentation>

                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="Value" type="xs:string">
                <xs:annotation>
                <xs:documentation>The value to be written.</xs:documentation>
                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="CreateElement" use="optional" type="YesNoType">
                <xs:annotation>
                <xs:documentation>Specifies whether or not to create an Element with the name specified in the Name attribute.</xs:documentation>

                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="Action" use="required">
                <xs:annotation>
                <xs:documentation>The type of modification to be made to the XML file when the component is installed.</xs:documentation>

                </xs:annotation>
                <xs:simpleType>
                    <xs:restriction base="xs:NMTOKEN">
                        <xs:enumeration value="createElement">
                            <xs:annotation>
                            <xs:documentation>Creates a new element under the element specified in ElementPath.  The Name attribute is required in this case and specifies the name of the new element.  The Value attribute is not necessary when createElement is specified as the action.  If the Value attribute is set, it will cause the new element's text value to be set.</xs:documentation>

                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="deleteValue">
                            <xs:annotation>
                            <xs:documentation>Deletes a value from the element specified in the ElementPath.  If Name is specified, the attribute with that name is deleted.  If Name is not specified, the text value of the element specified in the ElementPath is deleted.  The Value attribute is ignored if deleteValue is the action specified.</xs:documentation>

                            </xs:annotation>
                        </xs:enumeration>
                        <xs:enumeration value="setValue">
                            <xs:annotation>
                            <xs:documentation>Sets a value in the element specified in the ElementPath.  If Name is specified, and attribute with that name is set to the value specified in Value.  If Name is not specified, the text value of the element is set.  Value is a required attribute if setValue is the action specified.</xs:documentation>

                            </xs:annotation>
                        </xs:enumeration>
                    </xs:restriction>
                </xs:simpleType>
            </xs:attribute>
            <xs:attribute name="Permanent" type="YesNoType">
                <xs:annotation>
                <xs:documentation>Specifies whether or not the modification should be removed on uninstall.  This has no effect on uninstall if the action was deleteValue.</xs:documentation>

                </xs:annotation>
            </xs:attribute>
            <xs:attribute name="Sequence" use="optional" type="xs:integer">
                <xs:annotation>
                <xs:documentation>Specifies the order in which the modification is to be attempted on the XML file.  It is important to ensure that new elements are created before you attempt to add an attribute to them.</xs:documentation>

                </xs:annotation>
            </xs:attribute>
        </xs:complexType>
    </xs:element>
   
    <xs:simpleType name="YesNoType">
        <xs:annotation>
            <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
        </xs:annotation>
        <xs:restriction base='xs:NMTOKEN'>
            <xs:enumeration value="no"/>
            <xs:enumeration value="yes"/>
        </xs:restriction>
    </xs:simpleType>
   
</xs:schema>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to