XSLT processing¶
pyxsd.xslt is a Python-native XSLT processor with schema-aware XSLT 2.0 and
3.0 profiles. XSD 1.1 types, xsl:import-schema, typed XPath expressions, and
source/target validation use the same schema model as pyxsd’s Python bindings.
Validation, transformation, and typed object construction stay in one workflow.
This brings a capability often associated with Saxon into a pure-Python XML
stack.
The processor compiles ordinary, simplified, and package stylesheets and runs them under three explicit processor identities:
XSLT 3.0 with XPath 3.1, the default
XsltProcessor();native XSLT 2.0 with XPath 2.0,
XsltProcessor(language="2.0", xpath="2.0");native XSLT 1.0 with XPath 1.0,
XsltProcessor(language="1.0", xpath="1.0").
Python callers use API reference for signatures, Command-line reference for the dedicated command, and MCP integration for clean-worker previews. XML security and untrusted input covers parser, resource, and output boundaries. The measured capability matrix after the usage sections identifies the selected catalog cases behind each profile; Supported features places those results beside the XSD, RELAX NG, and Schematron capability pages.
Python: compile once, transform many¶
XsltProcessor is immutable. compile() completes the stylesheet or package
closure and every executable expression before it returns a
CompiledStylesheet. A static failure raises
XsltStaticError; no partial
artifact is returned. The processor can compile once and run many independent
transformations from the same compiled sheet.
from io import BytesIO
from pyxsd.xslt import XsltProcessor
STYLESHEET = b"""<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:o="urn:orders" exclude-result-prefixes="o">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template match="/">
<summary><xsl:value-of select="count(/o:orders/o:order)"/></summary>
</xsl:template>
</xsl:stylesheet>"""
SOURCE = b'<orders xmlns="urn:orders"><order/><order/></orders>'
sheet = XsltProcessor().compile(BytesIO(STYLESHEET))
result = sheet.transform(BytesIO(SOURCE), delivery="document")
document = result.to_document(None)
assert document.to_string() == "<summary>2</summary>"
assert result.serialize() == "<summary>2</summary>"
CompiledStylesheet.transform() accepts a path, bytes-like value, readable
stream, XDM document or subtree, or a common Document through its coherent
XDM tree. Omit the source to invoke a named initial template. parameters,
template_parameters, and tunnel_parameters accept XDM values; limits takes
an ExecutionLimits; delivery selects "stylesheet", "document", or
"raw". output_uri supplies the absolute base URI for principal and secondary
result identities, and principal_serialization overrides principal output
attributes for that invocation.
CompiledStylesheet.as_transform(target_schema=..., on_result=...) adapts a
compiled sheet for Document.transform(). It runs document delivery over the
document’s XDM tree and validates the principal result against the supplied
compiled XSD or RELAX NG schema. Pass None for a schemaless result document.
Leave on_result=None if the stylesheet produces no secondary results or
messages. If it produces either, supply on_result to receive the complete
transformation result.
The complete signatures and defaults are in API reference.
JSON in stylesheets¶
XSLT 3.0 stylesheets can read JSON into XPath maps and arrays with
parse-json() and json-doc(). json-to-xml() produces the standard XML
representation of JSON in http://www.w3.org/2005/xpath-functions;
xml-to-json() writes that vocabulary back to JSON text. This lets templates
process JSON as XML without imposing an application’s XML schema on it.
This example writes a local JSON resource beside its stylesheet, reads it relative to the stylesheet’s base URI, and returns JSON from a named template:
import json
from pathlib import Path
from pyxsd.xslt import XsltProcessor
Path("values.json").write_text('{"values":[1,true,null]}', encoding="utf-8")
stylesheet = Path("json-workflow.xsl")
stylesheet.write_text(
"""<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="json"/>
<xsl:template name="main">
<xsl:variable name="text" select="'{"values":[1,true,null]}'"/>
<xsl:sequence select="map{
'inline': parse-json($text),
'file': json-doc('values.json'),
'roundtrip': parse-json(xml-to-json(json-to-xml($text)))
}"/>
</xsl:template>
</xsl:stylesheet>""",
encoding="utf-8",
)
sheet = XsltProcessor().compile(stylesheet)
result = sheet.transform(initial_template="main")
data = json.loads(result.serialize())
assert data["file"] == {"values": [1, True, None]}
assert data["inline"] == data["roundtrip"] == data["file"]
json-doc() uses the processor’s resource policy and runtime resource budgets,
not an unrestricted network fetch. Relative URIs need a stylesheet base URI;
the file-based compilation above supplies one. Configure resource authorization
as described under namespaces and resolvers.
parse-json() and json-doc() accept liberal, duplicates, escape, and
fallback options. Duplicate keys default to use-first; use-last and
reject are also available. json-to-xml() accepts the same parsing options,
but defaults to retaining duplicate members and accepts retain, use-first,
or reject, not use-last. Its validate=true() option reports FOJS0004;
it does not construct schema-validated JSON-vocabulary nodes.
escape=true() cannot be combined with fallback. xml-to-json() supports
the boolean indent option; other options are ignored.
The XPath JSON mapping uses xs:double numbers and an empty sequence for JSON
null. For Python-native JSON with int/Decimal numbers, or JSON Schema and
OpenAPI-driven XML mapping, use Schemaless XML and native JSON. For bidirectional JSON
formats derived from an XSD or RELAX NG schema, use Data conversion.
Command line¶
The dedicated pyxsd xslt command has this syntax (INPUT is optional):
pyxsd xslt [options] STYLESHEET [INPUT]
STYLESHEET is required. An omitted source means the source is absent, which
is valid for a stylesheet that invokes an initial template. - reads XML from
stdin; without -, an INPUT path is read as XML. --initial-mode and
--source-schema require INPUT because they need a source document or a source
to validate.
For the file-based examples, use
orders.xml and
summary.xsl.
For schema validation, also download
orders.xsd and
summary.xsd, or
orders.rng and
summary.rng.
For report.xsl invocations, download
report.xsl and
save common.xsl
as shared/common.xsl.
pyxsd xslt summary.xsl orders.xml -o summary.xml
pyxsd xslt summary.xsl - < orders.xml
pyxsd xslt report.xsl orders.xml --initial-template main --param mode=full
pyxsd xslt summary.xsl orders.xml --source-schema orders.xsd \
--target-schema summary.xsd
pyxsd xslt summary.xsl orders.xml --source-schema orders.rng \
--source-schema-format relax-ng --target-schema summary.rng \
--target-schema-format relax-ng
--param and --static-param are repeatable NAME=VALUE options. The value is
the parameter’s string value, not an XPath expression. A name may be a Clark
name ({uri}local), an EQName (Q{uri}local), or a lexical QName whose prefix
the principal stylesheet binds. A duplicate name within one channel, or the
same expanded name across the runtime and static channels, is a usage error.
Compilation, static parameters, and the runtime invocation remain separate: a
static parameter can change conditional compilation, while a runtime parameter
only supplies the compiled global.
Output options are -o PATH for the principal result, --result-dir DIR for
secondary results, --overwrite, and --output-uri URI as an absolute base
URI. Without -o, the principal result is written to stdout. Without
--result-dir, secondary results stay in memory and the command prints their
URIs to stderr. With --result-dir, every secondary URI maps beneath that
directory; the command rejects traversal, symlinks, non-regular files,
collisions, and an existing destination unless --overwrite is set. It
completes serialization and byte-budget checks before publishing any file, so a
serialization failure does not publish a partial principal result.
--method, --encoding, --indent, and --omit-xml-declaration override
principal serialization only. Secondary results keep the output attributes
declared in the stylesheet. --base-uri sets the source document base; it does
not rewrite the stylesheet base.
Resource and execution controls are explicit:
Option |
Effect |
|---|---|
|
Permit bounded HTTPS retrieval for stylesheet resources and runtime document reads. The default is local-only. |
|
Bound the whole command with an interval timer on the main thread. |
|
Bound live execution frames (recursion depth). |
|
Bound scheduler dispatches. It does not interrupt work inside one dispatch. |
|
Bound runtime documents. |
|
Bound principal and secondary result nodes. |
|
Bound encoded bytes across delivery and writes. |
|
Bound runtime input bytes and bytes per stylesheet module. |
|
Bound runtime type annotations. |
Each numeric default is the matching ExecutionLimits default; None in the
library means unlimited, while a CLI option always requires a positive integer.
The output limits are cumulative across nested transforms and writes.
Source and target validation¶
--source-schema validates the exact admitted source tree before the
stylesheet runs. An invalid source prevents execution and exits 1; no
transformation result is produced. The source schema must be supplied explicitly
because --source-schema is also unavailable without INPUT. A schema that fails
to compile exits 3.
--target-schema validates the principal result as an XML document after the
transformation and before any CLI output is published. An invalid target writes
no CLI output, including no principal stdout and no secondary file, and exits
1. A bare atomic value normalizes to a text-only document with no document
element, so target binding fails with result_shape and exits 3. Arrays,
maps, and function items also fail the document-shape check. An atomic value
inside a result element validates normally (0 or 1). Target validation does
not apply to secondary results.
--source-schema-format and --target-schema-format select xsd (default) or
relax-ng for the corresponding schema. The filename extension never selects
the schema language.
Exit statuses¶
Status |
Meaning |
|---|---|
|
The command completed, including help output. Validation issues are not fatal unless a validation option makes them so. |
|
A completed source or target validation verdict is invalid. |
|
Argument or usage error. |
|
Stylesheet compilation, schema compilation, transformation, serialization, resource/policy, or I/O error. |
An unreadable stylesheet, source, or schema is a 3, not a validation verdict.
An invalid source or target is a normal completed verdict and reports the
validation report on stderr.
MCP previews¶
pyxsd_preview_transform accepts an XsltTransformSpec with
"kind": "xslt". The stylesheet runs in a clean worker with the trusted
execution backend set to disabled; clean XSLT execution does not require
--execution-backend trusted-local. Python and pipeline transform recipes
remain trusted-local: without explicit opt-in they return
execution_unavailable and do not fall back to the XSLT path.
Upload orders.xml, the two XSD files, report.xsl, and
shared/common.xsl from the XSLT workflow files. Call
pyxsd_preview_transform with the returned workspace ID. The preview
retains <summary>2</summary> and the text full as separate artifacts.
The static parameter enables conditional compilation of an xsl:message,
so xslt.messages contains {"text": "Debug output", "terminate": false}.
{
"workspace_id": "<workspace ID>",
"document": {"path": "orders.xml"},
"source_schema": {"source": {"path": "orders.xsd"}},
"target_schema": {"source": {"path": "summary.xsd"}},
"transform": {
"kind": "xslt",
"stylesheet": {"path": "report.xsl"},
"resources": [{"path": "shared/common.xsl"}],
"parameters": {"{urn:example}mode": "full"},
"static_parameters": {"{urn:example}debug": "true"},
"initial_template": null,
"initial_mode": null,
"output_uri": "https://example.test/out/",
"method": "xml",
"encoding": "UTF-8",
"indent": false,
"omit_xml_declaration": true
}
}
For XSLT only, document and source_schema are optional. Omit both to run an
initial-template stylesheet. Python and pipeline recipes require both. There is
no XSLT target=source fallback: when target_schema is omitted, no target
validation runs. This differs from Python and pipeline previews, which default
an omitted target to the source schema. When document is omitted,
source_schema is also invalid because there is no source to validate.
An invalid source is a typed invalid_source fault and the transform does not
run. An invalid target is a successful request with valid=false: the retained
candidate and its target report remain available for inspection. A target
schema request requires a document element. A bare atomic value produces a
text-only document, which fails target binding with xslt_validation_error
and code result_shape. Arrays, maps, and function items also fail the shape
check. An atomic value inside a document element validates normally. A non-XML
serialization method reports well_formed=null. When an input document exists,
the structural diff artifact reports available: false; without an input,
structural_diff is null. Only a malformed XML candidate reports
well_formed=false, and it has no structural comparison either.
The reply retains exact bytes and references:
candidateis anArtifactReffor the principal result bytes;reportis a JSON sidecar with source and target validation reports;diffis a byte diff when an input document exists;structural_diffis the element comparison when both sides are inspectable;xslt.secondarylists each secondary URI with its own artifact and serialization, sorted by URI;xslt.serializationholds the principal serialization;xslt.principal_uri,initial_template,initial_mode, and messages describe the invocation without replacing the artifacts. Transformation warnings are not exposed by the XSLT preview reply.
XsltTransformSpec.resources is the declared closure for xsl:include,
xsl:import, package modules, and runtime document reads. The worker denies any
read that is not a declared capture entry and denies remote resources; there is
no host or network fallback. Declaring an include is therefore part of preparing
the request, not an optimization. pyxsd_capabilities reports
execution_role: "clean", python_extensions: false, and the XSLT 1.0, 2.0,
and 3.0 profiles.
The worker validates the captured source and target and returns native
serialized results with bounded reports and sidecars. Validation report issue
lists can be shortened to fit the reply (suppressed_count and
diagnostics_complete mark that truncation), and structural changes can be
marked truncated. A reply that cannot fit its sidecar budget faults rather
than being silently dropped. The coordinator retains artifacts and performs a
rollback when packaging fails after a successful worker reply: it deletes the
candidate, report, diff, structural diff, and secondary artifacts it created for
that request. It does not revalidate the result. That rollback does not delete
artifacts from earlier requests or any source input.
The audit event records cache=bypass and an audit-facing cache_key computed
from the request, limits, and workspace. No result cache is implemented:
the key identifies the operation for audit and invalidation analysis, not a
reusable result. Repeating a request re-executes it.
Schematron uses separate dedicated tools, pyxsd_schematron_validate and
pyxsd_schematron_validate_documents. It is not a SchemaRef format. See
MCP integration for the request shape, projections, artifacts, and batch independence,
and Native ISO/IEC 19757-3:2025 Schematron support for the processor contract.
Source and target validation¶
The library deliberately keeps transformation and validation separate.
CompiledStylesheet.transform() does not validate its source or principal
result. Validate a source before invoking the stylesheet, or validate the result
afterward with TransformationResult.to_document(schema, uri=...).
For XSD:
from pyxsd import Schema
from pyxsd.xslt import XsltProcessor
source_schema = Schema.compile("orders.xsd")
target_schema = Schema.compile("summary.xsd")
source = source_schema.parse("orders.xml", capture_xdm=True)
source.require_valid()
sheet = XsltProcessor().compile("summary.xsl")
result = sheet.transform(source, delivery="document")
summary = result.to_document(target_schema)
assert summary.is_valid
assert summary.to_string().strip() == "<summary>2</summary>"
For Native RELAX NG support, use the same result API:
from pyxsd.relaxng import RelaxNGSchema
from pyxsd.xslt import XsltProcessor
source_schema = RelaxNGSchema.compile("orders.rng")
target_schema = RelaxNGSchema.compile("summary.rng")
source = source_schema.parse("orders.xml", capture_xdm=True)
source.require_valid()
result = XsltProcessor().compile("summary.xsl").transform(source, delivery="document")
summary = result.to_document(target_schema)
assert summary.is_valid
assert summary.to_string().strip() == "<summary>2</summary>"
A RELAX NG target has no XSD occurrence annotations on its captured XDM, and target
validation happens on a fresh result-tree view, not by serializing and reparsing
the candidate. to_document(None) produces a schemaless document with lexical
typing and a current empty report. A target failure raises ValidationError
with the target report.
The CLI and MCP routes apply the same boundaries at their own surfaces: the CLI validates the admitted source before execution and validates the principal target before publishing output; MCP validates a captured source before running and reports a target verdict without hiding the candidate. See Command-line reference and MCP integration.
Results and artifacts¶
TransformationResult retains the principal entry, secondary entries, messages,
and warnings. Each ResultEntry keeps the raw XDM sequence, the delivered
document tree when one was built, the serialized string when stylesheet delivery
produced one, the effective serialization parameters, character maps, and output
URI.
result.principalis the raw principal XDM sequence.result.principal_treereturns the delivered tree or a single document-shaped raw result. It raisesResultShapeErrorinstead of wrapping or serializing an arbitrary sequence.result.secondarymaps absolute result URIs to their entries.result.to_document(schema, uri=None)binds the principal or selected secondary result, raisingValidationErrorfor an invalid target.result.to_json_document(uri=None)converts a raw result to an independent native JSON document.result.serialize(uri=None, parameters=None)returns a string without authorization or I/O.result.write(destination, uri=None, parameters=None)writes after the output policy authorizes the destination again. Writing spends the samemax_output_bytesbudget as delivery.
Producing a result performs no file or network write. Secondary results live in memory until the caller writes them or the CLI or MCP route materializes them.
Namespaces and resolvers¶
XSLT namespace bindings come from the stylesheet modules. Elements and
attributes match by expanded name. In Python and MCP, use Clark names
({uri}local) or supported lexical names for static parameter keys. Static
EQNames (Q{uri}local) do not currently bind in Python or MCP; runtime EQNames
do. The CLI accepts both Clark names and EQNames for static and runtime
parameters. On the CLI, lexical QNames resolve against the principal
stylesheet root.
resource_policy owns stylesheet module loads, includes, imports, and runtime
document reads. remote_resource_policy separately authorizes stylesheet-driven
remote runtime reads and must constrain origins, redirects, timeouts, and
consumption.
Supplying a resource_policy excludes xml_policy and xml_limits because the
policy owns parsing. collection_resolver supplies fn:collection values;
without it, no implicit network collection is fetched.
resolver is an explicit package registry. Package modules are registered or
loaded from declared sources; no package is discovered by name, imported from
Python, or fetched from the network. output_policy authorizes an absolute
output URI before its content is constructed and authorizes it again on
TransformationResult.write().
Limits, security, and concurrency¶
ExecutionLimits bounds one transformation and every nested fn:transform
call. Nested calls share the cumulative ledger and may narrow but never loosen a
limit. The default max_frames=100_000 and max_annotations=262_144; the other
budgets default to None. Budget exhaustion raises an uncatchable
XsltDynamicError with code PYXSD-XSLT-001, never a partial result. Recursion
depth depends on the interpreter and its version. max_steps=None does not stop
an unbounded safe tail recursion; set max_steps for such a chain.
XSLT stylesheets are executable code. The library runs them with the caller’s
privileges. A resource policy limits what they can read, but it is not a
sandbox; an output policy authorizes destinations, but it does not make the
process safe. Parse stylesheet modules and source documents with an
XmlParserPolicy and XmlLimits appropriate to untrusted input, or place the
whole operation behind a process boundary with its own timeout.
One compiled stylesheet may run concurrent transformations of distinct inputs. Each invocation opens its own dynamic context, stacks, globals, result trees, and budget; compiled static state is immutable. Provider callbacks, resource policies, output policies, collection resolvers, and Python extensions remain application code and must be thread-safe if they are shared.
Python extension instructions are a library-only capability registered through
compile(..., extensions=...). MCP reports python_extensions: false and
accepts no Python extension registry. The MCP route runs XSLT in a clean worker,
but that worker is not a security sandbox and runs with the server’s privileges.
Packaging¶
The processor is part of the base pyxsd package; no extra is required for
Python or CLI use. The pyxsd xslt command is installed with the console
script. The optional MCP route needs the pyxsd[mcp] extra, and its wheel and
sdist carry the packaged stylesheet schemas used by advisory inspection.
Compilation itself needs no network access and no external XSLT executable.
Errors¶
Static and dynamic failures use the standard XSLT/XPath error identities:
Import
XsltStaticErrorfrompyxsd.xslt.errorsto catch compile-time failures such asXTSE*andXPST*;XsltDynamicErrorreports runtime failures such asXTDE*andXTTE*;XsltInvocationErrorreports an invalid host invocation combination;ResultShapeErrorreports a requested document view for a non-document sequence;ValidationErrorcarries a failed source or target report fromto_document()or the document-transform adapter;ResourcePolicyErrorreports a policy denial;PyXSDErrorandOSErrorcover unreadable or malformed input.
The CLI maps invalid source or target verdicts to exit 1, usage errors to 2,
and compile, evaluation, policy, shape, serialization, or I/O failures to 3.
MCP maps faults to typed tool errors and keeps invalid targets as successful
valid=false records. The library raises; it does not convert a budget, policy,
or validation failure into a partial result.
Measured capability matrix¶
This matrix records explicitly selected XSLT test cases and the outcomes measured
under the checked-in profiles. Each entry states only what its selected cases show:
supported has no non-passing selected case, partial records both passing and
non-passing selected cases, and unsupported records decisive negative evidence
(fail, wrong-error-code, or unsupported-feature); a harness gap or timeout cannot
certify it. optional-not-claimed marks an optional feature outside the profile; it
makes no support or failure claim.
Counts distinguish unique selected case IDs from case-profile executions: a case selected under three profiles contributes three executions.
The selection is a bounded evidence probe, not a full conformance census. Each
selected case ran under a 5-second per-case budget. Outcomes are measured
on the generating interpreter and machine; a disposition can identify a platform
resource limit, so the document does not promise identical outcomes or totals on
another machine. --check is supported only with the default budget; a
non-default --timeout is not a supported check.
Summary¶
Capability |
Status |
Profiles |
Cases |
Executions |
Pass |
Non-pass |
|---|---|---|---|---|---|---|
XSLT 3.0 non-streaming processing |
|
|
4 |
4 |
3 |
1 |
XSLT 2.0 processing |
|
|
4 |
4 |
3 |
1 |
XSLT 1.0 processing |
|
|
4 |
4 |
3 |
1 |
XPath 3.1 |
|
|
4 |
4 |
3 |
1 |
XSD 1.1 |
|
|
4 |
4 |
3 |
1 |
JSON conversion functions |
|
|
4 |
4 |
4 |
0 |
Schema-aware processing |
|
|
4 |
8 |
6 |
2 |
Serialization |
|
|
4 |
8 |
7 |
1 |
Higher-order functions |
|
|
4 |
4 |
3 |
1 |
Dynamic evaluation |
|
|
4 |
4 |
3 |
1 |
Backwards compatibility |
|
|
4 |
8 |
7 |
1 |
DTD handling |
|
|
4 |
12 |
9 |
3 |
Namespace axis |
|
|
4 |
12 |
9 |
3 |
Disabling output escaping |
|
|
2 |
6 |
5 |
1 |
Built-in derived types |
|
|
3 |
6 |
6 |
0 |
HTML4 output |
|
|
3 |
3 |
2 |
1 |
HTML5 output |
|
|
3 |
3 |
1 |
2 |
XML 1.1 |
|
|
2 |
2 |
0 |
2 |
Stylesheet processing instructions |
|
|
2 |
2 |
0 |
2 |
Streaming |
|
|
0 |
0 |
0 |
0 |
Streaming fallback |
|
|
0 |
0 |
0 |
0 |
Evidence¶
XSLT 3.0 non-streaming processing¶
Status:
partialProfiles:
xslt30Reference: https://www.w3.org/TR/xslt-30/
Selected cases: 4 unique
Case-profile executions: 4 (3 pass, 1 non-pass)
Expected-error executions: 1 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
expected-error(1),xml(1),xpath(1)Executions with assertion coverage: 3 of 4
Limitations: Selected XSLT 3.0 cases pass; one selected deep-recursion case is non-passing (disposition
deep-recursion-resource-limit). Streaming is outside this profile.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
XSLT 2.0 processing¶
Status:
partialProfiles:
xslt20Reference: https://www.w3.org/TR/xslt20/
Selected cases: 4 unique
Case-profile executions: 4 (3 pass, 1 non-pass)
Expected-error executions: 4 (wrong error code: 1; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
expected-error(4)Executions with assertion coverage: 4 of 4
Limitations: Selected XSLT 2.0 cases pass; one selected format-number case reports a different error code than the catalog requires (disposition
xslt20-format-number-error-taxonomy).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
XSLT 1.0 processing¶
Status:
partialProfiles:
xslt10Reference: https://www.w3.org/TR/xslt
Selected cases: 4 unique
Case-profile executions: 4 (3 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(3)Executions with assertion coverage: 3 of 4
Limitations: Selected XSLT 1.0 cases pass; one selected case is non-passing because the declared xslt10 profile excludes an XSLT 2.0 instruction (disposition
xslt10-profile-excludes-xslt-2-0-instructions). That is a declared profile non-goal, not a measured XSLT 1.0 defect.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
XPath 3.1¶
Status:
partialProfiles:
xslt30Reference: https://www.w3.org/TR/xpath-31/
Selected cases: 4 unique
Case-profile executions: 4 (3 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
serialization(4)Executions with assertion coverage: 4 of 4
Limitations: Selected XPath 3.1 cases pass; one selected JSON/HTML serialization case is non-passing (disposition
json-node-html-serialization).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
XSD 1.1¶
Status:
partialProfiles:
xslt30Reference: https://www.w3.org/TR/xmlschema11-1/
Selected cases: 4 unique
Case-profile executions: 4 (3 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(1),xpath(2)Executions with assertion coverage: 3 of 4
Limitations: Selected XSD 1.1 cases pass; one selected regex-syntax validation case is non-passing (disposition
regex-syntax-validation-residuals-xslt30).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
JSON conversion functions¶
Status:
supportedProfiles:
xslt30Reference: https://www.w3.org/TR/xpath-functions-31/#json-functions
Selected cases: 4 unique
Case-profile executions: 4 (4 pass, 0 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(2),xpath(2)Executions with assertion coverage: 4 of 4
Limitations: All selected JSON/XML conversion cases pass. This bounded probe does not claim the full JSON function suite or schema-validated json-to-xml output.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
Schema-aware processing¶
Status:
partialProfiles:
xslt30,xslt20Reference: https://www.w3.org/TR/xslt-30/#schema-aware
Selected cases: 4 unique
Case-profile executions: 8 (6 pass, 2 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(4),xpath(4)Executions with assertion coverage: 8 of 8
Limitations: Selected schema-aware cases pass in both profiles; one selected typed-match case is non-passing in both profiles (dispositions
schema-aware-typed-processing-xslt30andschema-aware-typed-processing-xslt20).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
Serialization¶
Status:
partialProfiles:
xslt30,xslt20Reference: https://www.w3.org/TR/xslt-xquery-serialization-31/
Selected cases: 4 unique
Case-profile executions: 8 (7 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
serialization(7)Executions with assertion coverage: 7 of 8
Limitations: Selected serialization cases pass in both profiles; one selected character-map case is non-passing in xslt20 (disposition
xslt20-native-profile-excludes-xpath-3-0-syntax).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
Higher-order functions¶
Status:
partialProfiles:
xslt30Reference: https://www.w3.org/TR/xpath-functions-31/#higher-order-functions
Selected cases: 4 unique
Case-profile executions: 4 (3 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xpath(3)Executions with assertion coverage: 3 of 4
Limitations: Selected higher-order-function cases pass; one selected deep-recursion case is non-passing (disposition
deep-recursion-resource-limit).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
Dynamic evaluation¶
Status:
partialProfiles:
xslt30Selected cases: 4 unique
Case-profile executions: 4 (3 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(2),xpath(1)Executions with assertion coverage: 3 of 4
Limitations: Selected xsl:evaluate cases pass; one selected dynamic-evaluation case is non-passing (disposition
evaluate-residuals).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
Backwards compatibility¶
Status:
partialProfiles:
xslt30,xslt20Reference: https://www.w3.org/TR/xslt-30/#backwards-compatibility
Selected cases: 4 unique
Case-profile executions: 8 (7 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(7)Executions with assertion coverage: 7 of 8
Limitations: Selected backwards-compatibility cases pass in xslt30 and xslt20; one selected format-number case is non-passing in xslt20 (disposition
xslt20-native-profile-function-surface).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
DTD handling¶
Status:
partialProfiles:
xslt30,xslt20,xslt10Reference: https://www.w3.org/TR/xml/#dt-doctype
Selected cases: 4 unique
Case-profile executions: 12 (9 pass, 3 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(6),xpath(3)Executions with assertion coverage: 9 of 12
Limitations: Selected DTD-backed cases pass in all three profiles; one selected external-entity case is non-passing in all three profiles (dispositions
external-entities-not-retrieved-xslt30,external-entities-not-retrieved-xslt20, andexternal-entities-not-retrieved-xslt10).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
Namespace axis¶
Status:
partialProfiles:
xslt30,xslt20,xslt10Reference: https://www.w3.org/TR/xpath-31/#axes
Selected cases: 4 unique
Case-profile executions: 12 (9 pass, 3 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xml(12)Executions with assertion coverage: 12 of 12
Limitations: Selected namespace-axis cases pass in all three profiles; one selected case is non-passing in all three profiles and remains unclassified in the checked-in dispositions.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
unclassified |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
unclassified |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
unclassified |
Disabling output escaping¶
Status:
partialProfiles:
xslt30,xslt20,xslt10Reference: https://www.w3.org/TR/xslt-30/#disable-output-escaping
Selected cases: 2 unique
Case-profile executions: 6 (5 pass, 1 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
serialization(5)Executions with assertion coverage: 5 of 6
Limitations: One selected case passes in all three profiles; one selected case passes in xslt30 and xslt20 but is non-passing in xslt10 (disposition
xslt10-profile-excludes-xslt-2-0-instructions).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
|
Built-in derived types¶
Status:
supportedProfiles:
xslt30,xslt20Reference: https://www.w3.org/TR/xmlschema-2/#built-in-derived
Selected cases: 3 unique
Case-profile executions: 6 (6 pass, 0 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
xpath(6)Executions with assertion coverage: 6 of 6
Limitations: All selected built-in-derived-type cases pass in both profiles; this is a bounded probe, not a full conformance claim.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
|
|
|
- |
HTML4 output¶
Status:
partialProfiles:
xslt30Reference: https://www.w3.org/TR/xslt-30/#HTML-output
Selected cases: 3 unique
Case-profile executions: 3 (2 pass, 1 non-pass)
Expected-error executions: 1 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
expected-error(1),serialization(2)Executions with assertion coverage: 3 of 3
Limitations: Two selected HTML4 cases pass; one selected JSON-node HTML serialization case is non-passing in xslt30 (disposition
json-node-html-serialization). Evidence covers xslt30 only.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
- |
|
|
|
|
HTML5 output¶
Status:
partialProfiles:
xslt30Reference: https://www.w3.org/TR/xslt-xquery-serialization-31/#HTML-output
Selected cases: 3 unique
Case-profile executions: 3 (1 pass, 2 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 0 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised:
serialization(2)Executions with assertion coverage: 2 of 3
Limitations: One selected HTML5 case passes; two selected cases are non-passing in xslt30 (dispositions
default-html-version-applicabilityandjson-node-html-serialization).
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
- |
|
|
|
|
|
|
|
|
XML 1.1¶
Status:
unsupportedProfiles:
xslt30Reference: https://www.w3.org/TR/xml11/
Selected cases: 2 unique
Case-profile executions: 2 (0 pass, 2 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 2 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised: none
Executions with assertion coverage: 0 of 2
Limitations: The selected XML 1.1 cases report unsupported-feature in xslt30; XML 1.1 documents are outside the declared profile.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
unclassified |
|
|
|
unclassified |
Stylesheet processing instructions¶
Status:
unsupportedProfiles:
xslt30Reference: https://www.w3.org/TR/xslt-30/#stylesheet-processing-instruction
Selected cases: 2 unique
Case-profile executions: 2 (0 pass, 2 non-pass)
Expected-error executions: 0 (wrong error code: 0; unexpected errors: 0)
Outcome executions: 0 timeout, 0 adapter-gap, 2 unsupported-feature, 0 not-applicable, 0 corpus-dispute
Assertion families exercised: none
Executions with assertion coverage: 0 of 2
Limitations: The selected embedded-stylesheet cases report unsupported-feature in xslt30; stylesheet processing instructions are outside the declared profile.
Profile |
Case |
Outcome |
Disposition |
|---|---|---|---|
|
|
|
unclassified |
|
|
|
unclassified |
Streaming¶
Status:
optional-not-claimedProfiles:
xslt30Reference: https://www.w3.org/TR/xslt-30/#streaming
Selected cases: none
Case-profile executions: none
Limitations: Streaming is explicitly outside the non-streaming declared profile; no streaming case is claimed.
Streaming fallback¶
Status:
optional-not-claimedProfiles:
xslt30Reference: https://www.w3.org/TR/xslt-30/#streaming-fallback
Selected cases: none
Case-profile executions: none
Limitations: Streaming fallback is outside the non-streaming declared profile; no fallback case is claimed.
Conformance methodology¶
tests/xslt/capabilities.py declares each capability, its profiles, its exact
selected catalog cases, its limitation text, and a public normative reference.
tests/report_xslt_capabilities.py loads the pinned catalog and dispositions,
executes every selected case under the declared profile with
PYXSD_XSLT_OPT=1, validates the evidence, and renders the fragment above.
--write updates it; --check regenerates and compares bytes without a
timestamp, host path, or environment-specific order.
A supported row requires every selected case to pass. partial requires both
a passing and a non-passing selected case. unsupported requires explicit
negative evidence and no passing case. optional-not-claimed selects no cases
and makes no support or failure claim. The dispositions record reviewed
residuals; the generator never rewrites a failure into a pass.
The selection is bounded. It is not the full XSLT test suite and establishes no certification, complete feature coverage, streaming behavior, performance, or identical results on another interpreter or machine. The matrix identifies the measured profiles and the cases behind each row so a reader can distinguish a declared profile boundary from a measured defect.
Examples and source families¶
Runnable source families live under examples/. Each family README owns its
pinned schemas, source downloads, setup, and commands; use those fixtures with
this guide rather than copying paths here. Start at the
examples index,
then follow the relevant README for
GPX,
healthcare,
CityGML,
BPMN,
OpenDRIVE,
XRechnung,
or MusicXML.
The data workflows and
rendering examples pages route to the same families.