xsl:param nefunguje

Sekcia: Programovanie 19.06.2010 | 11:51
Avatar Vladimir Magyar Arch Linux  Používateľ
cafte, pisem stylesheed na moju stranku a chcem v url predavat parametre aby sa zobrazovalo to co ja chcem napr:
\<a href=\"?uid=main\"\>MAIN</a\>
takze url po kliknuti na tento link je: www.blabla.sk/index.xml?uid=main

potom chcem zobrazit to co je v parametri tak globalne zadam:
<xsl:param name="uid"/>
a potom do titulku stranky checm dat tento param:
<title><xsl:value-of select="$uid"/></title>

ale nic sa tam nezobrazi

dam to sem radsej cele:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes"/>

<xsl:param name="uid"/>

<xsl:template match="/">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="style.css" rel="stylesheet" type="text/css"/>
<title><xsl:value-of select="$uid"/>-<xsl:value-of select="//author/firstname"/> <xsl:value-of select="//author/lastname"/>`s page</title>
</head>
<body>
<div id="header">

</div>
<div id="body">
<div id="navigation">
\<a href=\"?uid=main\"\>MAIN</a\>
\<a href=\"?uid=school\"\>SCHOOL</a\>
\<a href=\"?uid=blog\"\>BLOG</a\>
\<a href=\"?uid=links\"\>LINKS</a\>
</div>
<xsl:copy-of select="//chapter[title = $uid]"/>
</div>
<div id="footer">
Copyleft (C) <xsl:value-of select="//author/firstname"/> <xsl:value-of select="//author/lastname"/> 2010
</div>
</body>
</html>
</xsl:template>

<xsl:template match="document">
<div class="document">
<div class="documentHeader">
<xsl:value-of select="title"/><br/>
<xsl:value-of select="date"/>
</div>
<xsl:copy-of select="content"/>
</div>
</xsl:template>

</xsl:stylesheet>
In a world without walls and fences, who needs windows and gates?