xml-xsp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josep Riudavets" <jriudave...@uoc.edu>
Subject Obtain XML from XSP
Date Mon, 01 Sep 2003 10:28:23 GMT

I'm trying to obtain the XML file that produces an XSP page, before pass it through XSL stylesheet.
For example: procesa.xsp is an XML file whit XSP directives. My server is running under cocoon.
When procesa.xsp is required, cocoon executes the XSP code inside it, and creates an XML structure.
This XML structure is passed througth an XSL file, and finally it is obtained the HTML file.

I want to capture in a file the XML resulted of the execution of the XSP code inside XML initial

<?xml version="1.0" encoding="UTF-8"?>

<?cocoon-process type="xsp"?>

<?cocoon-process type="xslt"?>

<xsp:page language="java" xmlns:xsp="http://apache.org/xsp" xmlns:xsp-request="http://apache.org/xsp/request/2.0"



String nom = request.getParameter("nom");

String cognoms = <xsp-request:get-parameter name="cognoms"/>;

String dni = <xsp-request:get-parameter name="dni"/>;

String objecte = <xsp-request:get-parameter name="objecte"/>;

String validador = <xsp-request:get-parameter name="validador"/>;


<titulo>Certificat academic</titulo>




<esql:query>SELECT exped FROM expedients WHERE nom='<xsp:expr>nom</xsp:expr>'
AND cognoms='<xsp:expr>cognoms</xsp:expr>' AND dni='<xsp:expr>dni</xsp:expr>';







<exped><esql:get-string column="exped"/></exped>












<?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">
<xsl:template match="procesa">
<xsl:value-of select="titulo" />
<body bgcolor="#ffffff">
<xsl:value-of select="nom"/>  <xsl:value-of select="cognoms"/><br/>
<xsl:value-of select="dni"/><br/>

El teu <b><xsl:value-of select="objecte"/></b> s'enviarà al teu mail automàticament<br/>
El validador autoritzat és: <b><xsl:value-of select="validador"/></b><br/>
Expedient academic: <b><xsl:value-of select="exped"/></b><br/>


View raw message