Skip to content

feat: resolve xsl:import and xsl:include through a pluggable resolver#7

Open
no-pictures[bot] wants to merge 1 commit into
integration-145from
import-resolver
Open

feat: resolve xsl:import and xsl:include through a pluggable resolver#7
no-pictures[bot] wants to merge 1 commit into
integration-145from
import-resolver

Conversation

@no-pictures

@no-pictures no-pictures Bot commented Jul 19, 2026

Copy link
Copy Markdown

Refs #5. Built on integration-145 (tracks frankarensmeier's Paligo#145 branch), which provides the import loading this extends.

xsl:import and xsl:include load through a StylesheetResolver instead of a hardcoded std::fs read.

  • FileSystemResolver keeps the current filesystem behaviour and stays the default, so parse and parse_with_base_dir are unchanged.
  • InMemoryResolver reads stylesheet source from a map keyed by href.
  • parse_with_resolver and evaluate_with_resolver accept a custom resolver.

Imports and includes then resolve on targets without a filesystem, such as wasm32.

Tests

test_import_from_memory, test_include_from_memory, and test_import_precedence_from_memory resolve stylesheets from an in-memory map with no filesystem access; the suite stays green at 103 tests.

Imports and includes load through a StylesheetResolver, so a caller can supply stylesheet source from memory instead of the filesystem.
The filesystem stays the default via FileSystemResolver, and an InMemoryResolver reads from a map keyed by href.
xsl:import and xsl:include then resolve on targets without a filesystem, such as wasm32.

Refs #5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant