Advertisement

07.09.2004 at 03:45AM PDT, ID: 21053117
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.6

using xlst to change xml

Asked by steveexmet in Extensible Markup Language (XML)

Hi, im new to this (well xlst) and need to manipulate an xml document. im using the aspnetmenu control and now wish to dynamically build the menu from a list of user access rights.
here is my MENU xml below (a cut down version)
<MenuData ImagesBaseURL="/img/">
 <MenuGroup CssClass="TopGroup">
  <MenuItem Label="System" IsVisible="false" URL="/system.aspx" ID="system">
   <MenuGroup ID="g_System">
    <MenuItem Label="Stock" IsVisible="false" URL="/stock.aspx" ID="stock">
     <MenuGroup>
      <MenuItem Label="Frames" IsVisible="false" URL="/frames.aspx" ID="st_fr" />
      <MenuItem Label="Lenses" IsVisible="false" URL="/lenses.aspx" ID="st_le" />
     </MenuGroup>
    </MenuItem>
    <MenuItem Label="Reports" IsVisible="false" URL="/topReports.aspx" ID="reports" >
     <MenuGroup>
      <MenuItem Label="Customer" IsVisible="false" URL="/customer.aspx" ID="re_cu" />
      <MenuItem Label="Appointments" IsVisible="false" URL="/apps.aspx" ID="re_ap" />
      </MenuGroup>
    </MenuItem>
   </MenuGroup>
  </MenuItem>
 </MenuGroup>
</MenuData>

hers is my ACCESSRIGHTS xml from the backend call
<accessrights>
 <user id="001">
  <right>system</right>
  <right>stock</right>
  <right>st_fr</right>
  <right>reports</right>
  <right>re_ap</right>
 </user>
</accessrights>

what i wish to do is from the ACCESSRIGHTS xml i wish to cycle through the MENU xml and where a matching "ID" is found i wish to change the IsVisible attribute to true, thus enabling the menu item, if no access rights are found for a specific item then the menu item obviously remains invisible.in this little example i have added here the menu would all be enabled apart from the 2 options (customer under reports, and Lenses under stock)

many thanks and i hope is it clear enough to work from
steveStart Free Trial
[+][-]07.12.2004 at 02:25AM PDT, ID: 11527561

View this solution now by starting your 14-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Extensible Markup Language (XML)
Sign Up Now!
Solution Provided By: conorj
Participating Experts: 1
Solution Grade: A
 
 
[+][-]11.17.2004 at 03:56AM PST, ID: 12603151

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11.21.2004 at 02:57AM PST, ID: 12637569

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 14-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43