[Bug 29442] [XSLT30] Impossible to return maps, functions, arrays, sequence of integers or doubles from xsl:functions, xsl:templates, xsl:sequence etc

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29442

--- Comment #3 from Abel Braaksma <abel.braaksma@xs4all.nl> ---
I think what I am looking for is something along these lines:

The result of a sequence constructor is dependent on the immediate instruction
it is contained by and is one of the following:

1) The following seqtors create [#LINK Simple Content].
   a) Instructions xsl:attribute, xsl:comment, xsl:processing-instruction,
xsl:namespace, and xsl:value-of 
   b) Attribute value templates and text value templates

2) The following seqtors create [#LINK Complex Content].
   a) Instructions xsl:element, xsl:document, xsl:copy, xsl:message,
xsl:assert, xsl:variable/param/with-param without an as-attribute
   b) The declarations , xsl:variable/param without an as-attribute
   c) Literal result elements
   d) The instruction xsl:result-document when the effective value for
build-tree="true".
   e) The implicit xsl:document instruction in [f:construct-result-tree] if
result-tree construction is requested for the entire transformation (usually by
setting build-tree="true").

3) The following seqtors create [#LINK Sequences of items]
   a) Instructions xsl:fallback, xsl:break, xsl:choose, xsl:for-each,
xsl:for-each-group, xsl:if, xsl:iterate, xsl:map, xsl:map-entry, xsl:merge-key,
xsl:on-empty, xsl:on-non-empty, xsl:perform-sort, xsl:sequence, xsl:stream,
xsl:try, xsl:variable/param/with-param with an as-attribute,
xsl:where-populated, 
   b) The declarations xsl:key, xsl:function, xsl:template and
xsl:variable/param/with-param when an as-attribute is present
   c) The non-instructions xsl:accumulator-rule, xsl:otherwise, xsl:when,
xsl:catch, xsl:merge-action, xsl:merge-key, xsl:on-completion,
xsl:matching-substring, xsl:non-matching-substring and xsl:sort
   d) The instruction xsl:result-document when the effective value for
build-tree="false".
   e) The result of the entire transformation when result-tree creation is not
requested (usually by setting build-tree="false" on xsl:output)

4) Extension instructions that take sequence constructors can fall in either or
none of the above categories depending implementation-defined semantics.


The first two links are obvious, the third would go to a new section that
simply has the quoted line from Comment#2.

I tried to be complete. Even if we decide to do nothing, at least we have a
list the enumerates what instruction creates what, a cause of common confusion
(and I'm afraid this won't be the last time I am stymied by it...).

As a by-product of going over each instruction and finding out whether or not
they have a link to 5.7.1 or 5.7.2 showed a (tiny) additional editorial bug in
the spec: xsl:result-document is listed under 5.7.1, but this is only true when
build-tree="true".

I listed xsl:on-empty and xsl:on-non-empty with "Sequence" instead of
complex/simple content, because in fact its result, *after* evaluating the
sequence constructor in the normal, non-normalizing way, it is added to the
result of its containing instruction which is then normalized if necessary.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 9 February 2016 23:29:44 UTC