diff --git a/README.md b/README.md
index 408d19e..79e7b70 100644
--- a/README.md
+++ b/README.md
@@ -56,7 +56,7 @@ If you use DocLang in academic or technical work, please cite the specification:
## Development
-To work on this repository — setup, tests, reference generation, releases — see [CONTRIBUTING.md](https://github.com/doclang-project/doclang/blob/main/doclang/CONTRIBUTING.md).
+To work on this repository — setup, tests, reference generation, releases — see [CONTRIBUTING.md](https://github.com/doclang-project/doclang/blob/main/CONTRIBUTING.md).
## We ❤️ Open Source AI
diff --git a/doclang/doclang.sch b/doclang/doclang.sch
index 48ee982..13df3d5 100644
--- a/doclang/doclang.sch
+++ b/doclang/doclang.sch
@@ -332,19 +332,23 @@
-
+
-
- Picture with class="undefined" (or no class) must not contain table in the element body.
+
+ Element tabular is only allowed in picture with class="chart".
-
- Element table is only allowed as the first element of the body of picture with class="chart".
+
+ Element src must be the first element of the picture body when present.
+
+
+
+ Element tabular must immediately follow src when src is present, otherwise it may be the first body element.
diff --git a/doclang/doclang.xsd b/doclang/doclang.xsd
index 98ca2f7..ffa4efb 100644
--- a/doclang/doclang.xsd
+++ b/doclang/doclang.xsd
@@ -247,26 +247,27 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -562,6 +563,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/form/form-examples.md b/examples/form/form-examples.md
index 81f2196..af7a1c3 100644
--- a/examples/form/form-examples.md
+++ b/examples/form/form-examples.md
@@ -1,25 +1,27 @@
# Form Examples
+These examples illustrate the [Fields](../../spec.md#fields) section of the DocLang specification, using `field_region`, `field_item`, and `field_heading` elements.
+
## Simple key-values

```xml
-
+
+
```
## Nesting forms and using form headings
@@ -27,34 +29,43 @@

```xml
-
-
+
+
+
+ River transport ADN/ADNRnot examined
-
-
- ...
- The transport ... considered.
- THESE TRANSPORT ... PACK!
-
+
+
+
+ Sea transport IMDG
+
+
+
+
+
+ The transport ... considered.
+
+
+ THESE TRANSPORT ... PACK!
+
+
```
## Fillable form
@@ -62,119 +73,123 @@

```xml
-
- ...
-
+
+
+ Delivery Suppl...Finance Department
+
+
+
+
```
-## Example 3
+## Use of form headings

```xml
-
+
```
## High density form
@@ -182,69 +197,68 @@

```xml
-SEZIONE II A - REDDITI SOGGETTI A IMPOSTA SOSTITUTIVA
-
+
```
## Values without Keys
@@ -252,272 +266,273 @@

```xml
-QUADRO W - Investimenti e attività estere di natura finanziaria o patrimoniale
-SEZIONE I - DATI RELATIVI AGLI INVESTIMENTI E ALLE ATTIVITA'
-
+
```
-## See lower section of a form with fillable fields, markers, hints.
+## Another complex form deconstructed into field items

+
```xml
-QUADRO C - Redditi di lavoro dipendente e assimilati
+QUADRO C - Redditi di lavoro...
-
+
```
## Middle section of a form with A and B choices

+
```xml
-...
-
-...
+
+
+
```
## Tabular form with strong 2D value relationship

-Tabular part of the form:
-```xml
-
-Beiträge zur Altersvorsorge52
-Steue...Ehemann / Person AEhefrau / Person B
-Arbeitnehmeranteil laut ...***FORM1***,- ***FORM2***,- @
-Beiträge zur landwirtsc ...***FORM3***,- ***FORM4***,-
-Beiträge zu gesetzliche ...***FORM5***,- ***FORM6***,-
-Erstattete Beiträge und ...***FORM7***,- ***FORM8***,- @
-...
-
-...
-
-FORMS:
-***FORM1***: 300EUR
-***FORM2***: 400EUR
-***FORM4***: 401
-***FORM5***: 302
-***FORM3***: 301
-***FORM6***: 402
-***FORM7***: 309
-***FORM8***: 409
+```xml
+
+
+ Beiträge zur Altersvorsorge52
+ Steuerpflichtige Person / Ehemann / Person AEhefrau / Person B
+ Arbeitnehmeranteil laut Nr. 23 a / b der Lohnsteuerbescheinigung*FORM1*,-*FORM2*,-e
+ Beiträge zur landwirtschaftlichen Alterskasse; zu berufsständ...*FORM3*,-*FORM4*,-
+ Beiträge zu gesetzlichen Rentenversicherungen...*FORM5*,-*FORM6*,-
+ Erstattete Beiträge und / oder steuerfreie Zuschüsse zu den...*FORM7*,-*FORM8*,-e
+
+
+
+
```
+*FORMS referred above:
+*FORM1*: 300EUR
+*FORM2*: 400EUR
+*FORM4*: 401
+*FORM5*: 302
+*FORM3*: 301
+*FORM6*: 402
+*FORM7*: 309
+*FORM8*: 409
+
## Mix table and form elements

```xml
-...
+
Part IIIFigure Your Credit
-
10
-
-
-If you checked (in Part l):Enter
-Box 1, 2, 4, or 7$5,000
-Box 3, 5, or 6$7,500
-Box 8 or 9$3,750
-
-
-10
-
+
+ If you checked (in Part l):Enter
+ Box 1, 2, 4, or 7$5,000
+ Box 3, 5, or 6$7,500
+ Box 8 or 9$3,750
+
+1011 If you checked (in Part I):
- Box 6, add $5,000 to the taxable disability income of the spouse who was under age 65. Enter the total.
- Box 2, 4, or 9, enter your taxable disability income.
- BBox 5, add your taxable disability income to your spouse's taxable disability income. Enter the total.
+
+ Box 6, add $5,000 to the taxable...
+
+ Box 2, 4, or 9, enter your taxable...
+
+ BBox 5, add your taxable disabilit...
-
-11.
-
+11.
-For more details on what to include on line 11, see Figure Your Credit in the instructions.
-
-12 If you completed line 11, enter the smaller of line 10 or line 11. All others, enter the amount from line 10
-1274,992
-...
+For more details on what to include on line 11...
+12 If you completed line 11, enter the smaller...
+1274,992
+
```
diff --git a/exports/doclang-styled.docx b/exports/doclang-styled.docx
index 496f67b..5951e87 100644
Binary files a/exports/doclang-styled.docx and b/exports/doclang-styled.docx differ
diff --git a/exports/doclang.docx b/exports/doclang.docx
index d2fabd8..0a243a5 100644
Binary files a/exports/doclang.docx and b/exports/doclang.docx differ
diff --git a/reference/input/reference.xlsx b/reference/input/reference.xlsx
index 437f187..427c646 100644
Binary files a/reference/input/reference.xlsx and b/reference/input/reference.xlsx differ
diff --git a/spec.md b/spec.md
index 710b8df..3331746 100644
--- a/spec.md
+++ b/spec.md
@@ -106,6 +106,8 @@ Adopted from XML:
- **attribute**: An XML attribute.
- **tag**: An XML tag: can be a start-tag, an end-tag, or an empty-element tag (a.k.a. self-closing tag).
+When referring to an attribute in prose, this specification uses XPath-style notation: `element@attribute` (e.g. `label@value`, `location@resolution`).
+
Adopted from HTML:
- **block-level element**: An element that is meant to be interpreted or displayed as a block, i.e. starting on a new line, occupying the full width of its container, and typically with increased margin to any other neighboring block-level elements; a typical HTML example is the `p` element (paragraph).
@@ -135,7 +137,7 @@ As DocLang is XML, standard XML encoding rules apply — for example:
- any provided XML prolog defines the encoding, otherwise UTF-8 is assumed
- special characters reserved by XML, such as `<`, can be represented either by escaping with the respective XML entities (e.g. `<` becomes `<`) or by using CDATA section syntax (e.g. raw text `` can be represented as `]]>`.)
-DocLang generally allows applications to decide how to handle XML whitespace (i.e implicit `xml:space="default"` behavior). To address cases where preservation is required, DocLang provides a dedicated element for whitespace preservation (i.e. `xml:space="preserve"` behavior).
+DocLang generally allows applications to decide how to handle XML whitespace (i.e implicit `xml:space="default"` behavior). To address cases where preservation is required, DocLang provides [``](#content) for whitespace preservation (i.e. `xml:space="preserve"` behavior).
### Head and Body Areas
@@ -209,7 +211,7 @@ In the example further below:
-
+
```
@@ -318,17 +320,17 @@ Picture by base64-encoded data:
```
-Bar chart using [recommended label](#appendix-b-recommendations) and [`
`](#table) for capturing chart data in OTSL format:
+Bar chart using [recommended label](#appendix-b-recommendations) and [``](#tabular) for capturing structured chart data:
```xml
-
+
+ CategoryValueA10B20
-
-
+
```
@@ -364,24 +366,21 @@ Code block with language classification and whitespace preservation:
Grouped code with caption and coordinates:
```xml
-
+
+
+
Listing 1: Minimal HTTP server
-
-
-
- {
- res.end('OK');
- });
- server.listen(3000);]]>
-
- Source: examples/code/server.js
-
+ {
+ res.end('OK');
+ });
+ server.listen(3000);]]>
+
```
Long code blocks can be split across pages using continuation elements; keep `