Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 240727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:41:27+00:00 2026-05-11T20:41:27+00:00

In the Java XML transformation package, there is a concept known as a URIResolver

  • 0

In the Java XML transformation package, there is a concept known as a URIResolver, which is “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.”

So, if your XSL has an import like this

<xsl:import href="URI"/> 

This allows you to take URI and map it to the Source of your choice – maybe it comes from a database, or maybe you want to map the URI to another URI. This can be useful, since you can’t use an xsl:variable in the xsl:import href.

Here is some sample Java code that creates a transformer and does a transform.

URIResolver uriResolver = new MyURIResolver();  // sample
TransformerFactory transformerFactory = TransformerFactory.newInstance();
transformerFactory.setURIResolver(uriResolver);
Transformer transformer = transformerFactory.newTransformer();
transformer.setURIResolver(uriResolver);
transformer.transform(xml, result);

Note, there are two places in the code where the URIResolver is used:

  • TransformerFactory
    setURIResolver – “Set an object
    that is used by default during the
    transformation to resolve URIs used
    in document(), xsl:import, or
    xsl:include.”
  • Transformer setURIResolver – “Set
    an object that will be used to
    resolve URIs used in document().”

Question: Is there a similar concept to the Java URIResolver in C# and .NET?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:41:27+00:00Added an answer on May 11, 2026 at 8:41 pm

    Yes, it’s called XmlResolver.

    XmlResolver is one of System.Xml abstractions, which means you can use it in various APIs, such as XslCompiledTransform, XmlDocument, XmlReader (via XmlReaderSettings), etc.

    Here’s a more in-depth on how it works, and how you can implement your own resolver.

    By default, these various APIs use the XmlUrlResolver, which can resolve URIs that start with http:// and file://.

    In addition, for resolving external entities, you can override the default ResolveEntity method on XmlReader.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 201k
  • Answers 201k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Paul's comment regarding how "introducing generics into the mix seems… May 12, 2026 at 8:09 pm
  • Editorial Team
    Editorial Team added an answer Code Repository: Add Mercurial - Its the only free, distributed… May 12, 2026 at 8:09 pm
  • Editorial Team
    Editorial Team added an answer You can use the CLR debugger, which is part of… May 12, 2026 at 8:09 pm

Related Questions

I'd like to filter a couple of nested xml elements, evaluation of their attributes.
I have a java class that applies an xslt to all xml files in
I have to process XML files that have a DTD with a XSLT in
I have to invoke a web service with a single parameter, a String in

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.