Click here to Skip to main content
15,896,557 members
Articles / Programming Languages / Visual Basic

RestrictedUI: A .NET Library for restricting a user interface based on a security policy

Rate me:
Please Sign up or sign in to vote.
4.30/5 (17 votes)
26 May 2010MPL21 min read 26.8K   1.3K   69  
How to control the user interface using a policy established in a declaratively way, based on user roles and application status.
<?xml version="1.0" encoding="utf-8" ?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
		xmlns:maml="http://ddue.schemas.microsoft.com/authoring/2003/5" 
		xmlns:doc="http://ddue.schemas.microsoft.com/authoring/internal"
		targetNamespace="http://ddue.schemas.microsoft.com/authoring/2003/5" 
		elementFormDefault="qualified"
        attributeFormDefault="unqualified"
        >
		
	<!-- Schema documentation -->
	<annotation>
		<documentation>
			This schema definition defines question and answer types for the CS Schema.
			This schema is part of the base layer.			
		</documentation>
	</annotation>
	
	<include schemaLocation="structure.xsd"/>	
	
	<!-- element declarations -->
	<element name="glossary">
		<annotation>
			<documentation>
				The glossary element describes a set of terms and their definitions.
			</documentation>
			<appinfo><doc:localizable>n/a</doc:localizable></appinfo>
		</annotation>
		<complexType>
			<sequence>
				<element ref="maml:title"/>
				<choice>
					<element ref="maml:glossaryDiv" maxOccurs="unbounded"/>
					<element ref="maml:glossaryEntry" maxOccurs="unbounded"/>
				</choice>
			</sequence>
			<attribute name="contentType" type="token"/>
			<attributeGroup ref="maml:contentIdentificationSharingAndConditionGroup"/>
		</complexType>
	</element>

	<element name="glossaryDiv">
		<annotation>
			<documentation>The glossaryDiv element describes a titled division within a glossary.</documentation>
			<appinfo><doc:localizable>n/a</doc:localizable></appinfo>
		</annotation>
		<complexType>
			<sequence>
				<element ref="maml:title"/>
				<element ref="maml:glossaryEntry" maxOccurs="unbounded"/>
			</sequence>
			<attributeGroup ref="maml:contentIdentificationSharingAndConditionGroup"/>
			<attribute name="class" type="string"/>
		</complexType>
	</element>
	
	<element name="glossaryEntry">
		<annotation>
			<documentation>The glossaryEntry is a single definition in the glossary with a set of terms attached.</documentation>
			<appinfo><doc:localizable>n/a</doc:localizable></appinfo>
		</annotation>
		<complexType>
			<sequence>
				<element ref="maml:terms"/>
				<element ref="maml:definition"/>
				<element name="relatedEntry" minOccurs="0" maxOccurs="unbounded">
				    <annotation>
				        <appinfo><doc:localizable>n/a</doc:localizable></appinfo>
				    </annotation>
					<complexType>
						<attribute name="termId" type="token" use="required"/>
						<attribute name="relationType" type="string" use="required"/>
					</complexType>
				</element>
			</sequence>
			<attributeGroup ref="maml:contentIdentificationSharingAndConditionGroup"/>
			<attribute name="platform" type="string" use="optional"/>
			<attribute name="product" type="string" use="optional"/>
		</complexType>
	</element>
	
	<element name="terms">
		<annotation>
			<documentation>The various terms that are associated with this entry. Each term has attributes to specify its use and other idenitfying attributes</documentation>
			<appinfo><doc:localizable>n/a</doc:localizable></appinfo>
		</annotation>
		<complexType>
			<sequence maxOccurs="unbounded">
				<element name="term">
				    <annotation>
				        <appinfo><doc:localizable>true</doc:localizable></appinfo>
				    </annotation>
					<complexType mixed="true">
						<attribute name="termClass" type="string" use="required"/>
						<attribute name="partOfSpeech" type="string" use="optional" default="noun"/>
						<attribute name="geographicalUsage" type="string" use="optional"/>
						<attribute name="language" type="string" use="optional"/>
					</complexType>
				</element>
			</sequence>
		</complexType>
	</element>

</schema>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Mozilla Public License 1.1 (MPL 1.1)


Written By
Spain Spain
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions