If you are doing SharePoint development, you will seeing a lot of XML files - ONET.XML, SCHEMA.XML, editing these is not a small task so it would be nice if you could add intellisense when editing these files in VS2005. (The next stuff applies to WSS 3.0 but can be used for all types of XML files)
For WSS 3.0 there actually is a schema definition which you can use to add intellisense - it is located underneath c:\program files\common files\microsoft shared\web server extensions\12\templates\xml\wss.xsd
There are 2 ways you can use this file:
- Right click your open XML file and go to properties Schemas and specify the file over here. This is a lot of work since you will need to do it every time again
- Add WSS.xsd to the Visual Studio schema cache . The XML editor in VS2005 provides a schema cache underneath %installdir%\xml\schemas. This schema cache is used to include standard XML schemas that are used for Intellisense and XML document validation. To add a new schema, you can easily copy an existing one, rename it and and add in your own association declaration.
<Schema href="file://C:/Program Files/Common Files/Microsoft Shared/web server extensions/12/TEMPLATE/XML/wss.xsd" targetNamespace="http://schemas.microsoft.com/sharepoint/"/>
So next time your editing one of the SharePoint XML files you should change the xmlns attribute to http://schemas.microsoft.com/sharepoint/ and VS2005 will automatically give you intellisense.
Thanks for the tip Todd and happy SharePointing everyone ...