8000 Regression in 0.7.0: Namespace prefixes being introduced unnecessarily · Issue #319 · xmldom/xmldom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Regression in 0.7.0: Namespace prefixes being introduced unnecessarily #319
Closed
@lupestro

Description

@lupestro

We are using xmldom to parse, tweak, and serialize some SVG schematics that will ultimately be embedded in HTML (not xhtml) pages. Through 0.6.0, everything was working fine, but starting with 0.7.0, for some but not all documents, when we SerializeToString(doc), all of the elements in the document get prefixed by the svg namespace (xvg:g, etc.) This produces SVG documents that are perfectly legitimate XML but won't display when embedded in HTML5 documents due to HTML rules, which don't include the general XML rules for namespaces.

  1. What causes xmldom to do this? We didn't discover an identifiable pattern.
  2. How can we ensure that we get SVG we can use?

Right now we're hacking the results as text to lop off the namespaces so our app will continue to work, but we really don't want to do that.

Update by @karfau:
The regression was introduced in #268

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingspec:Namespaces in XMLhttps://www.w3.org/TR/REC-xml-names/ and https://www.w3.org/TR/xml-names11/xml:validhttps://www.w3.org/TR/xml11/#dt-valid

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0