Carsten Ziegeler wrote:
Vadim Gritsenko wrote:
[EMAIL PROTECTED] wrote:
Add possibility to remove comments to all text based serializers and to
cinclude transformer.
Do you really think serializers and cinclude transformer are a good place for
additional xml filtering logic?
Yepp, that's why I added it there :)
What if you want to indent included xml - is it
good idea to add this code into serializers & include transformer too?
Ok, this depends - but how can you indent included xml if not the
include transformer does it? You don't want to put the indentation in
the included pipeline and a transformer behind the include transformer
does not know what has been included and what is from the current pipeline.
Anyways, I have the use case to remove comments from included documents
and the only working way is to add this to the cinclude transformer. If
there are better ways, fine, we can change this.
Can't you add this filtering logic in the included URI?
In addition I thought that it is a good idea to remove all comments from
the resulting html page (with the possibility to leave a document
comment at the top of the page). Sometimes comments inside a html page
reveal internal information that you don't want to send to the client
and removing comments reduces the size of the doc. Without virtual
serializers it would be annoying to have a "remove-comments-transformer"
before every "html serializer". And I don't think that it would make
sense to write such simple transformers just because of "architectual
elegance".
Is it architectural elegance, or separation of concerns which leads to
have each component to a single task so it can be reused in a number of
different contexts?
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director