@@ -50,30 +50,36 @@ Development started in January 2020.
5050
5151### Where this specification fits
5252
53- xast extends [ unist] [ ] , a format for syntax trees, to benefit from its
54- [ ecosystem of utilities] [ utilities ] .
53+ xast extends [ unist] [ ] ,
54+ a format for syntax trees,
55+ to benefit from its [ ecosystem of utilities] [ utilities ] .
5556
5657xast relates to [ JavaScript] [ ] in that it has an [ ecosystem of
5758utilities] [ list-of-utilities ] for working with compliant syntax trees in
5859JavaScript.
59- However, xast is not limited to JavaScript and can be used in other programming
60+ However,
61+ xast is not limited to JavaScript and can be used in other programming
6062languages.
6163
6264xast relates to the [ unified] [ ] project in that xast syntax trees are used
6365throughout its ecosystem.
6466
6567### Scope
6668
67- xast represents XML syntax, not semantics: there are no namespaces or local
68- names; only qualified names.
69+ xast represents XML syntax,
70+ not semantics:
71+ there are no namespaces or local names;
72+ only qualified names.
6973
7074xast supports a sensible subset of XML by omitting the ostensibly bad DTD.
71- XML processors are not guaranteed to process DTDs, making them unsafe.
75+ XML processors are not guaranteed to process DTDs,
76+ making them unsafe.
7277
7378xast represents expanded entities and therefore does not deal with entities or
7479character references.
75- It is suggested that utilities around xast, that parse or serialize, do * not*
76- support * [ parameter-entity references] [ concept-parameter-entity ] * or
80+ It is suggested that utilities around xast,
81+ that parse or serialize,
82+ do * not* support * [ parameter-entity references] [ concept-parameter-entity ] * or
7783* [ entity references] [ concept-entity ] * other than the
7884* [ predefined entities] [ concept-predefined-entities ] *
7985(` < ` for ` < ` U+003C LESS THAN;
@@ -110,8 +116,8 @@ Internal document type declarations have no representation in xast:
110116
111117## Types
112118
113- If you are using TypeScript, you can use the xast types by installing them
114- with npm:
119+ If you are using TypeScript,
120+ you can use the xast types by installing them with npm:
115121
116122``` sh
117123npm install @types/xast
@@ -156,7 +162,8 @@ interface Cdata <: Literal {
156162** Cdata** (** [ Literal] [ dfn-literal ] ** ) represents a
157163* [ CDATA section] [ concept-cdata ] * ([ \[ XML\] ] [ xml ] ).
158164
159- For example, the following XML:
165+ For example,
166+ the following XML:
160167
161168``` xml
162169<![CDATA[ <greeting>Hello, world!</greeting>]]>
@@ -182,7 +189,8 @@ interface Comment <: Literal {
182189** Comment** (** [ Literal] [ dfn-literal ] ** ) represents a
183190* [ comment] [ concept-comment ] * ([ \[ XML\] ] [ xml ] ).
184191
185- For example, the following XML:
192+ For example,
193+ the following XML:
186194
187195``` xml
188196<!-- Charlie-->
@@ -211,14 +219,17 @@ interface Doctype <: Node {
211219A ` name ` field must be present.
212220
213221A ` public ` field should be present.
214- If present, it must be set to a string, and represents the document’s public
215- identifier.
222+ If present,
223+ it must be set to a string,
224+ and represents the document’s public identifier.
216225
217226A ` system ` field should be present.
218- If present, it must be set to a string, and represents the document’s system
219- identifier.
227+ If present,
228+ it must be set to a string,
229+ and represents the document’s system identifier.
220230
221- For example, the following XML:
231+ For example,
232+ the following XML:
222233
223234``` xml
224235<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
@@ -261,10 +272,11 @@ It represents information associated with the element.
261272The value of the ` attributes ` field implements the
262273** [ Attributes] [ dfn-attributes ] ** interface.
263274
264- For example, the following XML:
275+ For example,
276+ the following XML:
265277
266278``` xml
267- <package xmlns =" http://www.idpf.org/2007/opf" unique-identifier = " id " />
279+ <package unique-identifier = " id " xmlns =" http://www.idpf.org/2007/opf" />
268280```
269281
270282Yields:
@@ -274,8 +286,8 @@ Yields:
274286 type: ' element' ,
275287 name: ' package' ,
276288 attributes: {
277- xmlns : ' http://www.idpf.org/2007/opf ' ,
278- ' unique-identifier ' : ' id '
289+ ' unique-identifier ' : ' id ' ,
290+ xmlns : ' http://www.idpf.org/2007/opf '
279291 },
280292 children: []
281293}
@@ -295,7 +307,8 @@ interface Instruction <: Literal {
295307
296308A ` name ` field must be present.
297309
298- For example, the following XML:
310+ For example,
311+ the following XML:
299312
300313``` xml
301314<?xml version =" 1.0" encoding =" UTF-8" ?>
@@ -326,8 +339,9 @@ document.
326339must not be used as a * [ child] [ term-child ] * .
327340
328341XML specifies that documents should have exactly one ** [ element] [ dfn-element ] **
329- child, therefore a root should have exactly one element child when representing
330- a whole document.
342+ child,
343+ therefore a root should have exactly one element child when representing a
344+ whole document.
331345
332346### ` Text `
333347
@@ -340,7 +354,8 @@ interface Text <: Literal {
340354** Text** (** [ Literal] [ dfn-literal ] ** ) represents
341355* [ character data] [ concept-char ] * ([ \[ XML\] ] [ xml ] ).
342356
343- For example, the following XML:
357+ For example,
358+ the following XML:
344359
345360``` xml
346361<dc : language >en</dc : language >
@@ -388,9 +403,10 @@ typedef string AttributeValue
388403Attribute values are values on ** [ Attributes] [ dfn-attributes ] ** objects and must
389404reflect XML attribute values exactly as a string.
390405
391- > In [ JSON] [ ] , the value ` null ` must be treated as if the attribute was not
392- > included.
393- > In [ JavaScript] [ ] , both ` null ` and ` undefined ` must be similarly ignored.
406+ > In [ JSON] [ ] ,
407+ > the value ` null ` must be treated as if the attribute was not included.
408+ > In [ JavaScript] [ ] ,
409+ > both ` null ` and ` undefined ` must be similarly ignored.
394410
395411## Glossary
396412
@@ -456,12 +472,17 @@ ways to get started.
456472See [ ` support.md ` ] [ support ] for ways to get help.
457473Ideas for new utilities and tools can be posted in [ ` syntax-tree/ideas ` ] [ ideas ] .
458474
459- A curated list of awesome syntax-tree, unist, hast, mdast, nlcst, and xast
460- resources can be found in [ awesome syntax-tree] [ awesome ] .
475+ A curated list of awesome ` syntax-tree ` ,
476+ unist,
477+ hast,
478+ mdast,
479+ nlcst,
480+ and xast resources can be found in [ awesome syntax-tree] [ awesome ] .
461481
462482This project has a [ code of conduct] [ coc ] .
463- By interacting with this repository, organization, or community you agree to
464- abide by its terms.
483+ By interacting with this repository,
484+ organization,
485+ or community you agree to abide by its terms.
465486
466487## Acknowledgments
467488
0 commit comments