IntelliSense for your sitemap with MvcSiteMapSchema.xsd

Dec 16, 2010 at 1:14 PM
Edited Dec 16, 2010 at 1:18 PM

In the root of the MvcSiteMapProvider project you will find MvcSiteMapSchema.xsd.

To use this file you must add the "xmlns:xsi" and "xsi:schemalocation" attributes to the mvcSiteMap node:

<mvcSiteMap 
    xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-2.0" 
    enableLocalization="true"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:mvc-sitemap-schema MvcSiteMapSchema.xsd">

If your schema file is not in the same directory as your sitemap you can change xsi:schemaLocation to something like "urn:mvc-sitemap-schema ../Schemas/MvcSiteMapSchema.xsd"

I also created an annotated version of MvcSiteMapSchema.xsd which will show tooltips with the description of all attributes taken from http://mvcsitemap.codeplex.com/wikipage?title=Creating%20a%20first%20sitemap&referringTitle=Home

Available here:

https://gist.github.com/743413

Coordinator
Dec 21, 2010 at 12:49 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.