diff --git a/schema/README.md b/schema/README.md index 28c3674..0b06da7 100644 --- a/schema/README.md +++ b/schema/README.md @@ -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. diff --git a/schema/mapml.rnc b/schema/mapml.rnc index 1d7b9dd..9915639 100644 --- a/schema/mapml.rnc +++ b/schema/mapml.rnc @@ -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 } @@ -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 }, @@ -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 }, diff --git a/schema/microxml.sch b/schema/microxml.sch deleted file mode 100644 index 507435d..0000000 --- a/schema/microxml.sch +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - Namespaces are not allowed in MicroXML - - - \ No newline at end of file diff --git a/spec/index.html b/spec/index.html index 0ca3974..720c983 100644 --- a/spec/index.html +++ b/spec/index.html @@ -2139,7 +2139,9 @@
The <feature> element
Contexts in which this element can be used:
Child of the body element.
Content model:
-
An optional geometry element and an optional properties element.
+
Optional featurecaption element, + optional geometry element, + optional properties element.
Content attributes:
Global attributes
zoom — the 'native' zoom level of the feature geometry.
@@ -2157,8 +2159,36 @@
The <feature> element

- A feature element represents a geographic feature. A feature element has an optional properties child element, and a required child - geometry element. + A feature element represents a map feature. +

+ +
+
The <featurecaption> element
+
+
Categories:
+
Feature data.
+
Contexts in which this element can be used:
+
Child of the feature element.
+
Content model:
+
Flow content.
+
Content attributes:
+
N/A.
+
DOM interface:
+
+
+            [Exposed=Window]
+            interface HTMLFeaturecaptionElement : HTMLElement {
+              [HTMLConstructor] constructor();
+              
+            };
+            
+
+
+

+ The featurecaption element + represents a caption for the contents of the + featurecaption element's + parent feature element.

@@ -2167,9 +2197,9 @@
The <properties> e
Categories:
Feature data.
Contexts in which this element can be used:
-
A child of the feature element, containing elements representing the properties of the feature.
+
A child of the feature element.
Content model:
-
One or more unknown elements with text values.
TODO: Allow HTML content.
+
Palpable content
Content attributes:
N/A.
DOM interface:
@@ -2183,9 +2213,6 @@
The <properties> e -

- A feature element can have zero or one properties element, which contains zero or more unknown elements, whose content is text. -

The <geometry> element
@@ -2211,8 +2238,14 @@
The <geometry> eleme -

A geometry element has one child element, which can be a point, - linestring, polygon, multipoint, multilinestring, multipolygon, or geometrycollection.

+

A geometry element has one child element, + which can be a point, + linestring, + polygon, + multipoint, + multilinestring, + multipolygon, or + geometrycollection.