Connecting Tech Pros Worldwide Forums | Help | Site Map

new to xml - sitemap help

-D-
Guest
 
Posts: n/a
#1: Jun 30 '06
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-
Guest
 
Posts: n/a
#2: Jun 30 '06

re: new to xml - sitemap help


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.

"-D-" <someone@NOSPAM.com> wrote in message
news:OAEFYH$mGHA.1248@TK2MSFTNGP05.phx.gbl...[color=blue]
> 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[/color]
I[color=blue]
> understand correctly, I can use xslt to create different menus from the[/color]
xml[color=blue]
> 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"[/color]
/>[color=blue]
> <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"[/color]
/>[color=blue]
> </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"[/color]
/>[color=blue]
> <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"[/color]
/>[color=blue]
> </category>
> <category title="Curriculum">
> <page url="/curriculum/index.aspx" title="Curriculum" />
> <page url="/research/index.aspx" title="Scientifically-Based Research"[/color]
/>[color=blue]
> <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"[/color]
/>[color=blue]
> <page url="/data_management/reporting.aspx" title="Managing Reporting"[/color]
/>[color=blue]
> </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[/color]
my[color=blue]
> 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.
>
>[/color]


Alex Krawarik[MSFT]
Guest
 
Posts: n/a
#3: Jul 7 '06

re: new to xml - sitemap help


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/lib...b.sitemap.aspx
http://msdn2.microsoft.com/en-us/lib...atasource.aspx

and related classes.


"-D-" <someone@NOSPAM.comwrote in message
news:e4dXChAnGHA.816@TK2MSFTNGP05.phx.gbl...
Quote:
>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.
>
"-D-" <someone@NOSPAM.comwrote in message
news:OAEFYH$mGHA.1248@TK2MSFTNGP05.phx.gbl...
Quote:
>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
Quote:
>understand correctly, I can use xslt to create different menus from the
xml
Quote:
>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"
/>
Quote:
> <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"
/>
Quote:
> </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"
/>
Quote:
> <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"
/>
Quote:
> </category>
> <category title="Curriculum">
> <page url="/curriculum/index.aspx" title="Curriculum" />
> <page url="/research/index.aspx" title="Scientifically-Based Research"
/>
Quote:
> <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"
/>
Quote:
> <page url="/data_management/reporting.aspx" title="Managing Reporting"
/>
Quote:
> </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
Quote:
>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.
>>
>>
>
>

Closed Thread