@qt4cg statuses

This page displays recent status updates about the QT4CG project.

The are also captured in an RSS feed.

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

Issue #2007 closed #closed-2007

11 Nov at 17:16:37 GMT

Creating arrays in XSLT

Issue #2120 closed #closed-2120

11 Nov at 17:16:36 GMT

2007 Revised design for xsl:array

Issue #2273 closed #closed-2273

11 Nov at 17:14:16 GMT

2219 A method can be applied to multiple maps

QT4 CG meeting 141 draft minutes #minutes-11-11

11 Nov at 17:13:00 GMT

Draft minutes published.

Issue #2277 closed #closed-2277

11 Nov at 17:12:33 GMT

2195 Editorial Omnibus

Issue #2268 closed #closed-2268

11 Nov at 17:10:34 GMT

Incorrect equivalent expression for fn:for-each-pair()

Issue #2269 closed #closed-2269

11 Nov at 17:10:33 GMT

2268 Correct equivalent expression for for-each-pair

Issue #2267 closed #closed-2267

11 Nov at 17:08:38 GMT

Further changes for functions in no namespace

Issue #2270 closed #closed-2270

11 Nov at 17:08:37 GMT

2267 Fix inconsistency in XQuery unprefixed function declarations

Issue #1953 closed #closed-1953

11 Nov at 17:08:19 GMT

Make generation of constructor function for named record types optional

Issue #2203 closed #closed-2203

11 Nov at 17:08:06 GMT

Drop XSLT Streaming?

Issue #2265 closed #closed-2265

11 Nov at 17:07:53 GMT

XDM 4.0: a question about mutability/immutability of sequence types

Issue #2253 closed #closed-2253

11 Nov at 17:06:38 GMT

Computed constructors: expanded QNames

Issue #2272 closed #closed-2272

11 Nov at 17:06:37 GMT

2253 Add examples for Q{uri}prefix:local

Issue #2279 created #created-2279

10 Nov at 20:48:13 GMT
`fn:string-join#1`: accept `xs:anyAtomicType`

123 ! string-length() is interpreted as 123 ! string-length(string(.)), while string-length(123) raises an error. This is confusing.

Maybe we should allow fn:string-length#1 to accept input of type xs:anyAtomicType; this would also make it symmetric to fn:string-join.

QT4 CG meeting 141 draft agenda #agenda-11-11

10 Nov at 13:00:00 GMT

Draft agenda published.

Issue #2278 created #created-2278

05 Nov at 12:52:30 GMT
bin:decode-string() revisited

I don't think we've got this right. The combination of decoding a slice of a string starting at a given offset, and then detecting a BOM depending on the offset (and presumably adjusting the offset based on the presence of a BOM) is just too confusing.

I propose:

  • The decode-string function accepts an encoding argument with a simple unconditional default of UTF-8.
  • If the user wants to ignore a BOM they should adjust the start offset accordingly.
  • A new function infer-encoding($input as binary) that returns a record containing (a) the inferred encoding, and (b) the start offset of "real" data after any BOM.

Pull request #2277 created #created-2277

05 Nov at 11:59:31 GMT
2195 Editorial Omnibus

Fixes issues that are tick-marked in issue #2195

Issue #2276 created #created-2276

05 Nov at 10:18:39 GMT
XSLT extensibility rules are unnecessarily strict

The rules for vendor extensions in XSLT are unnecessarily strict. For example:

The presence of an extension attribute must not cause the [principal result] or any [secondary result] of the transformation to be different from the results that a conformant XSLT 4.0 processor might produce. They must not cause the processor to fail to raise an error that a conformant processor is required to raise.

This greatly reduces the usefulness of vendor extensions (for example, some of Saxon's serialization extensions, such as @saxon:canonical=yes, are non-conformant) without actually offering any useful increase in interoperability.

I think that in practice implementors have not felt bound by such rules. In practice there is wriggle room anyway: for example if you provide a switch to disable all extensions, then you can say that with that switch set, your processor is a conformant processor.

We should align the extensibility rules across all the specs.

Issue #2275 created #created-2275

03 Nov at 18:28:14 GMT
Change record constructor, to simplify updates

Copied from https://github.com/qt4cg/qtspecs/issues/1953#issuecomment-2830012997 and updated:

The value of the current record constructor is pretty limited when it comes to updating existing records – and it is fairly ugly to use repeated map:put calls. With extensible records, it is already possible to pass an existing record to the constructor as last argument…

declare namespace geo = 'geo';
declare record geo:coord(x, y, *);

let $coord := geo:coord(0, 0, { 'z': 7 })
return geo:coord(3, 5, $coord)

This gives us:

{ "x": 3, "y": 5, "z": 7 }

However, the use cases for this variant are limited, and all mandatory arguments need to be supplied, even if they don’t change.

I propose to change the constructor, and define the first argument as a container for an existing record. This way, the same result as above could be achieved with the following code:

let $coord := geo:coord({ 'z': 7 }, 3, 0)
return geo:coord($coord, y := 5)

If all mandatory record arguments are supplied via keywords in the constructor call, the first argument can also be omitted:

geo:coord(x := 3, y := 5)

The generated constructor function could be something like:

declare function geo:coord(
  $record as map(*)? := {},
  $x := (),
  $y := ()
) as geo:coord {
  map:merge((
    { 'x': $x otherwise $record?x },
    { 'y': $y otherwise $record?y },
    $record
  ), { 'duplicates': 'use-first' })
};

Challenges might be intricacies like the explicit assignment of empty sequences, but I think that the advantages would prevail. The syntax could also be used more easily for chaining:

geo:coord({ 'z': 7 }, 0, 0)
=> geo:coord(x := 3)
=> geo:coord(y := 5)

Pull request #2274 created #created-2274

30 Oct at 16:25:00 GMT
407 Function items capturing XSLT context components

Fix #407

Pull request #2273 created #created-2273

30 Oct at 15:31:39 GMT
2219 A method can be applied to multiple maps

The PR clarifies with examples that

(a) a dynamic function call can include several functions: (upper-case#1, lower-case#1)("London") (b) an arrow expression can include several functions: "London" => (upper-case#1, lower-case#1) (c) a method call can apply to multiple maps: for $size in 1 to 3 return $rectangle =?> resize($size) =?> area()

None of this actually represents a change to the spec, just a clarification that it is already allowed.

I'm not in favour of the change proposed in issue #2219 allowing the RHS of =?> to select zero or more functions. If we wanted to allow that, we probably wouldn't want to restrict the RHS to be an NCName. Using an NCName gives better potential for optimization and for static error detection, and I think it makes sense to require it (as now) to select a single function from each input map.

Fix #2219

Pull request #2272 created #created-2272

30 Oct at 14:39:23 GMT
2253 Add examples for Q{uri}prefix:local

Fix #2253

Issue #2190 closed #closed-2190

30 Oct at 14:04:26 GMT

parse-csv() from binary: what encoding?

Issue #2260 closed #closed-2260

29 Oct at 17:30:38 GMT

Headings in Data Model appendix G

Issue #2271 closed #closed-2271

29 Oct at 17:30:37 GMT

2260 correct XDM Appendix G headings

Pull request #2271 created #created-2271

29 Oct at 16:55:48 GMT
2260 correct XDM Appendix G headings

Fix #2260

Pull request #2270 created #created-2270

29 Oct at 16:26:36 GMT
2267 Fix inconsistency in XQuery unprefixed function declarations

Fix #2267

Pull request #2269 created #created-2269

29 Oct at 16:04:02 GMT
2268 Correct equivalent expression for for-each-pair

Fix #2268

Issue #2268 created #created-2268

29 Oct at 15:20:25 GMT
Incorrect equivalent expression for fn:for-each-pair()

The equivalent expression for fn:for-each-pair() is given as:

for $pos in 1 to min(count($input1), count($input2))
return $action($input1[$pos], $input2[$pos], $pos)

but fn:min() takes a sequence as first argument and collation as optional second. Thus the equivalent should be

for $pos in 1 to min((count($input1), count($input2)))
return $action($input1[$pos], $input2[$pos], $pos)

See 4672 more statuses in yearly archives.