Skip to main content

URIResolver not being called

1 reply [Last post]
Joined: 2006-04-24

I had a transformation code using Dom so far. Recently I made changes to this transformer to use StreamSource instead of Dom to test the efficiency. Since I made the change my Uri resolve class is not being called. This is the object that I instantiate in setURIresolver.

try {
StreamSource xsltSource = new StreamSource(argv[1]);
File f = new File(argv[0]);
if (!f.exists()){ System.out.println("File doesn't exist\n"); return;}
TransformerFactory tFactory = TransformerFactory.newInstance();
Templates cachedXSLT = tFactory.newTemplates(xsltSource);
Transformer transformer = tFactory.newTransformer();
transformer.setURIResolver(new TransformSm().new CustomURIResolver(argv[2]
transformer.transform(new StreamSource(f), new StreamResult(new FileOutput

the above in bold used to work fine. Now that callback has stopped working. Does it mean that it's not called for StreamSource?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-04-24

I found a mistake in my code. I wasn't using cachedXSLT to instantiate the transformer