You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@verizon.net> on 2002/06/06 22:23:02 UTC

RE: cvs commit: xml-cocoon2/src/documentation/stylesheets book2menu.xsl

> From: gianugo@apache.org [mailto:gianugo@apache.org]
> 
> gianugo     2002/06/06 13:00:30
> 
>   Modified:    src/documentation/stylesheets book2menu.xsl
>   Log:
>   Fix as suggested by Tom Amiro of XSLTC team in order to correctly
call
>   external Java functions

Does it work with saxon?

Vadim


> 
>   Revision  Changes    Path
>   1.7       +2 -1
xml-cocoon2/src/documentation/stylesheets/book2menu.xsl
> 
>   Index: book2menu.xsl
>   ===================================================================
>   RCS file: /home/cvs/xml-
> cocoon2/src/documentation/stylesheets/book2menu.xsl,v
>   retrieving revision 1.6
>   retrieving revision 1.7
>   diff -u -r1.6 -r1.7
>   --- book2menu.xsl	30 Apr 2002 07:58:20 -0000	1.6
>   +++ book2menu.xsl	6 Jun 2002 20:00:30 -0000	1.7
>   @@ -1,7 +1,7 @@
>    <?xml version="1.0"?>
> 
>    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   -                xmlns:NetUtils="org.apache.cocoon.util.NetUtils"
>   +
>
xmlns:NetUtils="http://xml.apache.org/xslt/java/org.apache.cocoon.util.N
etUtil
> s"
>                    version="1.0">
> 
>      <xsl:param name="resource"/>
>   @@ -29,6 +29,7 @@
>         </tr>
>         <xsl:apply-templates/>
>      </xsl:template>
>   +
> 
>      <xsl:template match="menu-item">
>        <xsl:if test="not(@type) or @type!='hidden'">
> 


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


Re: cvs commit: xml-cocoon2/src/documentation/stylesheets book2menu.xsl

Posted by Robert Koberg <ro...@koberg.com>.
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" <va...@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


RE: cvs commit: xml-cocoon2/src/documentation/stylesheets book2menu.xsl

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Robert Koberg [mailto:rob@koberg.com]
> 
> ----- Original Message -----
> From: "Vadim Gritsenko" <va...@verizon.net>
> 
> > > From: Gianugo Rabellino [mailto:gianugo@apache.org]
> > >
> > > Vadim Gritsenko wrote:
> > > > call
> > > >
> > > >>  external Java functions
> > > >
> > > >
> > > > Does it work with saxon?
> > >
> > >
> > > Whoa... good question: no Saxon here :-( Can anyone check this
out?
> > > And, what if it does not work?
> >
> > Then it's no good... :-/
> 
> extensions are totally proprietary. The way to call them is different
to.
> You can use the xsl system-property function to find the vendor and
version
> to apply the correct format.

Can we come up then with the piece working with Xalan/Saxon/XSLT?

Vadim



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


Re: cvs commit: xml-cocoon2/src/documentation/stylesheets book2menu.xsl

Posted by Robert Koberg <ro...@koberg.com>.
----- Original Message -----
From: "Vadim Gritsenko" <va...@verizon.net>

> > From: Gianugo Rabellino [mailto:gianugo@apache.org]
> >
> > Vadim Gritsenko wrote:
> > > call
> > >
> > >>  external Java functions
> > >
> > >
> > > Does it work with saxon?
> >
> >
> > Whoa... good question: no Saxon here :-( Can anyone check this out?
> And,
> > what if it does not work?
>
> Then it's no good... :-/

extensions are totally proprietary. The way to call them is different to.
You can use the xsl system-property function to find the vendor and version
to apply the correct format.


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


RE: cvs commit: xml-cocoon2/src/documentation/stylesheets book2menu.xsl

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Gianugo Rabellino [mailto:gianugo@apache.org]
> 
> Vadim Gritsenko wrote:
> >>From: gianugo@apache.org [mailto:gianugo@apache.org]
> >>
> >>gianugo     2002/06/06 13:00:30
> >>
> >>  Modified:    src/documentation/stylesheets book2menu.xsl
> >>  Log:
> >>  Fix as suggested by Tom Amiro of XSLTC team in order to correctly
> >
> > call
> >
> >>  external Java functions
> >
> >
> > Does it work with saxon?
> 
> 
> Whoa... good question: no Saxon here :-( Can anyone check this out?
And,
> what if it does not work?

Then it's no good... :-/
It's only (working with Cocoon) faster replacement for Xalan right now.

>From sitemap.xsl (and xsp.xsl):
-------------------------------
xmlns:XSLTExtension="org.apache.cocoon.components.language.markup.xsp.XS
LTExtension">

  <!--
    this variable holds the instance of extension class to properly
    escape text into Java strings

    ovidiu: use the class name as the namespace to identify the
    class. This is supposedly portable across XSLT implementations.
  -->
  <xsl:variable name="extension" select="XSLTExtension:new()"
xmlns:XSLTExtension="org.apache.cocoon.components.language.markup.xsp.XS
LTExtension"/>
-------------------------------


Vadim


> Ciao,
> 
> --
> Gianugo Rabellino


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


Re: cvs commit: xml-cocoon2/src/documentation/stylesheets book2menu.xsl

Posted by Gianugo Rabellino <gi...@apache.org>.
Vadim Gritsenko wrote:
>>From: gianugo@apache.org [mailto:gianugo@apache.org]
>>
>>gianugo     2002/06/06 13:00:30
>>
>>  Modified:    src/documentation/stylesheets book2menu.xsl
>>  Log:
>>  Fix as suggested by Tom Amiro of XSLTC team in order to correctly
> 
> call
> 
>>  external Java functions
> 
> 
> Does it work with saxon?


Whoa... good question: no Saxon here :-( Can anyone check this out? And, 
what if it does not work?

Ciao,

-- 
Gianugo Rabellino





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