Re: XML support in E
Kevin Reid <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <[email protected]> |
On Jan 12, 2010, at 18:11, Kevin Reid wrote: > On Jan 12, 2010, at 17:34, Mark Miller wrote: > >> I have become ever more attracted to JsonML <http://jsonml.org/> as >> a way to handle XML data. Since E's term trees already handle JSON, >> I suggest using the JsonML mapping of XML data into JSON structures. >> I suggest we would then have no need for an XML quasi-parser. We >> could just use the term tree quasiparser in quasi-JsonML format, to >> manipulate XML trees as translated to JsonML structures. Even for >> text markup, which is the best case for the XML vs JsonML >> comparison, I still find JsonML notation more readable than XML. > > Against JsonML: > > * I do not see a specification for JsonML; not even as much of one as > JSON started with. > > * It does not appear to have any handling of XML namespaces; this is > fatal. The programmer must not be required to manually manage prefix > declarations inside of XML tree-composing code or they will get it > wrong (or have to think hard about issues that the software could be > handling for them). I hereby retract the first of these statements: I failed to scroll down on the main page and find the grammar. Regarding XML namespaces, jsonml.org states *exactly the wrong* thing (for an in-memory XML representation), requiring programmers to work with declaring namespace prefixes as I mentioned before: > XML Namespaces > JsonML supports namespaces the same way that namespaces were handled > in XML 1.0. The element name is a concatenation of the namespace > prefix, the colon ':' character, and the element local-name. -- Kevin Reid <http://switchb.org/kpreid/>