@qt4cg statuses

This page displays recent status updates about the QT4CG project.

The are also captured in an RSS feed.

By year: 2026, 2025, 2024, 2023, 2022, 2021, 2020

QT4 CG meeting 187 draft minutes #minutes-11-03

03 Nov at 17:45:00 GMT

Draft minutes published.

Issue #3014 closed #closed-3014

03 Nov at 17:24:01 GMT

`fn:collection`: defaults

Issue #3026 closed #closed-3026

03 Nov at 17:24:00 GMT

3014 fn:collection: defaults

Issue #2983 closed #closed-2983

03 Nov at 17:22:19 GMT

Inconsistency in definition of regular expression assertions

Issue #2988 closed #closed-2988

03 Nov at 17:22:18 GMT

2983 Expand and Extend Regex Formalism

Issue #2944 closed #closed-2944

03 Nov at 17:20:53 GMT

Editorial Notes (October 2026 edition)

Issue #3022 closed #closed-3022

03 Nov at 17:20:51 GMT

2944 Editorial Notes (October 2026 edition)

Issue #2994 closed #closed-2994

03 Nov at 17:19:13 GMT

File Module: editorial, minor revisions

Issue #3002 closed #closed-3002

03 Nov at 17:19:11 GMT

2994 File Module: editorial, minor revisions

Issue #3018 closed #closed-3018

03 Nov at 17:15:55 GMT

Add "but with" to the set of operators accepted by fn:op()

Issue #3020 closed #closed-3020

03 Nov at 17:15:53 GMT

3018 Add "but with" to the list of operators recognized by fn:op()

Issue #3005 closed #closed-3005

03 Nov at 17:12:57 GMT

`fn:build-uri`: UNCs

Issue #3027 closed #closed-3027

03 Nov at 17:12:56 GMT

3005 fn:build-uri: UNCs

Issue #3024 closed #closed-3024

03 Nov at 17:09:45 GMT

Improve output of fn:type-of(record)

Issue #3028 closed #closed-3028

03 Nov at 17:09:44 GMT

3024 Output of fn:type-of for labeled records

Issue #2974 closed #closed-2974

03 Nov at 17:06:27 GMT

Subtyping of nominative recursive types, wording

Issue #3030 closed #closed-3030

03 Nov at 17:06:25 GMT

2974 Clarify subtyping of labeled record types

Issue #3032 closed #closed-3032

03 Nov at 17:03:30 GMT

Evaluation of function parameter defaults

Issue #3033 closed #closed-3033

03 Nov at 17:03:28 GMT

3032 Repeatability of default value expressions

Issue #2588 closed #closed-2588

03 Nov at 17:01:48 GMT

Reintroduce xsl:record

Issue #2737 closed #closed-2737

03 Nov at 17:01:43 GMT

context (or tunnel) parameters

Issue #2835 closed #closed-2835

03 Nov at 17:01:38 GMT

Special characters in item-separator

Issue #2922 closed #closed-2922

03 Nov at 17:01:35 GMT

Representation of sequence of items as a sequence of JNodes

Issue #2927 closed #closed-2927

03 Nov at 17:01:28 GMT

JNode subtypes and naming

Issue #3038 created #created-3038

03 Nov at 11:23:41 GMT
Align record-declaration constraints with the definition of err:XPST0003

The specification of err:XPST0003 says:

err:XPST0003

It is a static error if an expression is not a valid instance of the grammar defined in A.1 EBNF.

But recent changes to record declarations call for issuing err:XPST0003 in cases conforming to the grammar:

  • for labeled records with constructor functions (§5.20.2):

    The names of the fields must be simple NCNames in no namespace; the names must not be written as string literals [err:XPST0003]. Note: This is described here as a semantic constraint, but an implementation might choose to impose it at the level of the grammar.

  • for fields declared as %static (recordTypeDecl-137):
    <test-case name="recordTypeDecl-137" covers-40="PR2979">
       <description>Static field must have an initial value</description>
       <created by="Michael Kay" on="2026-10-29"/>
       <test><![CDATA[
          declare record local:rectangle(x, y, %static area);
          local:rectangle(4, 5) =?> area()
       ]]></test>
       <result>
          <error code="XPST0003"/>
       </result>
    </test-case>
    

The grammar fragment that covers both cases is this:

ExtendedFieldDeclaration ::= "%static"? FieldDeclaration (":=" ExprSingle)?
FieldDeclaration         ::= FieldName ("as" SequenceType)?
FieldName                ::= NCName | StringLiteral 

It currently unconditionally allows both StringLiteral as FieldName, and uninitialized static fields.

To keep the record declaration rules aligned with the definition of err:XPST0003, my proposal is:

  • to define a dedicated static error code for the case where a record declaration that generates a constructor function contains a field name written as a string literal. The accompanying note should be removed or revised accordingly.
  • to make the initializing expression mandatory for %static fields in the grammar:
    ExtendedFieldDeclaration ::= FieldDeclaration (":=" ExprSingle)?
                               | "%static" FieldDeclaration ":=" ExprSingle
    
    This preserves optional initialization for non-static fields and makes a missing initializer on a static field a grammar violation.

Pull request #3037 created #created-3037

02 Nov at 14:00:05 GMT
2567 Allow one named record type to extend another

Another attempt to get (labeled) records extensible:

  • It is close to what has originally been proposed in #2567.
  • I am optimistic that a processor can often find out whether a record shall be internally treated as extensible, which is why I haven’t added any %extensible or %final annotations.
  • However, I believe we will make our life much easier by going without restricts.

Closes #2567

QT4 CG meeting 187 draft agenda #agenda-11-03

02 Nov at 11:45:00 GMT

Draft agenda published.

Pull request #3036 created #created-3036

02 Nov at 11:04:23 GMT
3035 Clarify rules for nesting of groups in fn:analyze-string

Fix #3035

Issue #3035 created #created-3035

02 Nov at 09:58:03 GMT
Regex formalism does not account for group nesting

The formalism for evaluating regular expressions gives the impression (and has the intent) that the results of all regex functions can be obtained from knowledge of matching segments: in effect, that the output of matches(), tokenize(), replace() etc can all be derived from the result of fn:matching-segments. However, this is not the case. Consider the two expressions

matching-segments("a", "(a(b?))")
matching-segments("a", "(a)(b?)")

These produce the same result, namely

{"substring":"a", "position":1, "groups":
             {1:{"value":"a","position":1,"nr":1,"name":()},
              2:{"value":"","position":2,"nr":2,"name":()}
             }
}

However the expected result of fn:analyze-string in the two cases is different: in the first case, group 2 is a child of group 1, in the second case, it is a sibling,

Issue #3034 created #created-3034

01 Nov at 17:45:34 GMT
Constructor functions for records

I believe that there are many cases where a labeled record type is useful, but it is inappropriate to provide the default constructor function for the record type.

This is exemplified by the built-in labeled record types. Most of these are defined as the return type of a function, and the appropriate way to create an instance of the record type is by calling that function.

Consider also the worked example set:atomic-set. The library module defining this type defines a custom constructor function, called for example as set:of(("a", "b", "c")). The default constructor function, by contrast, takes as its input a map; this exposes internal implementation details, and although we can't prevent direct access to the internal structure, we really don't want to encourage people to use it. We could use the proposed integrity constraint mechanism to ensure that the supplied map has the correct form, but this might impose significant performance overheads.

Because an implicit constructor function is created with the name of the record type, it's impossible to create a user-defined function with that name that performs a more nuanced construction, for example with extra validation and creation of internal data fields.

So I think we should certainly provide the opportunity to disable implicit creation of a constructor function, and I would go further and say, from my experience, that this should be the default.

We also create constructor functions for a simple record type declared in a "declare type" declaration. In this case the constructor function offers very little convenience over direct use of the map constructor, and in my view it is likely to be confused with the different semantics of a constructor function for labeled record types. I therefore propose that constructor functions should not be available for simple record types.

See 6303 more statuses in yearly archives.