View Single Post
  #5 (permalink)  
Old March 1st, 2007, 01:22 PM
kwilliams kwilliams is offline
Points: 1,561, Level: 16
Points: 1,561, Level: 16 Points: 1,561, Level: 16 Points: 1,561, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jul 2005
Location: , , .
Posts: 317
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks for pointing that out. I reviewed the section, and applied it to my page with some success. I'm on the "About Us" page, and I want to create a link to the "Area Links" page. But my setup is only pulling some of the attributes for the "About Us" page from the Web.sitemap doc, whether or not I try to specify another id attribute. This is how I have the XSLT doc set up:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" 
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
    <xsl:template match="/">
        <xsl:apply-templates select="*"/>
About UsThis page contains basic information about us.
(NOTE: Only the title and description attributes are displayed from the Web.sitemap doc for the About Us page)

I also tried adding another template to the page with a call for the Area Links page, like this:
    <xsl:template match="/">
        <xsl:apply-templates select="*"/>
    <xsl:template match="sitemap/siteMap/siteMapNode/siteMapNode/siteMapNode[@id='arealinks']">

...but I just received this error message:
Exception Details: System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

I also tried this:
<xsl:apply-templates select="sitemap/siteMap/siteMapNode/siteMapNode/siteMapNode[@id='arealinks']"/>

    <xsl:template match="/">

...and again, only the two About Us attributes were shown.

If you could let me know what I'm doing wrong, it would be greatly appreciated.

Reply With Quote