jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Bayern <shawn.bay...@yale.edu>
Subject Another taglib idea/offer: generic filters
Date Sun, 13 Aug 2000 14:45:30 GMT
Any interest in providing "content filters" that work much like
traditional Unix programs that read from stdin and write to stdout?  In
concept, they would work like the XSL "apply" tag, except that they'd deal
with unstructured rather than structured content.

I'm thinking that the best way to implement this would be to define a thin
interface, "Filter," that contains a single method declaration:

	String filterString(String in);

Classes that implement filter could then be referred to by (at least) two
tags,

    <filter:body filter="org.blah.FilterOne">
	Filter inline body content found here.
    </filter:body>

and

    <filter:uri uri="http://blah.org/base" filter="org.blah.FilterOne" />

which would filter, respectively, inline body content or the data stored
at a URI (much the way the "utility" taglib's "include" tag does).  In the
above examples, org.blah.FilterOne is just a class that implements Filter.
(Alternatively, you could pass an instance in, instead of just the name,
but this seems cleaner and more in line with existing taglib directives.)

Thoughts?  I'll have it ready in a day or so if people think it's useful.

Shawn


Mime
View raw message