XML Infoset convention
This commit is contained in:
parent
5fded03fa4
commit
386c07628c
|
@ -175,5 +175,40 @@ Dates, times, moments, and timestamps can be represented with a
|
||||||
or `date-time` productions of
|
or `date-time` productions of
|
||||||
[section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6).
|
[section 5.6 of RFC 3339](https://tools.ietf.org/html/rfc3339#section-5.6).
|
||||||
|
|
||||||
|
## XML Infoset
|
||||||
|
|
||||||
|
[XML Infoset](https://www.w3.org/TR/2004/REC-xml-infoset-20040204/)
|
||||||
|
describes the semantics of XML - that is, the underlying information
|
||||||
|
contained in a document, independent of surface syntax.
|
||||||
|
|
||||||
|
A useful subset of XML Infoset, namely its Element Information Items
|
||||||
|
(omitting processing instructions, entities, entity references,
|
||||||
|
comments, namespaces, name prefixes, and base URIs), can be captured
|
||||||
|
with the [schema](preserves-schema.html)
|
||||||
|
|
||||||
|
Node = Text / Element .
|
||||||
|
Text = string .
|
||||||
|
Element =
|
||||||
|
/ @withAttributes
|
||||||
|
<<rec> @localName symbol [@attributes Attributes @children Node ...]>
|
||||||
|
/ @withoutAttributes
|
||||||
|
<<rec> @localName symbol @children [Node ...]> .
|
||||||
|
Attributes = { symbol: string ...:... } .
|
||||||
|
|
||||||
|
**Examples.**
|
||||||
|
|
||||||
|
<html
|
||||||
|
<h1 {class: "title"} "Hello World!">
|
||||||
|
<p
|
||||||
|
"I could swear I've seen markup like this somewhere before. "
|
||||||
|
"Perhaps it was "
|
||||||
|
<a {href: "https://docs.racket-lang.org/search/index.html?q=xexpr%3F"} "here">
|
||||||
|
"?"
|
||||||
|
>
|
||||||
|
<table
|
||||||
|
<tr <th> <th "Column 1"> <th "Column 2">>
|
||||||
|
<tr <th "Row 1"> <td 123> <td 234>>>
|
||||||
|
>
|
||||||
|
|
||||||
<!-- Heading to visually offset the footnotes from the main document: -->
|
<!-- Heading to visually offset the footnotes from the main document: -->
|
||||||
## Notes
|
## Notes
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
version 1 .
|
||||||
|
|
||||||
|
Node = Text / Element .
|
||||||
|
Text = string .
|
||||||
|
Element =
|
||||||
|
/ @withAttributes
|
||||||
|
<<rec> @localName symbol [@attributes Attributes @children Node ...]>
|
||||||
|
/ @withoutAttributes
|
||||||
|
<<rec> @localName symbol @children [Node ...]> .
|
||||||
|
Attributes = { symbol: string ...:... } .
|
Loading…
Reference in New Issue