Skip to content

Releases

v0.4.3

Choose a tag to compare

@github-actions github-actions released this 14 Nov 16:22
9bf0ad2

go-xslt 0.4.3 is a performance release: six more measured rounds on the engine, in two parallel tracks, judged on the whole engine with the same rule as 0.4.2 — no workload may get slower, allocate more, use more memory or execute more instructions, and every output stays byte-identical. Every W3C conformance number is the same as in 0.4.2.

Engine

  • Streaming reads with the engine's own tokenizer. The streaming reader used encoding/xml, which allocated for every token; it now runs the parser's own tokenizer over a 64 KB window of the input, with every token delivered whole and the memory bound unchanged (0.3 MB peak heap for an 82 MB document). Streaming the 200,000-record document: 59 % fewer instructions, 76 % fewer allocations, 49 % less CPU time.
  • JSON is tokenized in place when the text is valid (an invalid text still gets json.Decoder's error): the JSON round trip executes 41 % fewer instructions and makes 46 % fewer allocations.
  • Compiling a stylesheet parses each secondary module once, not twice, and copies lists only where it changes them: compiling DocBook's docbook.xsl executes 32 % fewer instructions and allocates 38 % less.
  • XSD 1.1 validation: the assertion tree of every element comes from one arena the validation call keeps, identity constraints reuse one evaluation context and build key tuples in one buffer, assertion operands are atomized without one-item sequences, and the typed-value casts reuse cached small integers and build plain decimals from an int64 mantissa. Validating the 200,000-order document: 25 % fewer instructions, 62 % fewer allocations, 68 % less allocated, 44 % less CPU time.
  • xsl:number passes its node tests by pointer and decides once per evaluation what its count pattern needs: numbering with position()/last() executes 31 % fewer instructions.
  • Function calls and variables: a template or function frame keeps its bindings in a short slice instead of a map, the callee's scope stack reuses the caller's spare capacity, the matching context for a declared type is remembered per run, a path's node set travels unboxed into predicates, comparisons, built-in arguments, selects and tests, the arguments of the string and number built-ins live on a per-run stack, and concat/string-join build their result in one allocation. The function-call workload: 31 % fewer instructions, 52 % fewer allocations; deep recursion: 19 % fewer instructions.
  • Parser and serializer: an unprefixed name is resolved from a default-namespace stack, one frame per open element, positions looked up only where needed; the serializer decides the HTML version and XML 1.1 once and mirrors the default namespace beside its prefix map. Copying the 37 MB document: 15 % fewer instructions; HTML output: 22 % fewer instructions, 34 % fewer allocations.
  • Maps and iteration: a map key keeps its category beside its string instead of a prefixed copy, xsl:next-iteration hands its values on in a slice and compares errors without a panic per iteration, for loops and the simple map operator reuse one evaluation context per loop. Iterating over maps: 20 % fewer instructions, 25 % fewer allocations.
  • Measured on the whole 23-workload set against 0.4.2 (go run ./scripts/perfab -a v0.4.2 -b v0.4.3, 8 alternating runs, then -ir): every workload executes fewer instructions (between 8 % and 59 % fewer) and takes less CPU time (between 6 % and 49 % less); peak memory and allocated bytes are at or below 0.4.2 on every workload; every output is byte-identical. The candidates that were tried and rejected are documented on the performance page.

Build

  • The binaries are built with Go 1.26.11, which fixes GO-2026-6859 (an HTTP/1 server crash in net/http). The library itself still needs only Go 1.25.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.4.3-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.4.3-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.4.3-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.4.3
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.4.3

Licensed under the Apache License 2.0 (LICENSE). Third-party licenses: THIRD-PARTY-LICENSES.md (NOTICE summarises them); both are attached.

What's Changed

  • Performance round 10B: XSD 1.1 assertions and identity constraints allocate far less by @tim-riep in #36
  • Performance round 10A: serializer, evaluator and XPath context allocations by @tim-riep in #37
  • Performance round 11A: JSON scanning, xsl:number, function calls, decimals, map keys by @tim-riep in #38
  • Performance round 11B: streaming on the engine's own tokenizer, single-parse compiler, parser and serializer by @tim-riep in #39
  • Performance round 12B: parser and stream-reader frames, XSD lookups, compiler xml:space by @tim-riep in #40
  • Performance round 12A: unboxed path node sets, per-run argument stack, one-item argument helpers by @tim-riep in #41
  • Release notes for v0.4.3 by @tim-riep in #42

Full Changelog: v0.4.2...v0.4.3

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 05 Nov 22:06
650fed8

go-xslt 0.4.2 is a performance release: three more measured rounds on the engine, judged on the whole engine, with every W3C conformance number the same as in 0.4.1.

Engine

  • A committed A/B harness decides every performance change. go run ./scripts/perfab -a <rev> -b <rev> measures two builds on 23 workloads (XSLT 1.0 and 3.0 transforms, XSD 1.0/1.1 validation, keys, regex, strings, numbers, xsl:number, deep recursion, HTML and JSON output, streaming, compile-only, many small runs), alternating, and accepts a change only when no workload gets slower, allocates more, uses more memory or executes more instructions (-ir counts instructions under cachegrind, deterministic on a noisy machine); outputs must stay byte-identical.
  • xsl:number builds one match context per evaluation instead of one per candidate node: numbering a 2,000-record document with level="single" and level="multiple" took 4.2 s of CPU and 3.5 GB of allocations, now 0.4 s and 8 MB.
  • array(T) parameters checked on every xsl:iterate step remember the members already verified, so an accumulating array is no longer re-checked in full each step: 8.2 s → 0.2 s on 20,000 records.
  • XSD 1.1 validation allocates 20 % less: the per-element assertion tree comes from two slabs with one annotation table, and identity constraints no longer build a content-model map per selected node.
  • Fewer allocations across the engine: the streaming reader builds an element and its attributes in one allocation (8 % fewer allocations when streaming); string-join, normalize-space, case mapping, the regex functions (the zero-length-match check once per pattern), format-date/format-time/format-dateTime, the serializer's indentation and json-to-xml allocate less (6 % fewer allocations on string-heavy and JSON workloads, 7 % on a transform made of function calls); a single typed value is type-checked without boxing it; the static base URI is computed only when a function needs it instead of before every expression; node sets pass through subsequence, type checks, one-item output and current-group() without boxing (a 5,000-deep recursive template needs 30 % less memory; many small transforms allocate 9 % less).
  • Measured on the whole 23-workload set against 0.4.1, no workload executes more instructions; peak memory and allocated bytes are at or below 0.4.1 on every workload.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.4.2-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.4.2-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.4.2-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.4.2
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.4.2

Licensed under the Apache License 2.0 (LICENSE). Third-party licenses: THIRD-PARTY-LICENSES.md (NOTICE summarises them); both are attached.

What's Changed

  • Performance round 7: global A/B harness, xsl:number contexts, array(T) memo, unboxed type tests by @tim-riep in #31
  • Performance round 8: XSD assertions and identity constraints, streaming reader, string/regex/format functions, serializer, json-to-xml by @tim-riep in #32
  • Performance round 9: static base URI on demand, node sets without boxing by @tim-riep in #33
  • README and v0.4.1 notes: 28 languages, A/B harness, third-party licenses, performance rounds 7–9 by @tim-riep in #34
  • Release notes for v0.4.2 (performance rounds 7–9); v0.4.1 notes back to the tagged text by @tim-riep in #35

Full Changelog: v0.4.1...v0.4.2

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 03 Nov 22:08
46e736f

go-xslt 0.4.1 makes XSLT 3.0 maps, arrays, grouping and typed function calls much faster, gives the source document its own URI, reports misplaced XSD schema children with a position, judges XML names by the XML 1.0 5th edition everywhere, speaks 28 languages in the desktop tester, and documents every third-party license from one generated source. Every W3C conformance number is the same as in 0.4.0.

Engine

  • XSLT 3.0 paths that were quadratic are now linear. map:put shares structure with the map it builds on (a persistent hash trie), so accumulating a map one entry at a time in xsl:iterate or fold-left no longer copies the whole map: 5,000 keys over 20,000 records took 53 s and now take 0.4 s. array:append appends in place to a shared backing array (35 s → 2 s for one entry per record over a 37 MB document). xsl:for-each-group group-by files its groups by key instead of comparing every item with every group (5× faster with 5,000 groups). Insertion order, key replacement and all results are unchanged.
  • Typed parameters and built-in calls allocate less. A declared as type is parsed once and shared; a value that already matches a built-in atomic type is bound without building an evaluation context; built-in functions atomize their arguments without an intermediate item list; round() at precision 0 no longer goes through big rationals (bit-identical results, tested on 200,000 random doubles). A transform made of function calls runs 12 % faster with 24 % fewer allocations.
  • The source document has its own URI. Request.SourceURI and TransformRequest.SourceURI (a path or a URI) become the source document's document-uri() and base-uri(), so relative references taken from the source (document(@href, /), resolve-uri(…, base-uri(/))) resolve beside the source file even when the stylesheet lives elsewhere; BaseDir stays the stylesheet's base. The command line sets it to the source file's absolute path (not for stdin), the desktop tester to the run's source file. Without a source URI, document-uri(/) is now the empty sequence instead of a directory, while base-uri() keeps BaseDir as before. (#20)
  • XML names follow the XML 1.0 5th edition everywhere. The parser, xsl:element/xsl:attribute/xsl:namespace/xsl:processing-instruction and castable as xs:NCName now agree: an emoji, a Bengali digit or any other 5th-edition name character is accepted as a name, and <😀/> parses. The tokenizer itself is unchanged; a document that parsed before costs nothing extra. (#23)

XSD validation

  • A misplaced child of a complex type is a schema error with a position. An xs:assert, xs:openContent, attribute or model group placed beside xs:simpleContent/xs:complexContent used to be accepted and silently ignored, so every instance passed the assertion; it is now rejected as s4s-elt-invalid-content.1 with the schema line and column, as is a simpleContent/complexContent with zero or two derivations. Schema-for-schemas errors in general now name the line and column of the offending element. (#22)

Desktop tester

  • 28 interface languages. Besides English, German, French and Italian, the tester now speaks Spanish, Portuguese, Dutch, Polish, Czech, Swedish, Danish, Norwegian, Finnish, Russian, Ukrainian, Turkish, Greek, Romanian, Hungarian, Japanese, Chinese (Simplified and Traditional), Korean, Arabic, Hebrew, Hindi, Indonesian and Vietnamese. "System" follows your computer's language, including regional and script variants (zh-TW lands on Traditional Chinese, nn on Bokmål). Only the language in use is loaded. Arabic and Hebrew lay the interface out right to left; the code editors and the output stay left to right.

Licensing

  • Every third-party license has one source. The dependency manifests (the Go modules compiled into each binary, the frontend's production packages) plus one small hand-kept file generate the app's Licenses view, NOTICE and a new THIRD-PARTY-LICENSES.md; CI fails when a shipped dependency is undocumented or the generated files are stale. This added the missing notices for @codemirror/lang-json, @lezer/json, the Unicode Character Database behind the regex block tables, the Go standard library and the math.Exp copy, and fixes the Linux package metadata, which said MIT instead of Apache-2.0. Releases now carry LICENSE, NOTICE and THIRD-PARTY-LICENSES.md next to the binaries.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.4.1-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.4.1-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.4.1-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.4.1
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.4.1

Licensed under the Apache License 2.0 (LICENSE). Third-party licenses: THIRD-PARTY-LICENSES.md (NOTICE summarises them); both are attached.

What's Changed

  • Performance round 6: group-by index, persistent maps, in-place array:append, cheaper typed bindings by @tim-riep in #19
  • Give the source document its own URI (SourceURI on the request, CLI and desktop) by @tim-riep in #24
  • XSD: reject misplaced children of complexType/simpleContent/complexContent, with line and column by @tim-riep in #25
  • XML names: one 5th-edition Name definition for parser, xsl:element and xs:NCName by @tim-riep in #26
  • Release notes for v0.4.1 by @tim-riep in #27
  • Desktop: 28 UI languages, one loaded at a time, RTL layout by @tim-riep in #28
  • Third-party licenses: one generated source, CI check for undocumented dependencies by @tim-riep in #29
  • Release notes for v0.4.1: desktop languages and licensing by @tim-riep in #30

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 21:11
332a3bb

go-xslt 0.4.0 adds JSON formatting to the desktop tester. Every W3C conformance number is the same as in 0.3.9.

Desktop tester

  • JSON output is pretty-printed — the output pane's Format toggle, which already re-indented XML and HTML, now also formats the output of a stylesheet with <xsl:output method="json"/> (two-space indentation; output that is not valid JSON is shown as it is). JSON output is highlighted as JSON, and .json files in a project open with JSON highlighting.

Build

  • The release builds and CI install the Go version named by go.mod's toolchain line, so the build tooling (the Wails CLI, govulncheck) is compiled with the same Go as the application. This removes a "file requires newer Go version" warning from the release builds; the binaries themselves were already built with that version.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.4.0-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.4.0-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.4.0-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.4.0
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.4.0

What's Changed

  • CI: install the Go version of go.mod's toolchain line by @tim-riep in #16
  • Desktop: pretty-print and highlight JSON output in the transform pane by @tim-riep in #17
  • Release notes v0.4.0 by @tim-riep in #18

Full Changelog: v0.3.9...v0.4.0

v0.3.9

Choose a tag to compare

@github-actions github-actions released this 27 Oct 07:53
35b241f

go-xslt 0.3.9 closes the two remaining issues reported by Philip Helger: a crash in the XSD compiler and the general argument check for built-in functions. Every W3C conformance number is the same as in 0.3.8.

Fixed

  • Stack overflow on a union type that reaches itself — an XSD 1.0 schema whose union lists itself as a member type (directly, through other unions, or through an inline type naming the enclosing one) ended the process with a fatal stack overflow. The compiler now keeps every simple type free of cycles: a cycle through a restriction base or list item type is a circular derivation, XSD 1.1 rejects a union cycle, and XSD 1.0 collapses it to the member types that do not lead back (#12).
  • Argument types of every built-in function — 0.3.8 fixed four reported cases; now the arguments of all 197 fn:, math:, map: and array: functions and the XSLT functions (key, document, current-group, …) are checked against their declared signatures by the XPath 3.1 function conversion rules before the function runs. A wrong type or number of items is a type error (XPTY0004), for a direct call, a named function reference, function-lookup, a partial application and a dynamic call alike. Expressions that were accepted before, such as upper-case(1) or contains(//title, 'x') over several nodes, now raise XPTY0004 as the specification requires; XSLT 1.0 compatibility mode keeps its lenient conversions (#9).
  • format-integer no longer panics on NaN in XSLT 1.0 compatibility mode.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.3.9-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.3.9-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.3.9-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.3.9
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.3.9

What's Changed

  • Fix stack overflow on a simple type that reaches itself (XSD 1.0 union cycles) by @tim-riep in #13
  • Check every built-in function's arguments against its declared signature by @tim-riep in #14
  • Release notes v0.3.9 by @tim-riep in #15

Full Changelog: v0.3.8...v0.3.9

v0.3.8

Choose a tag to compare

@github-actions github-actions released this 26 Oct 08:44

go-xslt 0.3.8 fixes four issues reported by Philip Helger. Every W3C conformance number is the same as in 0.3.7.

Fixed

  • package-version ranges with a prefix as upper bound — xsl:use-package package-version="to 3.3.*" or "1 to 5.*" was rejected with XTSE0020. Both forms are valid and now match every version up to the prefix and every version that starts with it (#8).
  • Booleans in arithmetic — 1 + true() gave 2; a boolean is no arithmetic operand, so it is now a type error (XPTY0004), outside XSLT 1.0 compatibility mode (#10).
  • attribute(N, T?) was accepted; the ? belongs to element() tests only, so it is now a syntax error (#11).
  • Argument types — contains-token, math:atan2 and fn:error now reject an empty sequence where a value is required, and fn:error no longer takes a string as its error code (#9, the reported cases; a general check for all built-in functions follows).

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.3.8-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.3.8-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.3.8-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.3.8
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.3.8

Full Changelog: v0.3.7...v0.3.8

v0.3.7

Choose a tag to compare

@github-actions github-actions released this 25 Oct 13:10

go-xslt 0.3.7 is faster than libxslt and libxml2 on every workload both can run — XSD validation included — and fixes the handling of attribute defaults declared in a DTD. Every W3C conformance number is the same as in 0.3.6.

Faster

Workload (37 MB input) ratio to libxslt / libxml2 in 0.3.6 in 0.3.7
copy the document 0.81× 0.62×
recursive apply-templates 0.85× 0.68×
Muenchian grouping 0.78× 0.59×
XPath predicates and functions 0.72× 0.53×
XSD 1.0 validation 1.13× 0.81×
  • Whitespace in attribute values is normalized only where a value actually contains a tab or line break, instead of in a separate pass over the whole document.
  • The parser writes nodes straight into preallocated blocks and numbers document order as it goes.
  • xsl:copy builds from per-run blocks; several XPath functions and generate-id() no longer build intermediate lists.
  • XSD validation allocates almost nothing per element (from 2.7 million allocations to about 20,000 for a 37 MB document).

Fixed

  • Attributes with a default value declared in the DTD (<!ATTLIST e a CDATA "x">) were added in a random order, so the same document could serialize differently from one run to the next. They are now added in declaration order.
  • When an attribute is declared more than once, the first declaration now counts, as XML 1.0 §3.3 requires; before, the last one did.

Details and how to reproduce the numbers: performance.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.3.7-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.3.7-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.3.7-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.3.7
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.3.7

Full Changelog: v0.3.6...v0.3.7

v0.3.6

Choose a tag to compare

@github-actions github-actions released this 24 Oct 23:27

go-xslt 0.3.6 is faster: transformations now run quicker than with libxslt across the board, and XSD validation is within 1.13× of libxml2. Results are unchanged; every W3C conformance number is the same as in 0.3.5.

Faster

Workload (37 MB input) ratio to libxslt / libxml2 in 0.3.5 in 0.3.6
copy the document 0.90× 0.81×
recursive apply-templates 1.11× 0.85×
Muenchian grouping 0.96× 0.78×
XPath predicates and functions 0.71× 0.72×
XSD 1.0 validation 1.34× 1.13×
  • Simple match patterns such as node(), @* or a plain element name, and apply-templates select="@*|node()", are matched without building a full evaluation context.
  • xsl:sort uses a faster sort where the result is provably the same; key() indexes are prepared once.
  • Copies of subtrees allocate their nodes in small blocks.
  • XSD validation checks integers, decimals and names with hand-written scanners instead of regular expressions.

The benchmark's sort comparison is no longer published: on macOS it measured a text-output problem in the old libxslt version Apple ships, not sorting. Details on the performance page.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.3.6-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.3.6-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.3.6-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.3.6
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.3.6

Full Changelog: v0.3.5...v0.3.6

v0.3.5

Choose a tag to compare

@github-actions github-actions released this 24 Oct 22:18

go-xslt 0.3.5 is a security and correctness release. Update if you use the library on input you do not control, or run the desktop app or the command-line tool.

Security

  • golang.org/x/text updated to v0.39.0 (GHSA-x6hj-m328-hffh, GO-2026-5970): an infinite loop on invalid input. go-xslt reaches the affected code through normalize-unicode(), collations and HTML serialization, so a crafted string in an expression or a document could make a call hang. This affects every program that imports the library; updating to v0.3.5 brings the fixed version.
  • The binaries are built with Go 1.26.10. The desktop apps and the command-line tool of earlier releases were built with Go 1.25.0, which lacks a year of security fixes to the standard library (net/http, crypto/tls, crypto/x509, net/url, encoding/xml). Go 1.26.10 also distrusts the compromised intermediate certificates of an Indian certificate authority (GO-2026-6809), which matters for the library's optional network access and the app's update check. The library itself still needs only Go 1.25.
  • CI now runs govulncheck on every change.

Fixed

49 cases where valid input gave a result the W3C specifications rule out, found by new unit tests written against the specifications. Among them:

  • XPath: Q{uri}* respects the namespace; xs:duration('P1M') eq xs:duration('PT2629746S') is false; the default priorities of . and except/intersect patterns; regular expressions with back-references under the s flag and with character-class subtraction.
  • Functions: parse-json('1E400') is INF; JSON output escapes U+007F–U+009F; adaptive serialization of decimals and typed values; arrays are flattened for the xml and text methods; replace with the q flag; format-date with [F], widths and padding; deep-equal ignores comments and processing instructions; unparsed-text-lines; current-dateTime() is an xs:dateTimeStamp.
  • XSLT: xsl:number on attributes and processing instructions; default-mode as the initial mode; namespaces when copying (xsl:copy of namespace nodes, copy-namespaces, inherit-namespaces, prefixes for namespaced attributes); xsl:where-populated; xsl:message/@error-code; $err:description; hidden and private components in packages; use-when on the root element; xsl:merge keys compared by type and collation.
  • XSD and XML: two valid schemas were rejected; NaN and dateTimes without timezone against bounds; list enumerations compared by value; type alternatives no longer see the element's children; a schema that made the compiler fail internally. Documents with recursive entities or without a root element are now rejected as not well-formed.

All W3C conformance numbers are unchanged.

Also

Unit-test coverage, measured without the W3C suites, is 88% (was 57%).

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.3.5-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.3.5-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.3.5-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.3.5
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.3.5

Full Changelog: v0.3.4...v0.3.5

v0.3.4

Choose a tag to compare

@github-actions github-actions released this 24 Oct 17:23

go-xslt 0.3.4 is faster again: copying a document, XPath and sorting are now quicker than with libxslt, grouping is on par, and template rules and validation are at most 1.3 times slower. Results are unchanged; every W3C conformance number is the same as in 0.3.3.

Faster

Workload (37 MB input) go-xslt 0.3.4 ratio to libxslt / libxml2
copy the document 0.80 s 0.90×
recursive apply-templates 2.00 s 1.11×
sort by two keys 1.09 s 0.05×
Muenchian grouping 0.91 s 0.96×
XPath predicates and functions 0.65 s 0.71×
XSD 1.0 validation 0.73 s 1.34×
  • Documents without a DOCTYPE skip all DTD processing.
  • Calling a template rule allocates less: no variable scope until a variable is bound, no candidate list for a single matching rule.
  • Path expressions keep their starting node directly, and @*|node() has a fast path.
  • Serialization writes tags without building intermediate strings.

Details and how to reproduce the numbers: performance.

Downloads

macOS (Apple Silicon, Intel) go-xslt-v0.3.4-darwin-arm64.app.zip, …-darwin-amd64.app.zip — signed and notarized
Windows (x64, ARM64) go-xslt-v0.3.4-windows-amd64.exe, …-windows-arm64.exe — signed
Linux (x64) go-xslt-v0.3.4-linux-amd64
Library go get github.com/tim-riep/go-xslt@v0.3.4
Command line go install github.com/tim-riep/go-xslt/cmd/go-xslt@v0.3.4

Full Changelog: v0.3.3...v0.3.4