You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by florent andré <fl...@4sengines.com> on 2009/12/18 00:22:32 UTC

Re: Xml diff module - feedback needed

Hi Alexander,

Did you had time to check it ?

Yesterday, I see the xmlunit librairie [1]. This lib seems to have a 
good api with myDiff.similar(), myDiff.identical(),DetailedDiff class,...

Did you have a look on it when you create the module ?
If yes, why do you choose the outerj.daisy.diff class ?

Thanks for any answer,
Have a good day

[1] : http://xmlunit.sourceforge.net
[2] : http://xmlunit.sourceforge.net/example.html

Alexander S. Sizemin wrote:
> Thanks for your time.
> I'm not sure I will be able to take a look at it in the next few days,
> but I will check and test everything once again the next week for sure.
>
> Thanks, Alexander
>
> 2009/11/4 florent andré <florent.andre-dev@4sengines.com 
> <ma...@4sengines.com>>
>
>     Hi Alexander,
>
>     I have just try your xmldiff and it seem to be buggy.
>
>     Here my test :
>     After a clean instal and an import samples pages, I modify the
>     index page.
>
>     I apply this changes in the attached file (move 1 paragraph, add a
>     text, create a new paragraph)
>
>     After that, I want to diff beetween this two versions and I have
>     this message :
>     "Error while parsing document for diffing: "
>     with no further explanations
>
>     I do another try on a just created html document were I had some
>     "TESTTS" letters in the <h1>...</h1>
>
>     --------
>     There is also a little problem on ui with two buttons labelled
>     "untranslated".
>     -------
>
>     Do you think you can work on it ?
>
>     Thanks in advance.
>     ++
>
>
>
>     Alexander S. Sizemin wrote:
>
>         Hello devs,
>         I've been working on XML diff module and now it will be great
>         to hear some feedback from you.
>         You can use the following command to checkout module:
>
>         svn checkout http://lenyadiff.googlecode.com/svn/trunk/
>         BRANCH_2_0_X/src/modules/
>
>         or download it as a zipped tarball
>
>         http://google-summer-of-code-2009-apache.googlecode.com/files/AlexanderS_Sizemin.tar.gz
>
>         Thank you.
>
>         Regards,
>         Alexander Sizemin
>
>
>
>     1c1,3
>     < <?xml version="1.0" encoding="UTF-8"?><html
>     xmlns="http://www.w3.org/1999/xhtml"
>     xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
>     xmlns:xhtml="http://www.w3.org/1999/xhtml">
>     ---
>     > <?xml version="1.0" encoding="UTF-8"?><html
>     xmlns="http://www.w3.org/1999/xhtml">
>     >
>     >
>     3,18d4
>     < <!--
>     <   Licensed to the Apache Software Foundation (ASF) under one or more
>     <   contributor license agreements.  See the NOTICE file
>     distributed with
>     <   this work for additional information regarding copyright
>     ownership.
>     <   The ASF licenses this file to You under the Apache License,
>     Version 2.0
>     <   (the "License"); you may not use this file except in
>     compliance with
>     <   the License.  You may obtain a copy of the License at
>     <
>     <       http://www.apache.org/licenses/LICENSE-2.0
>     <
>     <   Unless required by applicable law or agreed to in writing,
>     software
>     <   distributed under the License is distributed on an "AS IS" BASIS,
>     <   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
>     or implied.
>     <   See the License for the specific language governing
>     permissions and
>     <   limitations under the License.
>     < -->
>     20d5
>     < <!-- $Id: index_en 473861 2006-11-12 03:51:14Z gregor $ -->
>     27,30c12
>     <     <p>Apache Lenya is a Java Open-Source Content Management System
>     <     based on open standards such as XML and XSLT and the Apache
>     <     Software Stack, in particular the XML publishing framework
>     Apache
>     <     Cocoon.</p>
>
>     ---
>     >     <p>new p test</p>
>     35c17
>     <     refer to the <a
>     href="lenya-document:422dc090-c968-11de-bfe8-e7803ecc604f">Features
>     ---
>     >     refer TESTTTTSto the <a
>     href="lenya-document:422dc090-c968-11de-bfe8-e7803ecc604f">Features
>     41a24,27
>     > <p>Apache Lenya is a Java Open-Source Content Management System
>     >     based on open standards such as XML and XSLT and the Apache
>     >     Software Stack, in particular the XML publishing framework
>     Apache
>     >     Cocoon.</p>
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
>     <ma...@lenya.apache.org>
>     For additional commands, e-mail: dev-help@lenya.apache.org
>     <ma...@lenya.apache.org>
>
>


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


Re: Xml diff module - feedback needed

Posted by "Alexander S. Sizemin" <sa...@gmail.com>.
Hello Andre,
Sorry for not responding for a long time.

Employed diffing algorithm is capable of identifying added and removed XML
nodes and nodes text.
As for renaming nodes: If you have a <p1>sample text</p1> in one version
and <p2>sample text</p2> in the same place in the other version
for an XML view it will be treated like deleted "<p1>" tag and added "<p2>",
while in the HTML view it will be highlighted as changed content "sample
text".
Moved nodes identification is not currently supported but I believe could be
implemented
due to XML model which is capable of identifying nodes order.

While preparing diff the module is putting style attributes according to
identified changes directly in an output XML,
so you just get an gui representation of diff as you see it in browser.
Not really wise in terms of architecture and reusability, but it does it's
job.
If you want this changes to be somehow collected and presented in a
universal format,
like unified format or edit script, I don't see any architectural objections
or other reasons why this functionality cannot be implemented

I'm not really sure of reasons why you experienced such an error.
The module worked well on at least to different environments -
mine and Richard's. Need to take a look at the code once again.

As for XMLUnit - it is not really a tree diffing algorithm as I understand
from the first look at it.

2009/12/18 Richard Frovarp <rf...@apache.org>

> Florent André wrote:
>
>> Thanks Richard,
>> I understand the licence constraint and it's clearly a good think that
>> sucj
>> a lib will be into trunk.
>> "Problems" I have with this lib is that I don't find docs on witch kind of
>> diff do daisyDiff. Clearly it's work on text() modification, but my main
>> requirement is :
>> I have to distinguish new nodes and nodes that have move (from position 2
>> to 5 for example - idea of the xmlunit's similar function).
>>
>> Have you informations about that ? If no, I will go to dress my swimsuit
>> and dive into daisyDiff lib ! :)
>>
>> Tchuss
>> ++
>>
>>
> I don't have any information. If XMLUnit fits your needs, and you aren't
> looking to contribute the module to the project, then use XMLUnit.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org
>
>

Re: Xml diff module - feedback needed

Posted by Richard Frovarp <rf...@apache.org>.
Florent André wrote:
> Thanks Richard, 
>
> I understand the licence constraint and it's clearly a good think that sucj
> a lib will be into trunk. 
>
> "Problems" I have with this lib is that I don't find docs on witch kind of
> diff do daisyDiff. Clearly it's work on text() modification, but my main
> requirement is :
> I have to distinguish new nodes and nodes that have move (from position 2
> to 5 for example - idea of the xmlunit's similar function).
>
> Have you informations about that ? If no, I will go to dress my swimsuit
> and dive into daisyDiff lib ! :)
>
> Tchuss
> ++
>   
I don't have any information. If XMLUnit fits your needs, and you aren't 
looking to contribute the module to the project, then use XMLUnit.

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


Re: Xml diff module - feedback needed

Posted by Florent André <fl...@4sengines.com>.
Thanks Richard, 

I understand the licence constraint and it's clearly a good think that sucj
a lib will be into trunk. 

"Problems" I have with this lib is that I don't find docs on witch kind of
diff do daisyDiff. Clearly it's work on text() modification, but my main
requirement is :
I have to distinguish new nodes and nodes that have move (from position 2
to 5 for example - idea of the xmlunit's similar function).

Have you informations about that ? If no, I will go to dress my swimsuit
and dive into daisyDiff lib ! :)

Tchuss
++

On Thu, 17 Dec 2009 22:05:03 -0600, Richard Frovarp
<Ri...@ndsu.edu> wrote:
> On 12/17/2009 5:22 PM, florent andré wrote:
>> Hi Alexander,
>>
>> Did you had time to check it ?
>>
>> Yesterday, I see the xmlunit librairie [1]. This lib seems to have a
>> good api with myDiff.similar(), myDiff.identical(),DetailedDiff
class,...
>>
>> Did you have a look on it when you create the module ?
>> If yes, why do you choose the outerj.daisy.diff class ?
>>
>> Thanks for any answer,
>> Have a good day
>>
>> [1] : http://xmlunit.sourceforge.net
>> [2] : http://xmlunit.sourceforge.net/example.html
>>
> 
> I don't know if he saw that or not. However, taking a quick look over 
> it, it's more of a unit testing library. The similar() and identical() 
> functions simply return booleans. DetailedDiff can return a list, but I 
> don't necessarily see where it would return information as to where the 
> diffs are in relation to the document.
> 
> The biggest problem I see with the library however is its license. I 
> don't see anything identifying it as a certain type of license. He 
> appears to be using his own license that is most likely a variation of a 
> common one. Alexander did find a different diff module to use, however 
> that one was not license compatible with Apache. The one that he chose 
> is license compatible. License compatibility was something I required, 
> as I want to eventually work it into trunk.
> 
> Richard
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
> For additional commands, e-mail: dev-help@lenya.apache.org

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


Re: Xml diff module - feedback needed

Posted by Richard Frovarp <Ri...@ndsu.edu>.
On 12/17/2009 5:22 PM, florent andré wrote:
> Hi Alexander,
>
> Did you had time to check it ?
>
> Yesterday, I see the xmlunit librairie [1]. This lib seems to have a
> good api with myDiff.similar(), myDiff.identical(),DetailedDiff class,...
>
> Did you have a look on it when you create the module ?
> If yes, why do you choose the outerj.daisy.diff class ?
>
> Thanks for any answer,
> Have a good day
>
> [1] : http://xmlunit.sourceforge.net
> [2] : http://xmlunit.sourceforge.net/example.html
>

I don't know if he saw that or not. However, taking a quick look over 
it, it's more of a unit testing library. The similar() and identical() 
functions simply return booleans. DetailedDiff can return a list, but I 
don't necessarily see where it would return information as to where the 
diffs are in relation to the document.

The biggest problem I see with the library however is its license. I 
don't see anything identifying it as a certain type of license. He 
appears to be using his own license that is most likely a variation of a 
common one. Alexander did find a different diff module to use, however 
that one was not license compatible with Apache. The one that he chose 
is license compatible. License compatibility was something I required, 
as I want to eventually work it into trunk.

Richard

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