You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Conal Tuohy <co...@paradise.net.nz> on 2002/04/05 01:34:59 UTC

xt:document in cocoon?

I have some questions about using the XT extension "document" in Cocoon.

This feature allows an XSLT to produce multiple output documents; it's often
used (outside of Cocoon) to produce a collection of small web pages from a
large source file. I have access to some XSLT code which does this, which
I'd like to use in Cocoon.

It seems to me, though, that this implies a kind of "batch-processing"
paradigm, and that Cocoon (being part of an http server), is more suited to
having XSLT files that produce a single output document (returned to the
user's browser). If xt:document is at all useful in Cocoon, it would be e.g.
to take data posted from an HTML form and save it to the disk from within an
XSLT.

What do others think? Am I right? Am I best to hack the XSLT code I have
which uses xt:document? Has anyone else had to do something similar?

BTW, I notice that in XSLT 1.1 the W3C intended to make this feature
standard, but XSLT 1.1 was abandoned, and the feature has been removed from
the XSLT 2 Requirements document http://www.w3.org/TR/xslt20req


---
Conal Tuohy
conalt@paradise.net.nz


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: xt:document in cocoon?

Posted by Robert Koberg <ro...@koberg.com>.
Hi,

Conal Tuohy wrote:

>I have some questions about using the XT extension "document" in Cocoon.
>
>This feature allows an XSLT to produce multiple output documents; it's often
>used (outside of Cocoon) to produce a collection of small web pages from a
>large source file. I have access to some XSLT code which does this, which
>I'd like to use in Cocoon.
>
>It seems to me, though, that this implies a kind of "batch-processing"
>paradigm, and that Cocoon (being part of an http server), is more suited to
>having XSLT files that produce a single output document (returned to the
>user's browser). If xt:document is at all useful in Cocoon, it would be e.g.
>to take data posted from an HTML form and save it to the disk from within an
>XSLT.
>
>What do others think? 
>
I think it is like using a slegdehammer to kill a fly. If you need a web 
interface, just write a simple servlet to trigger the transformation.

But, if this is a small part of a larger app and you don't want to spend 
too much time rewriting the XSLT you could probably convert it to xalan 
by using the the redirect extension instead of xt:document. It is just a 
transformation against an XML after all.

Or if this is for learning or fun (it does not sound like there is a 
deep architectural need) then by all means rewrite it in cocoon and kill 
that fly.

best,
-Rob



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org