Skip to content

Commit 1eff5e0

Browse files
authored
Add <featurecaption> element child of <feature> (#163)
* Get rid of references to MicroXML, update Abstract * Add link to UCR * Add text-valued <title> element child of <feature> per Maps4HTML/MapML.js#316. Change mapml vocabulary to the xhtml namespace. Fix error in URL introduced in previous commit. * Rename <feature><title> to <feature><featurecaption> * Add spec description of <featurecaption>. Remove obsolete sch file. * Revise feature, featurecaption, properties specifications, links. * Delete redundant paragraph. Fix incorrect link reference. Remove redundant text description.
1 parent a09c9cd commit 1eff5e0

File tree

4 files changed

+53
-31
lines changed

4 files changed

+53
-31
lines changed

schema/README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
# MapML
22

3-
[Map Markup Language](http://maps4html.github.io/MapML/spec/) is 'MicroXML' vocabulary for maps.
3+
[Map Markup Language](https://maps4html.org/MapML/spec/) is a proposed HTML vocabulary for maps.
44
Although document validity is not a concept that can be strictly enforced on the internet,
55
the documents in this directory are an attempt to provide guidance to map authors on what
66
constitutes markup that is understood as being within scope of the MapML specification.
77

8-
In principle, a MapML document should be parseable with an HTML-like parser, because
9-
many of the elements are copied from the HTML vocabulary and are intended to have
10-
identical processing semantics to their counterpart in HTML.
8+
In principle, a MapML document should be parseable the HTML parser, because
9+
many of the elements are extended from the HTML namespace and are intended to have
10+
identical processing semantics to their counterpart in HTML apart from extensions specified in MapML.
1111

12-
In practice, no such MapML parser exists at the time of writing, and it should be good enough to encode
13-
a MapML document in [MicroXML](https://dvcs.w3.org/hg/microxml/raw-file/tip/spec/microxml.html) syntax so that an XML parser can be used. When such a parser is used,
12+
In practice, no such MapML/HTML parser exists at the time of writing, and it should be good enough to encode
13+
a MapML document in HTML5 XML syntax so that Web browsers' XML parsers can be used. When such a parser is used,
1414
it should be possible to use the schema / schematron documents in this directory to validate certain
1515
rules of MapML documents. The schemas / schematron files in this directory are intended to
16-
evolve as the concept of MapML evolves, and perhaps at some point when enough people
17-
get involved we will be able to 'fork' the nu validator / parser for HTML to provide a similarly
18-
robust parsing and validation service online.
16+
evolve as the concept of MapML evolves.
1917

2018
## Instructions
2119

22-
The files microxml.sch (a single [schematron](http://schematron.com/) validation rule for MicroXML syntax),
2320
mapml.rnc (a [RelaxNG](http://www.relaxng.org/compact-tutorial-20030326.html) compact syntax schema) and mapml.sch (post-schema validation MapML
2421
schematron rules) are intended to be applied in that order.
2522

schema/mapml.rnc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
2+
default namespace = "https://www.w3.org/1999/xhtml/"
23
start = mapml
34
mapml = element mapml { head?, attribute lang {text}?, body }
45
head = element head { headContent }
@@ -78,7 +79,7 @@ feature = element feature {
7879
attribute id { text }?,
7980
attribute class { text }?,
8081
attribute zoom { text }?,
81-
(geometry? & properties?)
82+
(geometry? & properties? & featurecaption?)
8283
}
8384
tile = element tile {
8485
attribute col { xsd:integer },
@@ -89,6 +90,7 @@ bbox = element bbox { twoPositions }
8990
image = element image { ImageModel }
9091
geometry = element geometry { GeometryContent }
9192
properties = element properties { PropertyContent }
93+
featurecaption = element featurecaption { text? }
9294

9395
ImageResourceMetadataAttributes =
9496
attribute src { text },

schema/microxml.sch

Lines changed: 0 additions & 10 deletions
This file was deleted.

spec/index.html

Lines changed: 43 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,7 +2139,9 @@ <h5>The <code>&lt;<dfn id="the-feature-element">feature</dfn>&gt;</code> element
21392139
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-contexts">Contexts in which this element can be used</a>:</dt>
21402140
<dd>Child of the <a href="#the-body-element"><code>body</code></a> element.</dd>
21412141
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model">Content model</a>:</dt>
2142-
<dd>An optional <a href="#the-geometry-element"><code>geometry</code></a> element and an optional <a href="#the-properties-element"><code>properties</code></a> element.</dd>
2142+
<dd>Optional <a href="#the-featurecaption-element"><code>featurecaption</code></a> element,
2143+
optional <a href="#the-geometry-element"><code>geometry</code></a> element,
2144+
optional <a href="#the-properties-element"><code>properties</code></a> element.</dd>
21432145
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-attributes">Content attributes</a>:</dt>
21442146
<dd><a href="https://html.spec.whatwg.org/multipage/dom.html#global-attributes">Global attributes</a></dd>
21452147
<dd><code>zoom</code> — the 'native' zoom level of the feature geometry.</dd>
@@ -2157,8 +2159,36 @@ <h5>The <code>&lt;<dfn id="the-feature-element">feature</dfn>&gt;</code> element
21572159
</dl>
21582160

21592161
<p>
2160-
A <a href="#the-feature-element"><code>feature</code></a> element represents a geographic feature. A <a href="#the-feature-element"><code>feature</code></a> element has an optional <a href="#the-properties-element"><code>properties</code></a> child element, and a required child
2161-
<a href="#the-geometry-element"><code>geometry</code></a> element.
2162+
A <a href="#the-feature-element"><code>feature</code></a> element represents a map feature.
2163+
</p>
2164+
</section>
2165+
<section>
2166+
<h5>The <code>&lt;<dfn id="the-featurecaption-element">featurecaption</dfn>&gt;</code> element</h5>
2167+
<dl class="def">
2168+
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-categories">Categories</a>:</dt>
2169+
<dd>Feature data.</dd>
2170+
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-contexts">Contexts in which this element can be used</a>:</dt>
2171+
<dd>Child of the <a href="#the-feature-element"><code>feature</code></a> element.</dd>
2172+
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model">Content model</a>:</dt>
2173+
<dd><a href="https://html.spec.whatwg.org/multipage/dom.html#flow-content">Flow content</a>.</dd>
2174+
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-attributes">Content attributes</a>:</dt>
2175+
<dd>N/A.</dd>
2176+
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-dom">DOM interface</a>:</dt>
2177+
<dd>
2178+
<pre class="idl">
2179+
[Exposed=Window]
2180+
interface HTMLFeaturecaptionElement : HTMLElement {
2181+
[HTMLConstructor] constructor();
2182+
2183+
};
2184+
</pre>
2185+
</dd>
2186+
</dl>
2187+
<p>
2188+
The <a href="#the-featurecaption-element"><code>featurecaption</code></a> element
2189+
represents a caption for the contents of the
2190+
<a href="#the-featurecaption-element"><code>featurecaption</code></a> element's
2191+
parent <a href="#the-feature-element"><code>feature</code></a> element.
21622192
</p>
21632193
</section>
21642194
<section>
@@ -2167,9 +2197,9 @@ <h5>The <code>&lt;<dfn id="the-properties-element">properties</dfn>&gt;</code> e
21672197
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-categories">Categories</a>:</dt>
21682198
<dd>Feature data.</dd>
21692199
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-contexts">Contexts in which this element can be used</a>:</dt>
2170-
<dd>A child of the <a href="#the-feature-element"><code>feature</code></a> element, containing elements representing the properties of the feature.</dd>
2200+
<dd>A child of the <a href="#the-feature-element"><code>feature</code></a> element.</dd>
21712201
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model">Content model</a>:</dt>
2172-
<dd>One or more unknown elements with text values. <div class="ednote">TODO: Allow HTML content.</div></dd>
2202+
<dd><a href="https://html.spec.whatwg.org/multipage/dom.html#palpable-content">Palpable content</a></dd>
21732203
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-attributes">Content attributes</a>:</dt>
21742204
<dd>N/A.</dd>
21752205
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-dom">DOM interface</a>:</dt>
@@ -2183,9 +2213,6 @@ <h5>The <code>&lt;<dfn id="the-properties-element">properties</dfn>&gt;</code> e
21832213
</dd>
21842214
</dl>
21852215

2186-
<p>
2187-
A <a href="#the-feature-element"><code>feature</code></a> element can have zero or one <a href="#the-properties-element"><code>properties</code></a> element, which contains zero or more unknown elements, whose content is text.
2188-
</p>
21892216
</section>
21902217
<section>
21912218
<h5>The <code>&lt;<dfn id="the-geometry-element">geometry</dfn>&gt;</code> element</h5>
@@ -2211,8 +2238,14 @@ <h5>The <code>&lt;<dfn id="the-geometry-element">geometry</dfn>&gt;</code> eleme
22112238
</dd>
22122239
</dl>
22132240

2214-
<p>A <a href="#the-geometry-element"><code>geometry</code></a> element has one child element, which can be a <a href="#the-point-element"><code>point</code></a>,
2215-
<a href="#the-linestring-element"><code>linestring</code></a>, <a href="#the-polygon-element"><code>polygon</code></a>, <a href="#the-multipoint-element"><code>multipoint</code></a>, <a href="#the-multilinestring-element"><code>multilinestring</code></a>, <a href="#the-multipolygon-element"><code>multipolygon</code></a>, or <a href="#the-geometrycollection-element"><code>geometrycollection</code></a>.</p>
2241+
<p>A <a href="#the-geometry-element"><code>geometry</code></a> element has one child element,
2242+
which can be a <a href="#the-point-element"><code>point</code></a>,
2243+
<a href="#the-linestring-element"><code>linestring</code></a>,
2244+
<a href="#the-polygon-element"><code>polygon</code></a>,
2245+
<a href="#the-multipoint-element"><code>multipoint</code></a>,
2246+
<a href="#the-multilinestring-element"><code>multilinestring</code></a>,
2247+
<a href="#the-multipolygon-element"><code>multipolygon</code></a>, or
2248+
<a href="#the-geometrycollection-element"><code>geometrycollection</code></a>.</p>
22162249

22172250
<table id="geometry-values" class="def">
22182251
<thead>

0 commit comments

Comments
 (0)