Advertisement

08.07.2006 at 01:38PM PDT, ID: 21946173
[x]
Attachment Details

XML elements in hrefs continued

Asked by fritz_the_blank in Extensible Markup Language (XML), Extensible HTML (XHTML)

Thank you for reading my question.

I have an XSL sheet that looks like this:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
      <xsl:template match="/">
            <ul class="clsMainNav">
                        <xsl:for-each select="navigation/heading">
                        <li>
                              <xsl:choose>
                                    <xsl:when test=".[page/@url $eq$ '__FILENAME__']">
                                          <a href="{url}"><span style="width: 35px; vertical-align: middle; "> </span><xsl:value-of select="text"/><img src="images/NavArrow.gif"  style="border: none; margin-left: 5px; valign: middle;" alt="-" /></a>
                                    </xsl:when>
                                    <xsl:otherwise>
                                          <a href="{url}"><span style="width: 35px; vertical-align: middle; "> </span><xsl:value-of select="text"/></a>
                                    </xsl:otherwise>
                              </xsl:choose>
                              <xsl:if test="subheading1">
                                    <ul class="clsSubNav1">
                                          <xsl:for-each select="subheading1">
                                                <li>
                                                      <xsl:choose>
                                                            <xsl:when test=".[page/@url $eq$ '__FILENAME__']">
                                                                  <a href="{urlsub1}"><span style="width: 35px; vertical-align: middle; "> </span><xsl:value-of select="textsub1"/><img src="images/NavArrow.gif"  style="border: none; margin-left: 5px; valign: middle;" alt="-" /></a>
                                                            </xsl:when>
                                                            <xsl:otherwise>
                                                                  <a href="{urlsub1}"><span style="width: 35px; vertical-align: middle; "> </span><xsl:value-of select="textsub1"/></a>
                                                            </xsl:otherwise>
                                                </xsl:choose>
                                                </li>
                                          </xsl:for-each>
                                    </ul>
                              </xsl:if>
                        </li>
                  </xsl:for-each>
            </ul>
      </xsl:template>
</xsl:stylesheet>


Everything is fine except that when you run the page and then view the source, the URLs do not appear correctly:


<li>
<a href="{url}"><span style="width: 35px; vertical-align: middle; ">
</span>Home</a>
</li>
<li>
<a href="{url}"><span style="width: 35px; vertical-align: middle; ">
</span>About Us</a>
<ul class="clsSubNav1">
<li>
<a href="{urlsub1}"><span style="width: 35px; vertical-align: middle; ">
</span>Mission Statement</a>
</li>
<li>
<a href="{urlsub1}"><span style="width: 35px; vertical-align: middle; ">
</span>By Laws</a>
</li>
</ul>
</li>

Would someone tell me where I am going wrong?

Thank you,

FtB
Start Free Trial
[+][-]08.07.2006 at 01:47PM PDT, ID: 17266880

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]08.07.2006 at 01:49PM PDT, ID: 17266904

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]08.07.2006 at 01:55PM PDT, ID: 17266954

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.07.2006 at 01:57PM PDT, ID: 17266972

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.07.2006 at 02:15PM PDT, ID: 17267093

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]08.07.2006 at 02:35PM PDT, ID: 17267234

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.07.2006 at 03:46PM PDT, ID: 17267642

View this solution now by starting your 7-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

Zones: Extensible Markup Language (XML), Extensible HTML (XHTML)
Sign Up Now!
Solution Provided By: Gertone
Participating Experts: 1
Solution Grade: A
 
 
[+][-]08.07.2006 at 03:53PM PDT, ID: 17267662

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.07.2006 at 04:00PM PDT, ID: 17267690

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.07.2006 at 06:13PM PDT, ID: 17268162

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.07.2006 at 06:59PM PDT, ID: 17268299

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.07.2006 at 11:06PM PDT, ID: 17269106

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]08.08.2006 at 09:30AM PDT, ID: 17272736

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]08.08.2006 at 10:57AM PDT, ID: 17273326

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

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

 
[+][-]08.08.2006 at 11:15AM PDT, ID: 17273445

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
 
Loading Advertisement...
20080716-EE-VQP-32