You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sven Kuenzler <sv...@tzi.de> on 2000/03/24 14:36:38 UTC

HOWTO: Dynamic Filter

Hello,

I have a xsl  style sheet that filters a todos from a list that match a
certain criteria

<template match="todo/@resp='svenk'">

(The syntax may be incorrect but you get the idea)
Now, I want this filter to work for all members of my project, i.e. the
string 'svenk' must be dynamically replaced.

Which is the most efficient way to do this using XSLT, XSP etc? I could
do something with the document() function of XSLT, but that would be
rather ugly.


	Sven....

Re: HOWTO: Dynamic Filter

Posted by Sven Kuenzler <sv...@tzi.de>.
> I have a xsl  style sheet that filters a todos from a list that match a
> certain criteria
> 
> <template match="todo/@resp='svenk'">
> 
> (The syntax may be incorrect but you get the idea)
> Now, I want this filter to work for all members of my project, i.e. the
> string 'svenk' must be dynamically replaced.
> 

I've tried to do this with XSP

<?xml version="1.0" encoding="ISO-8859-1"?>
<?cocoon-process type="xsp"?>


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                             
xmlns:xsp="http://www.apache.org/1999/XSP/Core">

<xsl:variable name="concerns">
    <xsp:expr>request.getParameter("concerns")</xsp:expr>
</xsl:variable>
[...]
But Cocoon does not process this xsp expression but rather delivers the
text "request...." as
variable content. What am I doing wrong?

	Sven....