Bug 11361 - Allow user to create own URIResolver
Summary: Allow user to create own URIResolver
Status: RESOLVED LATER
Alias: None
Product: Taglibs
Classification: Unclassified
Component: XTags Taglib (show other bugs)
Version: unspecified
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-08-01 09:38 UTC by Graeme
Modified: 2009-11-29 19:44 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graeme 2002-08-01 09:38:04 UTC
Hi, I have hit a problem when trying to migrate my current XSLT based 
appplication to use the XTags Tag Library. The problem occurs because I have an 
in memory DOMSource object that I need to pass to my xsl stylesheet as a 
parameter. To do this I have had to create my own URIResolver that will store a 
Source object (i.e. my DOMSource). This Source object is then returned when the 
appropriate URI is passed to the URIResolver resolve method. However, within 
XTags there is currently no way to use your own URIResolver. 

To solve the problem I have added an optional "uriResolver" attribute to 
the "style" tag. Therefore, the StyleTag class has a new field,

	private URIResolver uriResolver;

and a setter method for that field,

	public void setUriResolver(URIResolver uriResolver) {
		this.uriResolver = uriResolver;
	}
	
In the doEndTag method the line,

	factory.setURIResolver( createURIResolver() );
	
has expanded to become,

	if (uriResolver == null) {
		uriResolver = createURIResolver();
	}
	factory.setURIResolver( uriResolver );
	
This allows me to use my own URIResolver and solve the problem. Would it be 
possible to add this functionality to XTags?
Comment 1 Henri Yandell 2009-11-29 19:44:44 UTC
Resolving. Taglib has been retired.