Customizer's Guide > Customizing Your Site's Profiling Configuration > Configuring Profiles > Profiling Configuration Examples > Restricting Profiles to or from Specific Elements
  
Restricting Profiles to or from Specific Elements
By restricting profiling to only certain elements, you can ensure that information is always included or included in only certain circumstances. In this example, if the toc element has a role attribute set to the value required, the element cannot be profiled by the users level of expertise. This ensures that the Table of Contents is always included when the document is published. If the user attempts to profile a toc element with its role attribute set to the value required, the profiles will be unavailable:
Example of restricted profile values.
This profiling configuration is created with the following markup:
<Profile attribute="userlevel" alias="User Level">
<NotProfileElement element="toc">
<AttributeTest name="role" value="required"/>
</NotProfileElement>
<RadioChoice>
<Allowed value="Novice"/>
<Allowed value="Typical"/>
<Allowed value="Expert"/>
</RadioChoice>
</Profile>