Stay organized with collections
Save and categorize content based on your preferences.
AI-generated Key Takeaways
The URIResolver interface allows customization of how XSLT processors handle external resources like xsl:include, xsl:import, and document() functions.
Implementations of the resolve method provide a Source object for the given URI or signal the processor to handle resolution itself by returning null.
The resolve method takes the URI and a base URI as input for context and may throw a TransformerException if resolution encounters an error.
public interface
URIResolver
An object that implements this interface that can be called by the processor
to turn a URI used in document(), xsl:import, or xsl:include into a Source object.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[],["The `URIResolver` interface enables a processor to convert a URI into a `Source` object. The `resolve` method is called when the processor encounters `xsl:include`, `xsl:import`, or `document()`. It takes an href and a base URI as input. It returns a `Source` object if successful, otherwise `null`, allowing the processor to resolve the URI. It throws `TransformerException` if resolving the URI fails.\n"]]