Why Sponsor Oils? | source | all docs for version 0.26.0 | all versions | oils.pub
Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.
Anything except &
and <
.
These must be &
and <
.
>
is allowed, or you can escape it with >
.
&
- namedϧ
- decimalÿ
- hex<!-- -->
<? ?>
(XML processing instruction)<script> <style>
Note: we still have CDATA for compatibility.
<source> ...
Then you can query HTML
TODO:
querySelectorAll()
Just emit it! This always works, by design.
NO_SPECIAL_TAGS
Conflicts between HTML5 and XML:
In XML, <source>
is like any tag, and must be closed,
In HTML, <source>
is a VOID tag, and must NOT be closedlike any tag, and must be closed,
In XML, <script>
and <style>
don't have special treatment
In HTML, they do
The header is different - <!DOCTYPE html>
vs. <?xml version= ... ?>
HTML: <a empty= missing>
is two attributes
right now we don't handle <a empty = "missing">
as a single attribute
>
- are we alloxing this in HX8?<script>
and <style>
<!DOCTYPE foo>
<?xml version=>
, remove <!DOCTYPE html>
Angle brackets:
<a foo="<">
is allowed, but <a foo=">">
is disallowed<p> 4>3 </p>
is allowed, but <p> 4<3 </p>
is disallowedThis makes lexing the top-level structure easier.
&
is allowed, unlike XML
<a href="?foo=42&bar=99">
Encodings other than UTF-8. HTM8 is always UTF-8.
Unicode Tag names and attribute names.
<a href=">">
- no literal >
inside quotes
<a href="&">
There are 5 kinds of tags:
<title> <textarea>
<style> <xmp> <iframe>
?and we have
<script>
</script>
in a string literal?<math> <svg>
- XML rules<svg>
and <math>
are foreign XML content? Doh
This is one way:
<object data="math.xml" type="application/mathml+xml"></object>
<object data="drawing.xml" type="image/svg+xml"></object>
Then we don't need special parsing?