Bug 11361

Summary: Allow user to create own URIResolver
Product: Taglibs Reporter: Graeme <graeme_w_brown>
Component: XTags TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED LATER    
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   

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.