Question : Why won't my code work?

I have been trying to display a web page off of a seperate xml file that can be edited for content easily without messing with any of the element structure of the page. Problem is... I can't get it to work. Can someone help me?

My XSLT page:
 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
  <html>
  <head>
  	<title>Welcome to my page</title>
  </head>
  <body>
      <xsl:for-each select="page/header">
          <xsl:value-of select="title"/>
          <xsl:value-of select="subtitle"/>
      </xsl:for-each>
      <xsl:for-each select="page/navigation">
          <a><xsl:value-of "*"/></a>
      </xsl:for-each>
      <xsl:for-each select="page/body">
          <xsl:value-of select="*"/>
      </xsl:for-each>
      <xsl:for-each select="page/footer">
          <xsl:value-of select="*"/>
      </xsl:for-each>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet>


My XML file:
 
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
<?xml version="1.0" encoding="ISO-8859-1"?>
<page>
	<header>
		<title>Welcome to my page</title>
		<subtitle>This is my page</subtitle>
	</header>
	<navigation>
		<button link="#">Home</button>
		<button link="#">Photos</button>
		<button link="#">Videos</button>
		<button link="#">Contact</button>
	</navigation>
	<body>
		<h1>This is the body content</h1>
	</body>
	<footer>
		<copyright>Copyright Jacob Weeks 2010</copyright>
	</footer>
</page>


I also want to use each of the "button"s as a link.

Answer : Why won't my code work?

Please, get familiar with the following article:
http://www.learn-ajax-tutorial.com/Xslt.cfm

You might want to use a XML/XSL processing client side library, called Sarissa:
http://dev.abiss.gr/sarissa/
Read about it also here:
http://www.xml.com/lpt/a/1543
Random Solutions  
 
programming4us programming4us