Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-853

Change to style CDATA not detected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • 1.7
    • None
    • SVG DOM
    • None
    • Operating System: Mac OS X 10.4
      Platform: Macintosh

    Description

      Changes to the CDATA of a style element are not reflected in a document loaded in a JSVGComponent.

      To reproduce: Load the attached document cdata.svg and click on the square. This will run a script to replace the CDATA content of a style element.

      Observed: No change.

      Expected: The square should alternate between red and blue when clicked.

      Workaround: Replace the entire style element instead of its contents.

      Analysis: I think this is a simple copy-and-paste-o in SVGOMDocument.DOMCharacterDataModifiedListenerWrapper, which forwards its event using the subTreeModified(Node) method instead of characterDataModified(Node), which is what I would have expected.

      Attachments

        1. cdata.svg
          0.6 kB
          Stephen Drake
        2. cdata.patch
          0.9 kB
          Stephen Drake

        Activity

          People

            batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
            steve@drakenz.com Stephen Drake
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: