feat: resolve xsl:import and xsl:include through a pluggable resolver#7
Open
no-pictures[bot] wants to merge 1 commit into
Open
feat: resolve xsl:import and xsl:include through a pluggable resolver#7no-pictures[bot] wants to merge 1 commit into
no-pictures[bot] wants to merge 1 commit into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #5. Built on
integration-145(tracks frankarensmeier's Paligo#145 branch), which provides the import loading this extends.xsl:importandxsl:includeload through aStylesheetResolverinstead of a hardcodedstd::fsread.FileSystemResolverkeeps the current filesystem behaviour and stays the default, soparseandparse_with_base_dirare unchanged.InMemoryResolverreads stylesheet source from a map keyed byhref.parse_with_resolverandevaluate_with_resolveraccept 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, andtest_import_precedence_from_memoryresolve stylesheets from an in-memory map with no filesystem access; the suite stays green at 103 tests.