diff --git a/conventions.md b/conventions.md index 29d56a4..c331f98 100644 --- a/conventions.md +++ b/conventions.md @@ -175,5 +175,40 @@ Dates, times, moments, and timestamps can be represented with a or `date-time` productions of [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 + < @localName symbol [@attributes Attributes @children Node ...]> + / @withoutAttributes + < @localName symbol @children [Node ...]> . + Attributes = { symbol: string ...:... } . + +**Examples.** + + +

+ "?" + > +
> +
>> + > + ## Notes diff --git a/xml-infoset.prs b/xml-infoset.prs new file mode 100644 index 0000000..7a3fd87 --- /dev/null +++ b/xml-infoset.prs @@ -0,0 +1,10 @@ +version 1 . + +Node = Text / Element . +Text = string . +Element = + / @withAttributes + < @localName symbol [@attributes Attributes @children Node ...]> + / @withoutAttributes + < @localName symbol @children [Node ...]> . +Attributes = { symbol: string ...:... } .