Stay organized with collections
Save and categorize content based on your preferences.
URIResolver
public
interface
URIResolver
javax.xml.transform.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.
Summary
Public methods |
abstract
Source
|
resolve(String href, String base)
Called by the processor when it encounters
an xsl:include, xsl:import, or document() function.
|
Public methods
resolve
public abstract Source resolve (String href,
String base)
Called by the processor when it encounters
an xsl:include, xsl:import, or document() function.
Parameters |
href |
String : An href attribute, which may be relative or absolute. |
base |
String : The base URI against which the first argument will be made
absolute if the absolute URI is required. |
Returns |
Source |
A Source object, or null if the href cannot be resolved,
and the processor should try to resolve the URI itself. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["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 2025-02-10 UTC."],[],[],null,["# URIResolver\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\nURIResolver\n===========\n\n\n`\npublic\n\n\ninterface\nURIResolver\n`\n\n\n`\n\n\n`\n\n|---------------------------------|\n| javax.xml.transform.URIResolver |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\n\u003cbr /\u003e\n\nAn object that implements this interface that can be called by the processor\nto turn a URI used in document(), xsl:import, or xsl:include into a Source object.\n\nSummary\n-------\n\n| ### Public methods ||\n|-------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract `[Source](/reference/javax/xml/transform/Source) | ` `[resolve](/reference/javax/xml/transform/URIResolver#resolve(java.lang.String,%20java.lang.String))`(`[String](/reference/java/lang/String)` href, `[String](/reference/java/lang/String)` base) ` Called by the processor when it encounters an xsl:include, xsl:import, or document() function. |\n\nPublic methods\n--------------\n\n### resolve\n\nAdded in [API level 8](/guide/topics/manifest/uses-sdk-element#ApiLevels) \n\n```\npublic abstract Source resolve (String href, \n String base)\n```\n\nCalled by the processor when it encounters\nan xsl:include, xsl:import, or document() function.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------------------------------|\n| `href` | `String`: An href attribute, which may be relative or absolute. \u003cbr /\u003e |\n| `base` | `String`: The base URI against which the first argument will be made absolute if the absolute URI is required. \u003cbr /\u003e |\n\n| Returns ||\n|-------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|\n| [Source](/reference/javax/xml/transform/Source) | A Source object, or null if the href cannot be resolved, and the processor should try to resolve the URI itself. \u003cbr /\u003e |\n\n| Throws ||\n|-----------------------------------------------------------------------------|----------------------------------------------------|\n| [TransformerException](/reference/javax/xml/transform/TransformerException) | if an error occurs when trying to resolve the URI. |"]]