Stay organized with collections
Save and categorize content based on your preferences.
URIResolver
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.
Summary
Public methods |
abstract Source! |
Called by the processor when it encounters an xsl:include, xsl:import, or document() function.
|
Public methods
resolve
abstract fun resolve(
href: String!,
base: String!
): Source!
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. |
Return |
Source! |
A Source object, or null if the href cannot be resolved, and the processor should try to resolve the URI itself. |
Exceptions |
javax.xml.transform.TransformerException |
if an error occurs when trying to resolve the URI. |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# URIResolver\n\nAdded in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nURIResolver\n===========\n\n```\ninterface URIResolver\n```\n\n|--------------------------------------|\n| [javax.xml.transform.URIResolver](#) |\n\nAn 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.\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Source](/reference/kotlin/javax/xml/transform/Source)! | [resolve](#resolve(kotlin.String,%20kotlin.String))`(`href:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`, `base:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` 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](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun resolve(\n href: String!, \n base: String!\n): Source!\n```\n\nCalled by the processor when it encounters an xsl:include, xsl:import, or document() function.\n\n| Parameters ||\n|--------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `href` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: An href attribute, which may be relative or absolute. |\n| `base` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: The base URI against which the first argument will be made absolute if the absolute URI is required. |\n\n| Return ||\n|---------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|\n| [Source](/reference/kotlin/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. |\n\n| Exceptions ||\n|--------------------------------------------|----------------------------------------------------|\n| `javax.xml.transform.TransformerException` | if an error occurs when trying to resolve the URI. |"]]