Add XML fragment parsing to xml5ever
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 288
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 8
Description
Since I deleted the xml5ever repostiory, I've decided to move this issue here. This was a feature @nox asked, and it seems that it's a pain point in servo as well see servo/servo#11995.
The algorithm for parsing xml fragment is in HTML5 spec.
Basically, what's needed is to construct a context element with given name, a NamespaceMap, and input string.
It's advised to use parse_fragment from h5e as reference point.
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
Read the XML fragment algorithm in the HTML5 spec, then use html5ever/src/driver.rs and its parse_fragment entry point as the reference. Inspect xml5ever/src/tree_builder/mod.rs for NamespaceMap and determine the context element and input-string path; done means xml5ever supports parsing XML fragments for a supplied context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100