Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / July 2006

Tip: Looking for answers? Try searching our database.

new to xml - sitemap help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
-D- - 30 Jun 2006 03:55 GMT
I'm taking my first stab at using xml, so please bear with my novice
questions and understanding of xml.

I'm trying to create an xml file that holds all my website navigation.  If I
understand correctly, I can use xslt to create different menus from the xml
file.

What I'm trying to accomplish is to create a top menu bar, left navigation
menu bar and sub header navigation bar.  Then place the transformed xslt
menus into user controls that I can drop into my pages.

Here is how I structured my xml file:

<?xml version="1.0" encoding="utf-8" ?>
<sitemap>
<category title="Home">
 <page url="index.aspx" title="Home" />
</category>
<category title="About Us">
 <page url="/about_us/index.aspx" title="About Us" />
 <page url="/about_us/mediaroom.aspx" title="Media Room" />
 <page url="/about_us/awards.aspx" title="Awards" />
 <page url="/about_us/employment.aspx" title="Employment Opportunities" />
 <page url="/about_us/events.aspx" title="Trade Show Calendar" />
 <page url="/about_us/partners.aspx" title="Partners and Alliances" />
 <page url="/about_us/wrcmedia.aspx" title="WRC Media" />
</category>
<category title="Contact Us">
 <page url="contact.aspx" title="Contact Us" />
</category>
<category title="Customer Support">
 <page url="http://support.compasslearning.com" title="Customer Support" />
</category>
<category title="Site Map">
 <page url="sitemap.aspx" title="Site Map" />
</category>
<category title="Technology">
 <page url="/technology/index.aspx" title="Technology" />
 <page url="/technology/subscription.aspx" title="Odyssey Subscription" />
 <page url="/technology/hosted.aspx" title="Odyssey Hosted" />
 <page url="/technology/enterprise.aspx" title="Odyssey Enterprise" />
</category>
<category title="Research">
 <page url="/research/index.aspx" title="Research" />
</category>
<category title="Assessment">
 <page url="/assessment/index.aspx" title="Assessment" />
 <page url="/assessment/custom.aspx" title="Custom Assessment" />
 <page url="/assessment/explorer.aspx" title="CompassLearning Explorer" />
</category>
<category title="Curriculum">
 <page url="/curriculum/index.aspx" title="Curriculum" />
 <page url="/research/index.aspx" title="Scientifically-Based Research" />
 <page url="/curriculum/prek.aspx" title="Pre-K" />
 <page url="/curriculum/reading.aspx" title="Reading/Language Arts" />
 <page url="/curriculum/writing.aspx" title="Writing" />
 <page url="/curriculum/math.aspx" title="Mathematics" />
 <page url="/curriculum/spanmath.aspx" title="Matemáticas" />
 <page url="/curriculum/science.aspx" title="Science" />
 <page url="/curriculum/socialstudies.aspx" title="Social Studies" />
 <page url="/curriculum/crosscurricular.aspx" title="Cross Curricular" />
 <page url="/curriculum/ell.aspx" title="English Language Learners" />
 <page url="/curriculum/specialneeds.aspx" title="Children with Spcial
Needs" />
 <page url="/curriculum/secondary.aspx" title="Secondary" />
</category>
<category title="Data Management">
 <page url="/data_management/index.aspx" title="Data Management" />
 <page url="/data_management/students.aspx" title="Managing Students" />
 <page url="/data_management/standards.aspx" title="Managing Standards" />
 <page url="/data_management/reporting.aspx" title="Managing Reporting" />
</category>
<category title="Services">
 <page url="/services/index.aspx" title="Services" />
 <page url="/services/custservice.aspx" title="Customer Service" />
 <page url="/services/implementservice.aspx" title="Implementation
Services" />
 <page url="/services/supportplan.aspx" title="Annual Support Plans" />
 <page url="/services/options.aspx" title="More Options" />
 <page url="/services/prodev.aspx" title="Professional Development" />
</category>
<category title="Results">
 <page url="/results/index.aspx" title="Results" />
 <page url="/results/research.aspx" title="Product Research" />
 <page url="/results/achievement.aspx" title="Achievement Results" />
</category>
</sitemap>

for my top navigation menu, I'm trying to create an unordered list menu:

<?xml version="1.0" encoding="UTF-8" ?>
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<ul>
<xsl:for-each select="category/page">
<li><a href="<xsl:value-of select="url"/>"><xsl:value-of
select="title"/></a></li>
</xsl:for-each>
</ul>
</xsl:template>
</stylesheet>

I'm probably way off on this and need some help.  I might have structured my
xml file incorrectly as well.

Using the xml file, I want to create the top navigation menu that displays
only:

<page url="index.aspx" title="Home" />
<page url="/about_us/index.aspx" title="About Us" />
<page url="contact.aspx" title="Contact Us" />
<page url="sitemap.aspx" title="Site Map" />

Can anyone take a look at my code (probably a mess) and help me out.

Thank you.
-D- - 30 Jun 2006 06:36 GMT
I re-tooled my xml file into the following structure to better describe my
menu system:

<?xml version="1.0" encoding="utf-8" ?>
<sitemap>
<menu location="top">
 <page url="index.aspx" title="Home" />
</menu>
<menu location="top">
 <page url="/about_us/index.aspx" title="About Us" />
</menu>
<menu location="top">
 <page url="contact.aspx" title="Contact Us" />
</menu>
<menu location="top">
 <page url="http://support.compasslearning.com" title="Contact Us" />
</menu>
<menu location="top">
 <page url="sitemap.aspx" title="Site Map" />
</menu>
<menu location="main">
 <page url="/technology/index.aspx" title="Technology" />
</menu>
<menu location="main">
 <page url="/research/index.aspx" title="Research" />
</menu>
<menu location="main">
 <page url="/assessment/index.aspx" title="Assessment" />
</menu>
<menu location="main">
 <page url="/curriculum/index.aspx" title="Curriculum" />
</menu>
<menu location="main">
 <page url="/data_management/index.aspx" title="Data Management" />
</menu>
<menu location="main">
 <page url="/services/index.aspx" title="Services" />
</menu>
<menu location="main">
 <page url="/results/index.aspx" title="Results" />
</menu>
<menu location="left">
 <page url="/about_us/index.aspx" title="About Us" />
 <page url="/about_us/mediaroom.aspx" title="Media Room" />
 <page url="/about_us/awards.aspx" title="Awards" />
 <page url="/about_us/employment.aspx" title="Employment Opportunities" />
 <page url="/about_us/events.aspx" title="Trade Show Calendar" />
 <page url="/about_us/partners.aspx" title="Partners and Alliances" />
 <page url="/about_us/wrcmedia.aspx" title="WRC Media" />
</menu>
<menu location="left">
 <page url="/technology/index.aspx" title="Technology" />
 <page url="/technology/subscription.aspx" title="Odyssey Subscription" />
 <page url="/technology/hosted.aspx" title="Odyssey Hosted" />
 <page url="/technology/enterprise.aspx" title="Odyssey Enterprise" />
</menu>
<menu location="left">
 <page url="/assessment/index.aspx" title="Assessment" />
 <page url="/assessment/custom.aspx" title="Custom Assessment" />
 <page url="/assessment/explorer.aspx" title="CompassLearning Explorer" />
</menu>
<menu location="left">
 <page url="/curriculum/index.aspx" title="Curriculum" />
 <page url="/research/index.aspx" title="Scientifically-Based Research" />
 <page url="/curriculum/prek.aspx" title="Pre-K" />
 <page url="/curriculum/reading.aspx" title="Reading/Language Arts" />
 <page url="/curriculum/writing.aspx" title="Writing" />
 <page url="/curriculum/math.aspx" title="Mathematics" />
 <page url="/curriculum/spanmath.aspx" title="Matemáticas" />
 <page url="/curriculum/science.aspx" title="Science" />
 <page url="/curriculum/socialstudies.aspx" title="Social Studies" />
 <page url="/curriculum/crosscurricular.aspx" title="Cross Curricular" />
 <page url="/curriculum/ell.aspx" title="English Language Learners" />
 <page url="/curriculum/specialneeds.aspx" title="Children with Spcial
Needs" />
 <page url="/curriculum/secondary.aspx" title="Secondary" />
</menu>
<menu locatin="left">
 <page url="/data_management/index.aspx" title="Data Management" />
 <page url="/data_management/students.aspx" title="Managing Students" />
 <page url="/data_management/standards.aspx" title="Managing Standards" />
 <page url="/data_management/reporting.aspx" title="Managing Reporting" />
</menu>
<menu location="left">
 <page url="/services/index.aspx" title="Services" />
 <page url="/services/custservice.aspx" title="Customer Service" />
 <page url="/services/implementservice.aspx" title="Implementation
Services" />
 <page url="/services/supportplan.aspx" title="Annual Support Plans" />
 <page url="/services/options.aspx" title="More Options" />
 <page url="/services/prodev.aspx" title="Professional Development" />
</menu>
<menu location="left">
 <page url="/results/index.aspx" title="Results" />
 <page url="/results/research.aspx" title="Product Research" />
 <page url="/results/achievement.aspx" title="Achievement Results" />
</menu>
</sitemap>

Any input is appreciated.

Thank you.

> I'm taking my first stab at using xml, so please bear with my novice
> questions and understanding of xml.
[quoted text clipped - 112 lines]
>
> Thank you.
Alex Krawarik[MSFT] - 07 Jul 2006 17:41 GMT
One option is that if you are using ASP.NET 2.0, you get some key site
navigation infrastructure for free.

Check out

http://msdn2.microsoft.com/en-us/library/system.web.sitemap.aspx
http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.sitemapdataso
urce.aspx


and related classes.

>I re-tooled my xml file into the following structure to better describe my
> menu system:
[quoted text clipped - 229 lines]
>>
>> Thank you.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.