cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Koberg" <...@koberg.com>
Subject Re: cvs commit: xml-cocoon2/src/documentation/stylesheets book2menu.xsl
Date Fri, 07 Jun 2002 00:32:08 GMT
oh... you guys are going to have a field day with this one (I was just
playing around. I don't actually use this - it works, though :)

----- Original Message -----
From: "Vadim Gritsenko" <vadim.gritsenko@verizon.net>
>
> Can we come up then with the piece working with Xalan/Saxon/XSLT?

Is this a specific Xalan extension (have not worked with Xalan for a few
years)? Perhaps you are already doing this, but you can just call an
external java function. I have not tested it but it should work in xalan.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:passwd="java:com.livestoryboard.linux.HtPasswords"
exclude-result-prefixes="passwd" version="1.0">

<xsl:variable name="passwd" select="passwd:new('test')"/>

<xsl:template match="user">
    <xsl:if test="not(passwd:addUser($passwd, @id, @password))">
        <xsl:message>Problem adding user <xsl:value-of
select="@id"/>&#x0a;</xsl:message>
    </xsl:if>
</xsl:template>

<xsl:template match="delete">
    <xsl:if test="not(passwd:removeUser($passwd, @id))">
        <xsl:message>Problem removing user <xsl:value-of
select="@id"/>&#x0a;</xsl:message>
    </xsl:if>
</xsl:template>

<xsl:template match="change">
    <xsl:if test="not(passwd:changePassword($passwd, @id, @password))">
        <xsl:message>Problem changing password for <xsl:value-of
select="@id"/>&#x0a;</xsl:message>
    </xsl:if>
</xsl:template>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message