W3C home > Mailing lists > Public > public-mobileok-checker@w3.org > June 2007

RE: Call tomorrow?

From: Miguel Garcia <miguel.garcia@fundacionctic.org>
Date: Tue, 5 Jun 2007 18:34:55 +0200
Message-ID: <09700B613C4DD84FA9F2FEA521882819021EBAB8@ayalga.fundacionctic.org>
To: "Sean Owen" <srowen@google.com>, <public-mobileok-checker@w3.org>

We have found out that TransformerFactory class has an URIResolver
handler. This handler returns a Source object to a resource specified by
a href and a base.

With this handler and Java ClassLoader we could import xsl from jar
We prefer to attach the source code before commit such changes to allow
some discussion about this solution.

Also I highlight some of the code to give and idea:

final TransformerFactory factory =TransformerFactory.newInstance();
factory.setURIResolver( new XSLTURIResolver() );
final Transformer transformer=factory.newTransformer(new

transformer.transform(new DOMSource(results.getMokiDocument()),
return runTest(domResult.getNode());

and our URIResolver implementation:

private static class XSLTURIResolver implements URIResolver {

		public Source resolve(String href, String base) {
			//if (href.contains("xsl")) {
				return new


Received on Tuesday, 5 June 2007 16:35:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:21:18 UTC