diff --git a/CHANGELOG.md b/CHANGELOG.md index 89b8832..b920117 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- XSLT `xsl:output cdata-section-elements` (#82). The text content of the named result elements is emitted in `` sections instead of escaped, leaving nested elements and other elements unaffected. - XSLT `xsl:output` `doctype-public`/`doctype-system` (#82). When either is set, a `` for the result's root element (PUBLIC when both are given, SYSTEM otherwise) is emitted before the serialized output, for XML and HTML methods. - XSLT `key()` over a node-set second argument (#82). `key(name, node-set)` (including `key('k', .)`) now unions the matches for every node's string value and de-duplicates, rather than using only the first node's string value. - XSLT `method="html"` output (#82). An `xsl:output method="html"` result is now serialized by the HTML rules (void elements like `
` emitted without a self-closing slash, raw-text elements like `"), "") + #expect(out == "") + } + + @Test("An element not named keeps escaped text") + func test_notNamed() throws { + let out = try transform(style("script", "a < b"), "") + #expect(out == "a < b") + } + + @Test("Only the named element's own text is wrapped, not nested elements") + func test_nestedUnaffected() throws { + let out = try transform(style("outer", "xy < z"), "") + #expect(out == "y < z") + } + + @Test("Multiple element names can be listed") + func test_multiple() throws { + let out = try transform(style("a b", "1 & 23 & 4"), "") + #expect(out == "") + } +}