You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Vadim Gritsenko <va...@reverycodes.com> on 2005/09/01 14:02:46 UTC
Re: svn commit: r264119 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Sylvain Wallez wrote:
> Carsten Ziegeler wrote:
>
>> Sylvain Wallez wrote:
>>
>>> Can't you add this filtering logic in the included URI?
>>
>> No, e.g. <cinclude:include src="http://some-service-host/service/a"/>
>
> Well, I won't rephrase Vadim here :-)
>
>>> 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?
>>
>> Or FS? :)
>
> Despite the smiley, I strongly disagree here. FS is when one wants to
> add too much features to a single component, which leads it to be overly
> complicated in code, configuration and usage.
>
> What we need here is a simple transformer that does a very specific task
> on the SAX stream, and that can be used wherever that task is needed,
> which can be at any place in a pipeline: after a transformer, before a
> serializer or why not after a generator to cleanup files.
>
> So it's not FS, but a simple but useful transformer.
So, what is consclusion? Can we please have this reverted?
Vadim
Re: svn commit: r264119 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Posted by Sylvain Wallez <sy...@apache.org>.
Carsten Ziegeler wrote:
>Vadim Gritsenko wrote:
>
>
>>>a) what exactly do you want to revert? Both parts?
>>>
>>>
>>Ideally, both. Change to CIncludeTransformer sounds more offending, though.
>>
>>
>>
>I still don't get why, really. But actually I don't care and will remove
>it from CInclude transformer just to keep you happy.
>
>
Me too will be happy :-)
>>>b) where is a working solution that fills the gap then?
>>>
>>>
>>If you add couple of lines to that one, yes:
>> http://issues.apache.org/bugzilla/show_bug.cgi?id=30018
>>
>>
>>
>Hmm, wasn't it you who said that it's better to split up the
>functionality (separation of concerns). So removing comments is imho a
>different concern as cleaning up.
>
>
That was me!
We can consider that the concept of "cleaning" an XML stream can be
split into several different tasks, which include stripping comments and
correcting whitespace. We may want these subtasks to be all active by
default and disable some of them through configuration or parameters though.
Sylvain
--
Sylvain Wallez Anyware Technologies
http://people.apache.org/~sylvain http://www.anyware-tech.com
Apache Software Foundation Member Research & Technology Director
Re: svn commit: r264119 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Posted by Carsten Ziegeler <cz...@apache.org>.
Reverted - now Cocoon does not have a solution anymore for removing
comments :(
I'm happily using my own code :)
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: svn commit: r264119 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Carsten Ziegeler wrote:
> Vadim Gritsenko wrote:
>
>>>a) what exactly do you want to revert? Both parts?
>>
>>Ideally, both. Change to CIncludeTransformer sounds more offending, though.
>
> I still don't get why, really.
I don't like it for two reasons:
* CInclude is not the only way to inject external content
into the pipeline. Alternatively, you can use:
- xinclude, include transformers
- aggregate
- file, xmldb, blob, etc source
- sql transformer
- i18n transformer
Should all of the above be modified to have same features?
* It mixes concerns. Task of CInclude is to inject external
content into the pipeline, not to process it. If you want
to do some processing, do it as a next step (or previous
step). Otherwise, we can keep its functionality growing and
end up with JavascriptXSLTCIncludeTransformer, which in
addition to inclusion, will filter XML through Javascript
and process output with XSLT :)
>>>b) where is a working solution that fills the gap then?
>>
>>If you add couple of lines to that one, yes:
>> http://issues.apache.org/bugzilla/show_bug.cgi?id=30018
>
> Hmm, wasn't it you who said that it's better to split up the
> functionality (separation of concerns). So removing comments is imho a
> different concern as cleaning up.
I see comment / namespace removal and indenting as a single task - lexical
normalization of xml :-)
Thanks,
Vadim
Re: svn commit: r264119 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Posted by Carsten Ziegeler <cz...@apache.org>.
Vadim Gritsenko wrote:
>>a) what exactly do you want to revert? Both parts?
>
>
> Ideally, both. Change to CIncludeTransformer sounds more offending, though.
>
I still don't get why, really. But actually I don't care and will remove
it from CInclude transformer just to keep you happy.
>
>
>>b) where is a working solution that fills the gap then?
>
>
> If you add couple of lines to that one, yes:
> http://issues.apache.org/bugzilla/show_bug.cgi?id=30018
>
Hmm, wasn't it you who said that it's better to split up the
functionality (separation of concerns). So removing comments is imho a
different concern as cleaning up.
>
> Out of curiosity, why would you want to keep root comment?
>
For example to have a copyright statement at the beginning of the document.
Anyways as I'm really tired of these discussions I will just revert the
whole thing.
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: svn commit: r264119 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Carsten Ziegeler wrote:
> Vadim Gritsenko wrote:
>
>>So, what is consclusion? Can we please have this reverted?
>
> a) what exactly do you want to revert? Both parts?
Ideally, both. Change to CIncludeTransformer sounds more offending, though.
> b) where is a working solution that fills the gap then?
If you add couple of lines to that one, yes:
http://issues.apache.org/bugzilla/show_bug.cgi?id=30018
Out of curiosity, why would you want to keep root comment?
Vadim
Re: svn commit: r264119 - in /cocoon/branches/BRANCH_2_1_X: src/java/org/apache/cocoon/serialization/AbstractTextSerializer.java
src/java/org/apache/cocoon/transformation/CIncludeTransformer.java status.xml
Posted by Carsten Ziegeler <cz...@apache.org>.
Vadim Gritsenko wrote:
>
> So, what is consclusion? Can we please have this reverted?
>
a) what exactly do you want to revert? Both parts?
b) where is a working solution that fills the gap then?
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/