cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barbara Post" <bab...@ifrance.com>
Subject Re: Cocoon, Java Extensions and Xalan
Date Tue, 08 Oct 2002 13:44:47 GMT
ok, rather use this kind of stylesheet, below, it runs fine for me, I have
almost the same configuration.
Then use a simple pipeline to apply the xsl to an xml file.

Cheers.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java">
 <xsl:variable name="MP5" select="java:baepp.licensekey.MP5.new()"/>
 <xsl:template match="/">
....

 <xsl:value-of select="java:endElement($MP5,local-name(.))"/>

(value returned by endElement method of my bean declared above. Can return
void, so only execution then).

Drawback : no Cocoon-like logging :-(
Ah well...

Babs

----- Original Message -----
From: "Spencer" <spencer@ubaccess.com>
To: <cocoon-users@xml.apache.org>
Sent: Monday, October 07, 2002 5:10 PM
Subject: Cocoon, Java Extensions and Xalan


> Hi
>
> I am writing some Java extensions to XSL which are working fine when I run
> them off the command line (java org.apache.xalan etc). The Java method is
> returned and added to the transformation.
>
> However, when I use Cocoon to run the transformation, there is no Java
> output. The rest of the stylesheet works fine though. I am using Cocoon
> 2.0.3, Java 1.4.1 and Tomcat/4.1.12-LE-jdk14.
>
> Any help would be grateful,
>
> thanks Spencer
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <?cocoon-process type="xslt"?>
> <?xml-stylesheet type="text/xsl" href="patternmatch.xsl"?>
> <test>
> <teststring>He
> llo</teststring>
> </test>
>
> ------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:java="java"
> xmlns:match="XSLPatternMatch">
> <xsl:template match="teststring">
> <html>
> <head>
> <title></title>
> </head>
> <body>
> <xsl:value-of select="."/>
> <xsl:copy-of select="match:match(.)"/>
> Test Test
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
> ---------
>
> public static boolean match (String pattern)
> {
>
> boolean b;
>
>
> b = Pattern.matches ("He\\Wllo", pattern);
>
>
> return b;
> }
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
> ______________________________________________________________________
> Etudiant: Wanadoo t'offre le Pack eXtense Haut D├ębit soit 150,92 euros
> d'├ęconomies ! Clique ici : http://www.ifrance.com/_reloc/mail.etudiant


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message