Forrest
  1. Forrest
  2. FOR-644

code-style cleanup for xml files

    Details

    • Type: Task Task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.8, 0.9
    • Fix Version/s: 0.10-dev
    • Component/s: Other
    • Labels:
      None

      Description

      We have much inconsistent whitespace in all of our files. This is known to cause trouble in a collaborative environment. See discussion at: http://marc.theaimsgroup.com/?t=112450901100001 and http://marc.theaimsgroup.com/?t=112495618800002 and various linked discussions.
      There are no Sub-Tasks for this issue.

        Activity

        David Crossley created issue -
        Tim Williams made changes -
        Field Original Value New Value
        Component/s Other [ 12310007 ]
        David Crossley made changes -
        Summary whitespace cleanup code-style cleanup for xml files
        Description We have much inconsistent whitespace in all of our files. This is known to cause trouble in a collaborative environment. See discussion at: http://marc.theaimsgroup.com/?t=112450901100001 and see the list at trunk/etc/whitespace-cleanup.txt

        This Issue will be used to announce which section of the repository is due to be cleaned next. Please keep discussion on that mail thread.
        We have much inconsistent whitespace in all of our files. This is known to cause trouble in a collaborative environment. See discussion at: http://marc.theaimsgroup.com/?t=112450901100001
        David Crossley made changes -
        Description We have much inconsistent whitespace in all of our files. This is known to cause trouble in a collaborative environment. See discussion at: http://marc.theaimsgroup.com/?t=112450901100001
        We have much inconsistent whitespace in all of our files. This is known to cause trouble in a collaborative environment. See discussion at: http://marc.theaimsgroup.com/?t=112450901100001 and http://marc.theaimsgroup.com/?t=112495618800002 and various linked discussions.
        Hide
        David Crossley added a comment -
        Added Perl script etc/tidy-xml.pl and config file to find all xml files and run tidy.sf.net

        Test it on etc/test-whitespace/
        Show
        David Crossley added a comment - Added Perl script etc/tidy-xml.pl and config file to find all xml files and run tidy.sf.net Test it on etc/test-whitespace/
        Hide
        David Crossley added a comment -
        Not sure if we should add parameter "char-encoding: utf8" to etc/tidy-config.txt file. See the effect that it has on entities in the main test document etc/test-whitespace/test-1.xml
        Show
        David Crossley added a comment - Not sure if we should add parameter "char-encoding: utf8" to etc/tidy-config.txt file. See the effect that it has on entities in the main test document etc/test-whitespace/test-1.xml
        David Crossley made changes -
        Fix Version/s 0.9 [ 12310041 ]
        Fix Version/s 0.8-dev [ 12310040 ]
        Hide
        David Crossley added a comment -
        Scheduling for 0.8 release. We should try this. During the code-freeze for 0.8 release would be a good time, as everybody should have worked their changes into the code by then.

        IIRC "tidy" removed the whitespace following an anchor element. If not fixed then we need to post-process the files with that perl script. Need to do the tests again beforehand.
        Show
        David Crossley added a comment - Scheduling for 0.8 release. We should try this. During the code-freeze for 0.8 release would be a good time, as everybody should have worked their changes into the code by then. IIRC "tidy" removed the whitespace following an anchor element. If not fixed then we need to post-process the files with that perl script. Need to do the tests again beforehand.
        David Crossley made changes -
        Fix Version/s 0.8-dev [ 12310040 ]
        Fix Version/s 0.9 [ 12310041 ]
        Hide
        David Crossley added a comment -
        I tried the current CVS of tidy.sf.net and it seems that that issue is still present.
        Show
        David Crossley added a comment - I tried the current CVS of tidy.sf.net and it seems that that issue is still present.
        Hide
        David Crossley added a comment -
        Last week i have been testing "xmlformat" which concentrates specifically on the formatting task. Its is nice. This week i will compare results.

        http://www.kitebird.com/software/xmlformat/
        Show
        David Crossley added a comment - Last week i have been testing "xmlformat" which concentrates specifically on the formatting task. Its is nice. This week i will compare results. http://www.kitebird.com/software/xmlformat/
        David Crossley made changes -
        Assignee David Crossley [ crossley ]
        Hide
        David Crossley added a comment -
        Didn't get around to comparing. Going with xmlformat. I will start processing some of the more obscure areas of our trunk because less likely that people will be still working there. This gets some of the job done early, and the rest will be done just after the code freeze starts.
        Show
        David Crossley added a comment - Didn't get around to comparing. Going with xmlformat. I will start processing some of the more obscure areas of our trunk because less likely that people will be still working there. This gets some of the job done early, and the rest will be done just after the code freeze starts.
        Hide
        David Crossley added a comment -
        This is great. I tried it on our dtdx plugin, then published our website again. This revealed an issue with xsl stylesheets formatting which collapsed the single space in an <xsl:text> element. xmlformat.conf to the rescue.

        So i am going to do similar tests with some of our other more obscure plugins.

        Another warning:

        If developers do not get their trunk changes contributed/committed, then i expect that you are going to need to move your changed files out of the way before doing 'svn update' after the code-freeze.

        In such a case, there is an option for you. Install xmlformat and run our Ant target over your own working copy (thus using the same xmlformat.conf) then check with diff. See main/build.xml r526505.
        Show
        David Crossley added a comment - This is great. I tried it on our dtdx plugin, then published our website again. This revealed an issue with xsl stylesheets formatting which collapsed the single space in an <xsl:text> element. xmlformat.conf to the rescue. So i am going to do similar tests with some of our other more obscure plugins. Another warning: If developers do not get their trunk changes contributed/committed, then i expect that you are going to need to move your changed files out of the way before doing 'svn update' after the code-freeze. In such a case, there is an option for you. Install xmlformat and run our Ant target over your own working copy (thus using the same xmlformat.conf) then check with diff. See main/build.xml r526505.
        Hide
        David Crossley added a comment -
        Done the whole of trunk for 0.8 release. Moving this issue over to 0.9
        Show
        David Crossley added a comment - Done the whole of trunk for 0.8 release. Moving this issue over to 0.9
        David Crossley made changes -
        Fix Version/s 0.8-dev [ 12310040 ]
        Affects Version/s 0.9 [ 12310041 ]
        Fix Version/s 0.9 [ 12310041 ]
        David Crossley made changes -
        Assignee David Crossley [ crossley ]
        Hide
        Tim Williams added a comment -
        It seems that this was done before the 0.8 release, is this just a house-keeping task that needs to be done prior to each release (e.g. in the same sense as license-checking)?
        Show
        Tim Williams added a comment - It seems that this was done before the 0.8 release, is this just a house-keeping task that needs to be done prior to each release (e.g. in the same sense as license-checking)?
        Hide
        David Crossley added a comment -
        Yes that is correct. Just before release is the ideal time, because all changes should be already committed. We do have some docs about the process.
        Show
        David Crossley added a comment - Yes that is correct. Just before release is the ideal time, because all changes should be already committed. We do have some docs about the process.
        Hide
        David Crossley added a comment -
        Delaying until next release. I don't have time and not prepared to deal with some of the strange XSL that we now have that rely on some whitespace formatting.
        Show
        David Crossley added a comment - Delaying until next release. I don't have time and not prepared to deal with some of the strange XSL that we now have that rely on some whitespace formatting.
        David Crossley made changes -
        Fix Version/s 0.10 [ 12310092 ]
        Fix Version/s 0.9-dev [ 12310041 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            David Crossley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development