Here's one approach: you could add a
distinctive xsl:message to every template (write a stylesheet to do this
automatically to all your existing stylesheets) containing the name of the file
and the match attribute of the template (or some other identifier). Then test
lots of pages, and analyze the logs to get a list of templates that are used,
based on the logged messages. From there you can generate a list of unused
templates to examine, again by running a suitable stylesheet against all your
existing stylesheets.
Peter
From: Gnatz, Michael [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 22, 2006 2:12 AM
To: [email protected]
Subject: Is using Cocoon a good idea?
As a newbie to cocoon I'm trying to see the advantages
of this framework at the moment...
We have a project based on cocoon here running for a
few years now. As things normally are, developers did not have much time and
many features to implement and so things are not as nice as one would like them
to be...
Basically the pipline is quite easy. We are generating
an intermediate language, which serves as an abstraction of html. This is done
by xsp's, the layouting is done with xsl's as a second step. The idea is nice:
We are doing something like "seperation of concerns".
Problem is the following now: We have many many many
xsl-templates, which are not used. Secondly, we are
generating tags with our xsp's, which are not further processed but just
omitted. Both things are overhead, when doing a repaint of all pages, as we
are trying to do now. Main problem is, that the application is rather
big.
When I just delete a template it might be in use
anywhere in those 500 pagees and I might not recognize...
When using Java I like eclipse showing me code which
is not used anywhere. When using this xslt thing I dont have anything like
that?
1) What would be a development process avoiding the
problem mentioned? Does a dtd/schema for the intermediate language help? Should
I document all dependencies between xsp's and xsl-templates?
2) Is it best to throw everything away now and start
from scratch? Maybe better without cocoon?
Best regards,
Michael Gnatz
