> On 2 Dec 2017, at 18:15, Michael Kay <
mike@saxonica.com> wrote:
>
>
> I don't think there is any rule that says the number of elements in a document must be finite.
>
> ...
> Perhaps more interestingly, XPath 3.1 introduces maps, and there is no rule that says a map must be finite. It is possible to take a finite graph structure (such as schema component model) and represent each node in the graph as a map; the map will then be infinite (you can navigate around it for ever, going round and round in circles).
Or perhaps more relevant to the topic, the result of serializing the map as JSON and then converting the JSON to XML will be an infinite XML document: one can envisage performing successful operations on such a document, for example asking how many level-2 elements it contains (the answer will be a finite number).