You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steven Punte <st...@yahoo.com> on 2002/08/18 18:52:52 UTC
IS an XSP Transformer Possible?
In the cocoon environment, XSP provides a great
way of address problems that don't fit into
the paradigm of an existing generator.
However, XSP can only be used at the first
step in a pipeline.
I find myself writing lots of custom transformers
to address issues that don't fit into any
of the existing standard generators.
Would there be a way to write an XSP Transformer?
How about we call this "XST" for now. Some of
it's characteristics would be:
o A conventional transformer class would exits.
o In a pipeline, one would specify the above
transformer and a particular xst file.
o The xst file would be compile automatically
when needed.
o A basic internal design would simply allow
hooks to the various SAX events (i.e. start and
end of element and document).
o Output events could be nicely written as in xsp
like "<yada><xst:expr>string</xst:expr></yada>"
o Perhaps a more a more interesting internal
model would come with a stack to facilitate
more complex processing.
Steve Punte
Candlelight Software
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: IS an XSP Transformer Possible?
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Steven Punte wrote:
> In the cocoon environment, XSP provides a great
> way of address problems that don't fit into
> the paradigm of an existing generator.
>
> However, XSP can only be used at the first
> step in a pipeline.
>
> I find myself writing lots of custom transformers
> to address issues that don't fit into any
> of the existing standard generators.
>
> Would there be a way to write an XSP Transformer?
> How about we call this "XST" for now. Some of
> it's characteristics would be:
I had started myself to write such a Transformer, but then I just didn't
have enough energy and motivation to continue.
If you want, I can give you some sugestions:
> o A conventional transformer class would exits.
XSTTransformer, from which all XSTTransformers extend.
> o In a pipeline, one would specify the above
> transformer and a particular xst file.
Ok.
> o The xst file would be compile automatically
> when needed.
Ok. There is a system in Cocoon that can make you do this, look in the
sourcecode.
> o A basic internal design would simply allow
> hooks to the various SAX events (i.e. start and
> end of element and document).
> o Perhaps a more a more interesting internal
> model would come with a stack to facilitate
> more complex processing.
I wrote this thing but it was complicated to debug, since there were no
tools at that time to make code easier.
If I would do it now, I would look at Jakarta Commons Digester, which
has an XML descriptor that specifies what to do for certain conditions
and can be used to do just that.
> o Output events could be nicely written as in xsp
> like "<yada><xst:expr>string</xst:expr></yada>"
Each output could simply be a call to am XSP Generator that does not
close the Document.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: IS an XSP Transformer Possible?
Posted by Vadim Gritsenko <va...@verizon.net>.
Steven Punte wrote:
>In the cocoon environment, XSP provides a great
>way of address problems that don't fit into
>the paradigm of an existing generator.
>
>However, XSP can only be used at the first
>step in a pipeline.
>
>I find myself writing lots of custom transformers
>to address issues that don't fit into any
>of the existing standard generators.
>
>Would there be a way to write an XSP Transformer?
>How about we call this "XST" for now.
>
I have prototype working, I named it XSPT. Did not had time to complete.
I was thinking to implement XSPT on top of STX language
(http://stx.gingerall.cz/stx/).
Vadim
> Some of
>it's characteristics would be:
>
>o A conventional transformer class would exits.
>o In a pipeline, one would specify the above
> transformer and a particular xst file.
>o The xst file would be compile automatically
> when needed.
>o A basic internal design would simply allow
> hooks to the various SAX events (i.e. start and
> end of element and document).
>o Output events could be nicely written as in xsp
> like "<yada><xst:expr>string</xst:expr></yada>"
>o Perhaps a more a more interesting internal
> model would come with a stack to facilitate
> more complex processing.
>
>Steve Punte
>Candlelight Software
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>