[RFC] Removing Xml.encodedpcdata
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 179
- Forks
- 63
- Avg merge
- 5h
- Merged PRs (30d)
- 22
Description
I'm considering removing Xml.encodedpcdata from the API.
Mostly, it comes down to the fact that any "valid" usecase, i.e., inject textual HTML without validation, is almost never compatible with Tyxml's attempt at having a representation-independent API. For instance, Tyxml's XML can correspond to Dom trees, or virtual dom, where such unstructured textual HTML doesn't really make sense.
I believe we would be better off with removing that, and instead provide an easy-to-use bridge with Markup's parsing functions. You could still break the html validity with it, but it would at least give us structured XML, which we can manipulate and use.
I've started working on such import/export functions in the export branch. In particular, it provides a function Xml.of_seq : signal Seq.t -> Xml.t that will be, in time, trivial to plug in Markup.
@vasilisp Comments on the besport codebase ? As far as I can tell, this function is not used directly in ocsigen itself, mostly for the reason given above.
Apparently odoc uses it to inject {[ .... ]}. @aantron, who should be pinged for that ? :)
Contributor guide
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 reviewing the proposed removal of Xml.encodedpcdata and the export branch, especially Xml.of_seq and its intended connection to Markup parsing. Check the mentioned odoc use of encodedpcdata and the besport codebase before deciding whether the API change is viable. Done requires an agreed direction and a clear plan for affected consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100