I'm not a great fan of picking things up by virtue of the fact that you find them lying around on the classpath. That leads to a lot of the problems one sees with the JAXP factory mechanism. It's expensive to search a large classpath, and the results aren't always easily predictable, because many environments create the classpath for themselves without giving you much control. Saxon works this way with "known" external object models such as JDOM and DOM4J - if the support module can be loaded, then it is used; but for "unknown" user-defined models, you have to register it with the Configuration.
 
I think what you are looking for is a kind of "meta-URI-resolver", which is registered to Saxon as "the" URIResolver, but which actually delegates the work to subsidiary resolvers based say on the URI scheme. That shouldn't need any Saxon changes.
 
Michael Kay
http://www.saxonica.com/


From: alan.painter@hsbc.fr [mailto:alan.painter@hsbc.fr]
Sent: 21 January 2009 14:10
To: saxon-help@lists.sourceforge.net
Subject: [saxon] RE saxon-help Digest, Vol 32, Issue 14


Hi Michael et al,

I've been using Saxon(ica) quite a bit with different URI resolvers in order to read/write documents from some specialized in-house datastores.  Works great and has inspired enthusiasm.

I'm now looking for a way of "injecting" URIResolvers into a given framework without having to rewrite the user URIResolver.  

To try to motivate this a bit ...

Say you have a working system with an embedded Saxonica, and you want to add a new URIResolver for a new protocol, it'd be nice to be able to just put the new Resolver jar on the classpath and have Saxonica recognize it for you.  Some external properties might be necessary in order to match up resolvers with protocols.

To give a concrete example, say that you want to add a new resolver/protocol to Kernow, without rewriting parts of Kernow (and/or Saxonica).

Any ideas/comments on this?

-alan Ensemble adoptons des gestes responsables : N'imprimez ce mail que si necessaire. Les informations contenues dans ce message et les pieces jointes (ci-apres denomme le message) sont confidentielles et peuvent etre couvertes par le secret professionnel. Si vous n'etes pas le destinataire de ce message, il vous est interdit de le copier, de le faire suivre, de le divulguer ou d'en utiliser tout ou partie. Si vous avez recu ce message par erreur, nous vous remercions de le supprimer de votre systeme, ainsi que toutes ses copies, et d'en avertir immediatement HSBC France et ses filiales par message de retour. Il est impossible de garantir que les communications par messagerie electronique arrivent en temps utile, sont securisees ou denuees de toute erreur, alteration, falsification ou virus. En consequence, HSBC France et ses filiales declinent toute responsabilite du fait des erreurs, alterations, falsifications ou omissions qui pourraient en resulter. Consider the environment before printing this mail. The information contained in this e-mail is confidential. It may also be legally privileged. If you are not the addressee you may not copy, forward, disclose or use any part of it. If you have received this message by error, please delete it and all copies from your system and notify the sender immediately by return e-mail. E-mail communications cannot be guaranteed to be timely secure, error or virus-free. The sender does not accept liability for any errors or omissions which arise as a result.