bungeni-org / bungeni-editor

The Bungeni Editor is Drafting and Markup framework for XML production built on the OpenOffice.org platform. It supports different legislative document types (e.g hansard, bill) and supports definition of custom types, and allows markup and storage of metadata within the ODF document.
3 stars 0 forks source link

BungeniODFDOM api to retrieve changes by user does not match update edits #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Update edits use the following xml pattern :

        <text:changed-region text:id="ct-1412927444">
                    <text:deletion>
                        <office:change-info>
                            <dc:creator>Ashok Hariharan</dc:creator>
                            <dc:date>2010-03-05T16:02:00</dc:date>
                        </office:change-info>
                        <text:p text:style-name="Standard">te</text:p>
                    </text:deletion>
                    <text:insertion>
                        <office:change-info office:chg-author="Flavio Zeni"
                            office:chg-date-time="2010-03-05T16:01:00"/>
                    </text:insertion>
                </text:changed-region>

essentailly a deletion and insertion element packaged into a changed-region
container. the current API matches changed regions only by dc:creator and
does not check for office:change-info/office:chg-author.

Original issue reported on code.google.com by ashok.ha...@gmail.com on 8 Mar 2010 at 7:28

GoogleCodeExporter commented 9 years ago

Original comment by ashok.ha...@gmail.com on 8 Mar 2010 at 7:44

GoogleCodeExporter commented 9 years ago
Changed Xpath to match changed regions 
//text:changed-region[(descendant::text:insertion/office:change-info[@office:chg
-author='Ashok
Hariharan']) or (descendant::dc:creator='Ashok Hariharan')]

instead of 

//text:changed-region[(descendant::dc:creator='Ashok Hariharan')]

Original comment by ashok.ha...@gmail.com on 8 Mar 2010 at 7:45

GoogleCodeExporter commented 9 years ago
getChange() also needs to be fixed for the replace-change pattern

Original comment by ashok.ha...@gmail.com on 8 Mar 2010 at 10:57

GoogleCodeExporter commented 9 years ago
getChange() was updated - Unit tests need to updated and tested for this 
specific api

Original comment by ashok.ha...@gmail.com on 9 Mar 2010 at 6:06

GoogleCodeExporter commented 9 years ago

Original comment by ashok.ha...@gmail.com on 4 May 2010 at 10:29