<?xml version="1.0" encoding="utf-8" ?>
<xs:schema
		targetNamespace="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0"
		elementFormDefault="qualified"
		xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-4.0"
		xmlns:xs="http://www.w3.org/2001/XMLSchema">

	<xs:annotation>
		<xs:documentation>
			<!-- _locID_text="Description" _locComment="This string is displayed as a Intellisense tooltip. {Placeholder='XmlSiteMapProvider', 'SiteMap'}" -->MvcSiteMapProvider SiteMap File Schema
		</xs:documentation>
	</xs:annotation>

	<xs:complexType name="mvcSiteMapNodeType">
		<xs:choice minOccurs="0" maxOccurs="unbounded">
			<xs:element name="mvcSiteMapNode" type="mvcSiteMapNodeType" />
		</xs:choice>
		<xs:attributeGroup ref="urlNodeAttributes" />
		<xs:attributeGroup ref="providerNodeAttributes" />
		<xs:attributeGroup ref="fileNodeAttributes" />
		<xs:attributeGroup ref="frequencyNodeAttributes" />
		<xs:anyAttribute processContents="skip" />
	</xs:complexType>

	<xs:complexType name="mvcSiteMapType">
		<xs:choice minOccurs="0" maxOccurs="1">
			<xs:element name="mvcSiteMapNode" type="mvcSiteMapNodeType"/>
		</xs:choice>
		<xs:attributeGroup ref="siteMapAttributes" />
	</xs:complexType>

	<xs:element name="mvcSiteMap" type="mvcSiteMapType" />

	<xs:attributeGroup name="urlNodeAttributes">
		<xs:attribute name="key" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					(autogenerated) The unique identifier for the node.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
    <xs:attribute name="order" type="xs:int" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. Sort order of this node relative to its sibling nodes (whether they are defined in XML or in code).
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="httpMethod" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          The HTTP method that will be used to check node accessibility. This value is used to select correct controller action if a controller has multiple action accepting different HTTP verbs. Set to * to use HTTP method of current request.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="resourceKey" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional resource key.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="title" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>
          The title of the node.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="description" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Description of the node.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="targetFrame" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional target frame for the node link.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="imageUrl" type="xs:anyURI" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional image to be shown by supported HtmlHelpers. 
          May be any absolute URL, root relative URL beginning with '/',
          or virtual path relative URL beginning with '~/'.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="imageUrlProtocol" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional protocol to be used when building the image URL, such as http or https. 
          Defaults to the protocol of the current request if not provided.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="imageUrlHostName" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional host name to be used when building the image URL, such as www.somewhere.com.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="roles" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Comma-separated list of roles allowed to access the node and its child nodes.
          This is for backward compatibility with ASP.NET. Use the AuthorizeAttribute for MVC.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>

    <!-- Visibility -->
    <xs:attribute name="visibility" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Example from demo: visibility="SiteMapPathHelper,!*"
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="visibilityProvider" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Class that will be used to determine visibility for a sitemap node.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    
    <!-- Dynamic Nodes -->
    <xs:attribute name="dynamicNodeProvider" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          A class name implementing MvcSiteMapProvider.IDynamicNodeProvider and providing dynamic nodes for the site map.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    
    <!-- URL Resolver -->
    <xs:attribute name="clickable" type="small_boolean_type" use="optional">
      <xs:annotation>
        <xs:documentation>
          Is the node clickable or just a grouping node? Default is true.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="urlResolver" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Class that will be used to generate URLs for sitemap nodes.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="url" type="xs:anyURI" use="optional">
      <xs:annotation>
        <xs:documentation>
          The URL represented by the node. May be any absolute URL, root relative URL beginning with '/', 
          or virtual path relative URL beginning with '~/'.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="cacheResolvedUrl" type="small_boolean_type" use="optional">
      <xs:annotation>
        <xs:documentation>
          Should the resolved URL be cached (true) or resolved on each request (false)? Default is true.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="includeAmbientValuesInUrl" type="small_boolean_type" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. Whether or not to include request route values and/or query string values when resolving the
          URL (for route/action URLs only). Default is false.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="protocol" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. The protocol that will be built into the URL.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="hostName" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. The host name that will be built into the URL.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    
    <!-- Canonical Tag -->
    <xs:attribute name="canonicalKey" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. The key value for the node that contains the primary copy of the content for the current node, if it is largely similar.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="canonicalUrl" type="xs:anyURI" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. The primary URL for what is completely or mostly duplicated content on the current node.
          The value may be an absolute URL (in the current site or in an external site), a root relative URL starting with '/', 
          or a virtual application URL starting with '~/'.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="canonicalUrlProtocol" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. The protocol to use when resolving the canonical URL, such as http or https. 
          Defaults to http if not provided.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="canonicalUrlHostName" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. The host name to use when resolving the canonical URL, such as www.somewhere.com.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    
    <!-- Meta Robots Values -->
    <xs:attribute name="metaRobotsValues" type="metarobots_type" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. A space-delimited list of values to apply to the robots meta tag. These will apply to all robots.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    
    <!-- Route -->
		<xs:attribute name="route" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					Can optionally be specified to bind the node URL generation to a specific route.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
    <xs:attribute name="inheritedRouteParameters" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional. Route parameters that should be inherited from the parent sitemap node in the hierarchy while constructing the sitemap.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="preservedRouteParameters" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>
          Optional preserved route parameter names (= values that will be used from the current request route).
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
		<xs:attribute name="area" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					The MVC area for the sitemap node. If not specified, it will be inherited from a node higher in the hierarchy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="controller" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					The MVC controller for the sitemap node. Case-sensitive! If not specified, it will be inherited from a node higher in the hierarchy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="action" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>
					The MVC action method for the sitemap node. If not specified, it will be inherited from a node higher in the hierarchy.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>

	<xs:attributeGroup name="fileNodeAttributes">
		<xs:attribute name="siteMapFile" type="xs:string" use="optional" />
	</xs:attributeGroup>

	<xs:attributeGroup name="providerNodeAttributes">
		<xs:attribute name="provider" type="xs:string" use="optional" />
	</xs:attributeGroup>

	<xs:attributeGroup name="frequencyNodeAttributes">
		<xs:attribute name="lastModifiedDate" type="xs:dateTime" use="optional">
			<xs:annotation>
				<xs:documentation>
					Last modified date for the node. Will be output to sitemaps XML for search engines.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="changeFrequency" type="changefrequency_type" use="optional" default="Undefined" >
			<xs:annotation>
				<xs:documentation>
					Change frequency for the node. Will be output to sitemaps XML for search engines.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="updatePriority" type="updatepriority_type" default="Undefined" use="optional">
			<xs:annotation>
				<xs:documentation>
					Update priority for the node. Will be output to sitemaps XML for search engines.
				</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>

	<xs:attributeGroup name="siteMapAttributes">
		<!-- Put sitemap attributes here -->
	</xs:attributeGroup>

	<xs:simpleType name="small_boolean_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="false" />
			<xs:enumeration value="true" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="changefrequency_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="Undefined" />
			<xs:enumeration value="Always" />
			<xs:enumeration value="Never" />
			<xs:enumeration value="Hourly" />
			<xs:enumeration value="Daily" />
			<xs:enumeration value="Weekly" />
			<xs:enumeration value="Monthly" />
			<xs:enumeration value="Yearly" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="updatepriority_type">
		<xs:restriction base="xs:NMTOKEN">
			<xs:enumeration value="Undefined" />
			<xs:enumeration value="Automatic" />
			<xs:enumeration value="Low" />
			<xs:enumeration value="Normal" />
			<xs:enumeration value="High" />
			<xs:enumeration value="Critical" />

			<xs:enumeration value="Absolute_000" />
			<xs:enumeration value="Absolute_010" />
			<xs:enumeration value="Absolute_020" />
			<xs:enumeration value="Absolute_030" />
			<xs:enumeration value="Absolute_040" />
			<xs:enumeration value="Absolute_050" />
			<xs:enumeration value="Absolute_060" />
			<xs:enumeration value="Absolute_070" />
			<xs:enumeration value="Absolute_080" />
			<xs:enumeration value="Absolute_090" />
			<xs:enumeration value="Absolute_100" />
		</xs:restriction>
	</xs:simpleType>

	<xs:simpleType name="metarobots_type">
		<xs:list>
			<xs:simpleType>
				<xs:restriction base="xs:token">
					<xs:enumeration value="index"/>
					<xs:enumeration value="noindex"/>
					<xs:enumeration value="follow"/>
					<xs:enumeration value="nofollow"/>
					<xs:enumeration value="none"/>
					<xs:enumeration value="noarchive"/>
					<xs:enumeration value="nocache"/>
					<xs:enumeration value="nosnippet"/>
					<xs:enumeration value="nopreview"/>
					<xs:enumeration value="noodp"/>
					<xs:enumeration value="noydir"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:list>
	</xs:simpleType>
</xs:schema>