Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1517

DomToGroovy outputs builder code not compatible with MarkupBuilder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-6
    • 1.1-rc-1
    • XML Processing
    • None

    Description

      If you feed in xml/xhtml into DomToGroovy which looks something like:

      <a href="http://groovy.codehaus.org">Groovy</a>

      It outputs something like:

      a(href:'http://groovy.codehaus.org') ["Groovy"]

      but MarkupBuilder seems to currently only like:

      a(href:'http://groovy.codehaus.org', "Groovy")

      I think we should change DomToGroovy to output the currently supported builder notation.

      There is a DomToGroovyTest.groovy file which checks that the currently incompatible behaviour is in place. Perhaps it should be modified to always pass its output back into MarkupBuilder and perhaps (with some XMLUnit magic) check that it produces what was fed in in the first place.

      Attachments

        1. DomToGroovy.patch
          2 kB
          Paul King

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: