[Bug 29142] New: [XSLT30] streamability of the xsl:merge-source/select expression

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

            Bug ID: 29142
           Summary: [XSLT30] streamability of the xsl:merge-source/select
                    expression
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

This bug followed from bug#29120.

We say in the same section 15.4:

> 3. The expression in the select attribute of that xsl:merge-source 
> element has striding posture;

I have the following observations:

1) Before we can assess the streamability of anything, we need to know the
   context posture and the context item type, which is not given here. It 
   stands to reason that the context posture should be striding. The context 
   item follows from the anchor item, which is the document node.

2) We don't mention the sweep. While this may be irrelevant (free-ranging 
   sweep results in roaming posture and v.v.), we seem to always mention it 
   elsewhere. 

3) Perhaps it is intentionally just striding, but I think we do not need to 
   limit it to being grounded. select="/snapshot(.)", or select="/foo
   /bar/copy-of()" does not need to be illegal.

4) We currently imply that we do not disallow grounded posture, but that 
   if you return non-nodes, that the snapshot() call will fail. I don't see 
   a problem with leaving that as is (neither would I mind it if we allow 
   snapshot to operate on non-nodes).

I propose to change this something like the following:

    <proposal>
    3. The expression in the select attribute of that xsl:merge-source 
    element, assessed with a context posture of striding and a context item 
    type of document(), has striding or grounded posture and a motionless or 
    consuming sweep."
    </proposal>

(consequently, the example given has an expression has a relative path
expression, which is not wrong, but may be confusing, I suggest to change it
"/events/...". This observation may be important because of the streamability
rules on the root() function).

I think that legal merge expressions should include:

/
which is motionless/striding

/foo/bar
which is consuming/striding

/foo/bar/@zed
which is consuming/striding

/foo//*/../@zed
a scanning expr, then climbing, then striding and consuming

/foo/bar/namespace::node()
which is consuming/striding

/foo/string-join(bar)
which is consuming/grounded

//*/string-join(ancestor-or-self::*/name())
which is striding, then scanning expr, then crawling, then grounded and
consuming

(/foo//bar)[3]
which is crawling, then striding and consuming


I think all in all our rules were intended to allow these. The only nitpick is
with xsl:merge-source/@select returning non-nodes, but this is covered by the
current text.

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

Received on Wednesday, 23 September 2015 15:12:53 UTC