Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <featurecaption> element child of <feature> #163

Merged
merged 9 commits into from
Mar 2, 2021
17 changes: 7 additions & 10 deletions schema/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# MapML

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

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

In practice, no such MapML parser exists at the time of writing, and it should be good enough to encode
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,
In practice, no such MapML/HTML parser exists at the time of writing, and it should be good enough to encode
a MapML document in HTML5 XML syntax so that Web browsers' XML parsers can be used. When such a parser is used,
it should be possible to use the schema / schematron documents in this directory to validate certain
rules of MapML documents. The schemas / schematron files in this directory are intended to
evolve as the concept of MapML evolves, and perhaps at some point when enough people
get involved we will be able to 'fork' the nu validator / parser for HTML to provide a similarly
robust parsing and validation service online.
evolve as the concept of MapML evolves.

## Instructions

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

Expand Down
4 changes: 3 additions & 1 deletion schema/mapml.rnc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
datatypes xsd = "http://www.w3.org/2001/XMLSchema-datatypes"
default namespace = "https://www.w3.org/1999/xhtml/"
start = mapml
mapml = element mapml { head?, attribute lang {text}?, body }
head = element head { headContent }
Expand Down Expand Up @@ -78,7 +79,7 @@ feature = element feature {
attribute id { text }?,
attribute class { text }?,
attribute zoom { text }?,
(geometry? & properties?)
(geometry? & properties? & featurecaption?)
}
tile = element tile {
attribute col { xsd:integer },
Expand All @@ -89,6 +90,7 @@ bbox = element bbox { twoPositions }
image = element image { ImageModel }
geometry = element geometry { GeometryContent }
properties = element properties { PropertyContent }
featurecaption = element featurecaption { text? }

ImageResourceMetadataAttributes =
attribute src { text },
Expand Down
10 changes: 0 additions & 10 deletions schema/microxml.sch

This file was deleted.

28 changes: 28 additions & 0 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2162,6 +2162,34 @@ <h5>The <code>&lt;<dfn id="the-feature-element">feature</dfn>&gt;</code> element
</p>
</section>
<section>
<h5>The <code>&lt;<dfn id="the-featurecaption-element">featurecaption</dfn>&gt;</code> element</h5>
<dl class="def">
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-categories">Categories</a>:</dt>
<dd>Feature data.</dd>
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-contexts">Contexts in which this element can be used</a>:</dt>
<dd>Child of the <a href="#the-body-element"><code>feature</code></a> element.</dd>
Malvoz marked this conversation as resolved.
Show resolved Hide resolved
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model">Content model</a>:</dt>
<dd><a href="https://html.spec.whatwg.org/multipage/dom.html#flow-content-2">Flow content</a>.</dd>
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-attributes">Content attributes</a>:</dt>
<dd>N/A.</dd>
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-dom">DOM interface</a>:</dt>
<dd>
<pre class="idl">
[Exposed=Window]
interface HTMLFeatureCaptionElement : HTMLElement {
[HTMLConstructor] constructor();

};
</pre>
</dd>
</dl>
<p>
A <a href="#the-featurecaption-element"><code>featurecaption</code></a> element represents the accessible name of a geographic feature.
Malvoz marked this conversation as resolved.
Show resolved Hide resolved
Every geographic feature should be given an accessible name. If no accessible name is found, the term "Feature" will be used
as the accessible name.
</p>
</section>
<section>
<h5>The <code>&lt;<dfn id="the-properties-element">properties</dfn>&gt;</code> element</h5>
<dl class="def">
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-categories">Categories</a>:</dt>
Expand Down