cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Antonio Rosa dos Santos Junior" <Jo...@fnde.gov.br>
Subject RES: XSP in XSL
Date Fri, 19 Sep 2003 16:23:57 GMT
hmmm.. Maybe. Haven´t thought that way. Can i link two pipelines to do that instead?

I´m sending what i am trying to do:

stemap.xmap:
...
  <map:pipeline>   
    <map:match type="wildcard" pattern="*.xsp">
      <map:generate type="serverpages" src="{1}.xsp"/>
	  <map:transform type="xslt" src="pagina-fnde2html.xsl"/>
      <map:serialize type="html"/>
    </map:match>
  </map:pipeline>
...

pagina-fnde2html.xsl:
...
	<xsl:template match="pagina">
	...
	<!-- this doesn´t work --> 
	<xsp:logic>
		SimpleDateFormat format = new SimpleDateFormat("dd/MM/yyyy");
	</xsp:logic>
	<xsp:expr>
		format.format(new Date())
	</xsp:expr>
	...
	</xsl:template>
...

teste.xsp:

<?xml version='1.0' encoding='ISO-8859-1'?>
<xsp:page 
  xmlns:xsp="http://apache.org/xsp"

>
<pagina>
 <titulo>Nheco nheco</titulo>
 <conteudo>
	<!-- this works -->
 	<xsp:expr>
		new Date()
 	</xsp:expr>
 </conteudo>
</pagina>
</xsp:page>

Jose Antonio


-----Mensagem original-----
De: Luca Morandini [mailto:luca.morandini1@tin.it]
Enviada em: sexta-feira, 19 de setembro de 2003 13:10
Para: users@cocoon.apache.org
Assunto: Re: XSP in XSL


Jose Antonio Rosa dos Santos Junior wrote:
> Hi
> 
> I´m trying to put some java code in my XSL file but it seems to be not working. Every
xsp tag i put in it is ignored, and the java code is viewed in the generated HTML page.
> 
> I also made a separated logic sheet, but it only works in my XSP file. If i put it in
the XSL file it is ignored too.
> 
> Am i doing something wrong?
> 
> Jose Antonio

wait, XSP is a interpreted by a "generator", while XSL is used in a 
"transformer"... aren't you mixing the two concepts ?

Could you provide us with the relevant sitemap portion ?

Regards,

------------------------------------------
                Luca Morandini
                GIS Consultant
               lmorandini@ieee.org
http://space.virgilio.it/kumora/index.html
------------------------------------------



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


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


Mime
View raw message