TREGAN Fabien wrote: > > Hi, > > Little question about URL prefixes handling in pseudo protocols : > > The sitemap allow the admin to associate one (pseudo)protocol with one > SourceFactory. But looking at the sources of the BlobSource, I've found : > > -> private final static String URL_PREFIX = "blob:/"; > -> if (!url.startsWith("blobl:/")) { > throw new MalformedURLException("Malformed url for a blob > source : " + > url); > } > > Is it normal for a source to check the prefixe ? > > Since the factory is associated with one protocol, I thought that whatever > the prefix was, it was only used to selected the proper factory, and then > the Source should'nt be aware of the prefixe. > > If the factory or the source "knows" the prefixe for any reason (please, > explain), why doesn't it tell the SourceHandler the prefixes it handles > (i.e. why do youhave to tell it in the sitemap, if you can ONLY use > name="blob" ?) > > You are right, the source or source factory should not assume anything about the name of the protocol. This is a configuration detail. Therefore the BlobSource is not implemented correctly, I will fix this asap.
Thanks, Carsten --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>