cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Reijn" <j.re...@hippo.nl>
Subject RE: How to do XSLT-transformations on a SAX-stream?
Date Thu, 12 Apr 2007 14:46:23 GMT
Hi Stefan,
 
yes you can use an XSL for that. Just add the XSLT after your generation step where you have
both the query and the parameter elements in the pipeline. You will be able to put the value
inside the sql query.
 
Your transformer does not always need an xslt (src='') for processing because you can also
modify/parse the sax stream with your own custom transformer, but an XSLT is a bit easier.
 
Kind regards,
 
Jeroen Reijn

	-----Oorspronkelijk bericht----- 
	Van: Stefan Shoeman [mailto:stefan.shoeman@googlemail.com] 
	Verzonden: do 12-4-2007 15:58 
	Aan: users@cocoon.apache.org 
	CC: 
	Onderwerp: How to do XSLT-transformations on a SAX-stream?
	
	

	Hello *,
	
	I would like to paste a parameter (e.g. 23) into some sql statements.
	Both of them are in a SAX-stream (normal pipeline), which looks like
	this:
	
	----------------------------------8<-------------stream-----------------------
	<sql:query>
	                SELECT p_users.item FROM p_users WHERE p_users.user-id =
	                <xsl:value-of select="/par:parameters/par:parameter1" />
	</sql:query>
	
	<par:parameters>
	  <par:parameter1>
	   23
	  </par:parameter1>
	</par:parameters>
	---------------------------------->8-------------stream-----------------------
	
	How can I set a XSLT-transformation in the sitemap, which gets the
	parameter from the stream (It always needs a xslt-file (src=...) for
	processing)?
	
	Are there any better solutions, to get the parameter into the query?
	(The query was included by xinclude.)
	
	Thanks for reading...
	
	--
	Best Regards,
	
	Stefan Shoeman
	
	---------------------------------------------------------------------
	To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
	For additional commands, e-mail: users-help@cocoon.apache.org
	
	

Mime
View raw message