Replies: 5 comments
-
|
My first case for interoperability is with the const resp = await fetch("https://example.com/baseprint/article.xml");
if (resp.ok) {
const parser = new DOMParser();
const dom = parser.parseFromString(await resp.text(), "text/html");
const main = document.querySelector("main")
main.append(dom.body.firstChild);
} With HTML compatible tag names, the entire Baseprint XML tree becomes HTML content in the web page: Furthermore, with HTML/CSS compatible tag names, the HTML-compatible tree can be CSS styled, as demonstrated by the |
Beta Was this translation helpful? Give feedback.
-
|
My second case for interoperability does not seem as valuable as the first case above. But it might also help access and long-term retrieval. It is to use a pre-made canned general to get a |
Beta Was this translation helpful? Give feedback.
-
|
@mfenner, I'm very curious what kind of HTML interoperability you think it desirable (and often not achieved with XML). Obviously reading XML for non-textual programmatic data sucks compared to JSON. I'm particular interested what your take is on my first case above. It's the best case I can come up with for why archiving HTML-friendly tags in XML is valuable. |
Beta Was this translation helpful? Give feedback.
-
|
Additional note: this interoperability is the motivation for plan #21 |
Beta Was this translation helpful? Give feedback.
-
|
A specific case of modern HTML5/CSS tech that I'm now testing is using NPM package DOMPurify. epijats 3.0 now generates Baseprint XML that is interoperable with DOMParser based tech like DOMPurify. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This post discusses different ways "well-formed XML" might or might not better interoperate with modern HTML5/CSS tech. Having "well-formed XML" in BpDF helps interoperability with basic broadly-adopted XML tech, in particular with XSL transforms (which seem to be very popular in the publishing ecosystem). "Well-formed XML" need not necessarily use XML namespace, DTDs, validation tools, or even be read by a strict XML parser.
Beta Was this translation helpful? Give feedback.
All reactions