QT4 CG Meeting 166 Minutes 2026-05-26

Meeting index / QT4CG.org / Dashboard / GH Issues / GH Pull Requests

Table of Contents

Summary of new and continuing actions [0/2]

  • [ ] QT4CG-143-02: MK to try to recover the ability to extract formal equivalences into tests
  • [ ] QT4CG-165-02: NW to draft an agenda for the face-to-face meeting

Draft Minutes

1. Administrivia

1.1. Roll call [9/10]

  • [X] David J Birnbaum (DB)
  • [ ] Reece Dunn (RD)
  • [X] Christian Grün (CG)
  • [X] Joel Kalvesmaki (JK)
  • [X] Michael Kay (MK)
  • [X] Juri Leino (JLO)
  • [X] John Lumley (JWL)
  • [X] Alan Painter (AP)
  • [X] Wendell Piez (WP)
  • [X] Norm Tovey-Walsh (NW) Scribe. Chair.

1.2. Accept the agenda

Proposal: Accept the agenda.

Accepted.

1.3. Approve minutes of the previous meeting

Proposal: Accept the minutes of the previous meeting.

Accepted.

1.4. Next meeting

The next meeting is the face-to-face colocated with XML Prague. I propose that we skip 9 June and that our first regular meeting after the face-to-face will be on 16 June.

CG gives regrets for 2, 9, and 16 June.

1.5. Review of open action items [1/3]

1.6. Review of open pull requests and issues

This section summarizes all of the issues and pull requests that need to be resolved before we can finish. See Technical Agenda below for the focus of this meeting.

1.6.1. Blocked

The following PRs are open but have merge conflicts or comments which suggest they aren’t ready for action.

  • PR #2594: 2389 Adaptive Serialization: more freedom
  • PR #2350: 708 An alternative proposal for generators
  • PR #2247: 716 Deferred Evaluation in XPath - the f:generator record
  • PR #2160: 2073 data model changes for JNodes and Sequences
  • PR #2071: 77c deep update
  • PR #2019: 1776: XSLT template rules for maps and array

1.6.2. Merge without discussion

The following PRs are editorial, small, or otherwise appeared to be uncontroversial when the agenda was prepared. The chairs propose that these can be merged without discussion. If you think discussion is necessary, please say so.

  • PR #2650: 2648 File Module: editorial notes
  • PR #2645: 2565 Absent-vs-Empty fields in dateTime-record
  • PR #2643: 2631 Drop scan-left and scan-right

JK questions whether we should discuss removing scan-left and scan-right.

  • NW: It’s a simple enough proposal, editorially.
  • MK: We have no tests for it.
  • CG: I think it would also need further editorial work.

Proposal: Merge without further discussion.

Accepted.

1.6.3. Substantive PRs

The following substantive PRs were open when this agenda was prepared.

  • PR #2667: 2458 replacement for get() selectors
  • PR #2666: 2661 Add content-key option for fn:element-to-map
  • PR #2665: 2663 Change computed node constructors to use standard coercion rules
  • PR #2662: 2659 bin:count-ones, bin:rotate, bin:is-bit-set, bin:sets-bits
  • PR #2658: 2655b matching segments empty
  • PR #2656: 2651 Use termdefs for range variables
  • PR #2654: 2652 Clarify lax validation
  • PR #2649: 2647 descendants: recursion, filtering
  • PR #2646: 2642 Add compiled-regex attribute to xsl:analyze-string
  • PR #2638: 2632-6: cross-cutting consistency
  • PR #2637: 2632-5: refresh stale 4.0 content
  • PR #2636: 2632-4: logic and semantics
  • PR #2635: 2632-3: typos and grammar
  • PR #2634: 2632-2: fix broken examples in expressions.xml
  • PR #2633: 2632-1: fix critical bugs and DTD-validity issues
  • PR #2628: 2617 Duration multiplied or divided by number
  • PR #2589: 2587 Streamability of context value expressions
  • PR #2019: 1776: XSLT template rules for maps and array

2. Technical agenda

MK proposes to do the items in reverse order of what was proposed in the agenda.

2.1. PR #2628: 2617 Duration multiplied or divided by number

See PR #2628

  • MK: There’s an unnecessary restriction on what you can multiply by.
    • … The PR replaces the four opertions about multiplying by a number with two operations.
  • MK: The other influence was to get rid of converting the number two a double.
    • … The number of seconds in a duration is a decimal, so you could get strange rounding behavior.
  • MK: It effects the mapping tale for arithemetic in the XPath spec, but only trivially.
  • MK: The error conditions were weird, which is another reason why I looked at this

Proposal: accept this PR.

Accepted.

2.2. PR #2646: 2642 Add compiled-regex attribute to xsl:analyze-string

See PR #2646

  • MK: This is by request when we looked at the new regex function.
    • … This fills that gap. And explains its semantics in terms of existing semantics.

Proposal: accept this PR.

Accepted.

2.3. PR #2649: 2647 descendants: recursion, filtering

See PR #2649

  • CG: This function can get very slow or memory intensive. If you have a lot of subdirectories to parse, the challenge is that the filesystem is nondeterministic.
    • … You can either recurse or filter.
    • … Filter can be used to limit the number of values returned.
  • CG: The most important option is recurse which lets you skip some directories when doing recurse.
  • JLO: I do think this is a valuable addition; it would be nice if a predicate could automatically do the right thing.
    • … Is this something we want to add to other functions as well?
    • … Especially, since these are callbacks, this is a harder sell than just “yes/no” for the options.
  • CG: I haven’t added a filter to file:children because it’s a much simpler function.
    • … With respect to other functions, do you have some other functions in mind?
  • JLO: Well, fn:collection() seems like a similar sort of function.
    • … What about globbing parameters for filter and recurse instead of callbacks?
  • CG: We could use a choice item type and also allow strings.
    • … We have the glob pattern for file:list.
  • NW: You couldn’t exclude things with the glob patterns.
  • JLO: You could use ! in front.
  • MK: The way the position argument is described, “counts the number of times the callback has been called”. I wonder how that interacts with multithreading and what about order?
  • CG: We won’t have any guarantee about what the first ten items are.
    • … We could remove the position argument. It’s not as valuable here.
  • MK: I think that would be better.
  • JLO: An even broader question: what is the justification to have file:descendants and file:list?
  • CG: Yes, but file:list existed before I started working on this. We noticed that file:children would be useful and file:descendants was added after that.
    • … They’re all useful, but you can do everything you need with just some of the functions.
  • JLO: I would always use file:list.
  • CG: That’s interesting, we never do.

CG will review and submit an updated PR.

2.4. PR #2654: 2652 Clarify lax validation

See PR #2654

  • MK: This is purely editorial. There are inconsistent error codes when you request lax validation with a processor that doesn’t support validation. Should you ignore it, or is it an error?
  • MK: The basic text on validation is now in the Functions and Operators specification.

MK reviews the text.

  • MK: For compatibility reasons, XSLT still behaves differently.
    • … There are clarifications that requesting lax validation on fn:doc raises a dynamic error.
  • MK: There’s a note explaining why an empty schema can be useful.

Switching to the XSLT specification.

  • MK: In XSLT, we add a note about validation against an empty schema.
    • … We note that backwards compatibility is retained but other constructs raise an error.

Switching to XQuery

  • MK: The note about an empty schema is added.

Proposal: accept this PR.

Accepted.

2.5. PR #2656: 2651 Use termdefs for range variables

See PR #2656

  • MK: When we did the expanding of for and let expressions in XPath, there’s now duplicated text in the spec between the XPath and XQuery specs.
    • … There sufficiently different, but they do have duplicated text.
    • … But the IDs of everything have to be unique in the combined and separated specifications.
    • … That’s a problem, which I initially resolved by not making them defined terms.
  • MK: There’s a question of why we introduced the term range variable. But regardless, it’s a term of art now.
  • MK: It comes up a bit diffferently in XPath and XQuery.

In XPath:

  • MK: A bunch of new defined terms are added, but nothing changes about the semantics.

In XQuery:

  • MK: It’s similar; there are new definitions and tries to use them consistently.
    • … Also, I moved a pargraph that was in completely the wrong place.

Proposal: accept this PR.

Accepted.

2.6. PR #2658: 2655b matching segments empty

See PR #2658

  • MK: This was a request to make the new fn:matching-segments function behave more consistently with other regex functions.
    • … If the value is the empty sequence, we treat it as the empty string, and don’t return an empty sequence.
  • JWL: In almost the last example, where you have matching segments with an empty string as the value.
    • … So the empty sequence is equivalent to the empty string?
  • MK: Yes.

Proposal: accept this PR.

Accepted.

2.7. PR #2662: 2659 bin:count-ones, bin:rotate, bin:is-bit-set, bin:sets-bits

See PR #2662

  • CG: This is about the binary module. We used it in a project where we wanted to compute the Hamming distance.
    • … That turned out to be surprisingly difficult. These functions improve that.
    • … The name count-ones is a comprimise.
  • CG: After adding that, I also added is-bit-set, set-bits, and rotate (as an alternative to shift).
  • CG: In set-bits, it’s a sequence to simplify use when you want to set more than one bit.
    • … Obviously, we didn’t invent this module to do bit operations, but in practice this works fairly well.
  • JLO: I believe that all of this is necessary, how about count-set-bits since we have is-bit-set and set-bits?

Some discussion of the difference between shift and rotate.

  • JWL: The bit shift when it was original done shifted zeros in from the end. I don’t know why we didn’t think about rotate.
  • JWL: I think we should name it count-bits-set to avoid some ambiguity.

Proposal: rename count-ones to count-bits~set then merge.

Accepted.

2.8. PR #2665: 2663 Change computed node constructors to use standard coercion rules

See PR #2665

  • MK: This is another one that came out of Sheila’s work
  • MK: The current logic for computed node constructors where you specify the name of the constructor has special rules for the name
    • … This is different from the standard rules, at least with respect to xs:anyURI.
    • … That means the implementation can’t use the same code, so there are different error codes.
  • MK: This PR changes them so they use the standard coercion rules.
    • … The rules get a little simpler for each of the node types.
  • MK: The only observable effect of this change is that the error codes are different (and xs:anyURI is accepted, which requires changing some tests).

Proposal: accept this PR.

Accepted.

2.9. PR #2666: 2661 Add content-key option for fn:element-to-map

See PR #2666

  • MK: The specification for element-to-map allows you to customize the @ symbol for attributes, but not the #content magic string.
    • … This just adds another option that allows you to control that.

Some discussion of how setting attribute-marker and content-key to the same string would be problematic.

  • MK: That’s where the rule for inserting additional “#” to make a unique string applies.

Proposal: accept this PR.

Accepted.

2.10. PR #2667: 2458 replacement for get() selectors

See PR #2667

  • MK: This is a fairly significant change. Let’s begin with an introduction.
    • … The use of get() selectors has never sat very well.
  • MK: Just overloading “/” does quite different things.
  • MK: The NodeTest in an AxisStep now allows a computed name or key ancestor::{$name}.
    • … And it changes what happens if you have atomic values on the right if you have JNodes on the left.
  • MK: So how do we evaluate the “/” operator?
    • … We split the cases for XNodes and JNodes
    • … Any maps or arrays on the left are converted to JNodes
    • … The left hand side must be all XNodes or all JNodes.
    • … The semantics for XNodes are the same as they have been.
    • … But for a sequence of JNodes, there are new rules.

MK reviews the new rules.

  • MK: The JNodes are always returned in document order.
  • MK: The grammar change is that a node test can include an enclosed Expr. The Selector can’t. … You can only use the replacement if you have an explicit axis (because a free-standing expression beginning with braces already has a specified meaning).
  • MK: On the JNode side, you can now do things like $map/$key.
    • … There are lots of examples of selecting from maps and arrays.

MK reviews the equivalence to JSONPath.

  • JWL: If we’re running in XSLT, are we going to get conflicts with value templates?
  • MK: No, it’s just another thing with curly braces.
  • JWL: But this is the first time they occur in a slector.
  • MK: Yes, we probably need to look at the impact on patterns.
  • CG: With regard to the curly braces, I wonder if we could use parenthesis instead.
    • … That would make things more similar to the lookup expression.
    • … The semantics are fairly different if you remove the axis.
  • MK: I like the curly brackets. It is indicative of substituting a value.
    • … There’s some overlap with the union syntax that needs investigating.

3. Any other business