I wrote:
> J.Pietschmann wrote:
> > You shouldn't use document() in Cocoon style sheets anyway, for a
> > variety of reasons, one of them bein problems with caching.
> > Use <map:aggregate>, XInclude or CInclude instead.
>
> There shouldn't be a problem with caching in this case, because
> the referenced xml document is static. Any other compelling reason
> not to use document()?
>
> The referenced document in this case is a lookup-table
> that had been in my stylesheet; I decided to move it out into
> a separate XML file so I could share it between two stylesheets.
> That structural change doesn't affect the input or output of the
> stylesheet, so theoretically it shouldn't be necessary for
> the pipeline
> to know where this static data is stored
> (which it would have to if I used map:aggregate, XInclude, or
> CInclude).
OK, that's not strictly true, the pipeline wouldn't have to know
_where_ the data was stored in the case of a CInclude, but it would
have to know that the data was cincluded instead of contained in
the stylesheet directly.
That seems to me like an unfortunate diminishment of SoC.
It also would require (as far as I can tell) two extra steps in
the pipeline. Currently it's
- generate type="directory"
- transform src="framework.xsl"
With CInclude it would have to be
- generate type="directory"
- transform src="add-cinclude-elements.xsl"
- transform type="cinclude"
- transform src="framework.xsl"
Since the sitemap/pipelines are the backbone of control in Cocoon, it seems
to me you'd want to keep pipelines as simple as possible, while
hiding complexity away in self-contained modules like framework.xsl.
I guess aggregate would be OK if it doesn't mean creating additional
pipelines...
> As someone else mentioned recently, there are times when document()
> does make things a lot simpler. It would be a shame for Cocoon, which
> uses XSL so heavily, to be hobbled by a general don't-use-document()
> rule.
>
> Lars
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]