Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
57 lines (46 sloc) 1.93 KB
<?xml version="1.0" encoding="UTF-8"?>
<!-- Oppidum framework
Login form generation
Author: Stéphane Sire <>
Turns a <Login> model to a <site:content> module containing a login dialog
box. Does nothing if the model contains a <Redirected> element (e.g. as a
consequence of a successful login when handling a POST - see login.xql).
July 2011
<xsl:stylesheet version="1.0"
<xsl:output method="xml" media-type="text/html" omit-xml-declaration="yes" indent="yes"/>
<!-- integrated URL rewriting... -->
<xsl:param name="xslt.base-url"></xsl:param>
<xsl:template match="/">
<xsl:apply-templates select="*"/>
<!-- Login dialog box -->
<xsl:template match="Login[not(Redirected)]">
<form action="{$xslt.base-url}login?url={To}" method="POST" style="margin: 0 auto 0 2em; width: 20em">
<p style="text-align: right">
<label for="login-user">Nom d'utilisateur</label>
<input id="login-user" type="text" name="user" value="{User}"/>
<p style="text-align: right">
<label for="login-passwd">Mot de passe</label>
<input id="login-passwd" type="password" name="password"/>
<p style="text-align: right; margin-right: 30px">
<input type="submit"/>
<xsl:template match="Login[Redirected]">
<p>Goto <a href="{Redirected}"><xsl:value-of select="Redirected"/></a></p>