xmlns-prefixed attribute on root element is lost
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 288
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 8
Description
<!-- before -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd">
<sodipodi:namedview>
...
</sodipodi:namedview>
<path d="..." sodipodi:nodetypes="cccc"/>
</svg>
<!-- after: xmlns:sodipodi moved to child -->
<svg xmlns="http://www.w3.org/2000/svg">
<sodipodi:namedview xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd">
...
</sodipodi:namedview>
<path d="..." sodipodi:nodetypes="cccc"></path>
</svg>
<!-- before -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd">
<path d="..." sodipodi:nodetypes="cccc"/>
</svg>
<!-- after: xmlns:sodipodi removed entirely -->
<svg xmlns="http://www.w3.org/2000/svg">
<path d="..." sodipodi:nodetypes="cccc"></path>
</svg>
Originally posted by @noahbald in https://github.com/servo/html5ever/issues/538#issuecomment-2506784772
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the two XML examples in the issue and tracing how html5ever handles namespace declarations and prefixed attributes during parsing and serialization. Done means the root xmlns:sodipodi declaration is preserved and the resulting prefixed elements and attributes remain correctly associated with that namespace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100