| career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0" encoding="UTF-8"?>
 * changepass.xsl is a set of named templates that can be used to display
 * all the prompts needed to change a password in a larger setup page.
 * Each of these templates assumes that it is in a table.  Furthermore, the
 * template that should be called directly is "changepass", and it should
 * get a parameter named "cptmpl" which is the name of the changepass
 * template to use.  It will then call the appropriate template.
 * This file should be included in an xml which uses this functionality via
 * the <xsl:inculde> directive.
 * I don't really like the way this works right now, however, it does work.
 * It feels like there should be a better way to do it.
 * Copyright (C) 2000 Devin Kowatch
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
<xsl:stylesheet xmlns:xsl="" version="1.0">

  <xsl:template name="changepass_header">
    <xsl:param name="cptmpl">normchangepass 
    <xsl:param name="verbose">yes
    <xsl:param name="ad"/>

      <!-- a normal password change -->
      <xsl:when test="$cptmpl = 'normchangepass'">
      <!-- do nothing special -->

      <!-- an OTP password change -->
      <xsl:when test="$cptmpl = 'otpchangepass'">
        <xsl:if test="$verbose = 'yes'">
          Enter A new challenge and you password into your OTP generator.
          Then input the result into the Password box below. <BR/>
        New Challenge: 
        <xsl:value-of select='$sd[@name="new challenge"]/@value'/>


  <xsl:template name="changepass_input">
    <xsl:param name="cptmpl">normchangepass
    <xsl:param name="tag">password
    <xsl:param name="sd"/>
    <xsl:variable name="plen" select="$sd[@name='pass len']/@value"/>

      <!-- a normal password change box -->
      <xsl:when test="$cptmpl = 'normchangepass'">
        <INPUT TYPE="PASSWORD" NAME="{$tag}" SIZE="{$plen}"/>

      <!-- an OTP password change box -->
      <xsl:when test="$cptmpl = 'otpchangepass'">
        <INPUT TYPE="TEXT" NAME="{$tag}" SIZE="{$plen}"/> 


... this post is sponsored by my books ...

#1 New Release!

FP Best Seller


new blog posts


Copyright 1998-2021 Alvin Alexander,
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.