From: Dmitriy S. <sha...@gm...> - 2015-07-03 17:28:18
|
That's why I wrote this mail. We should agree on something here and now, because, for example, oXygen can create document at eXist by webdav interface (other protocols allow that too) and that document will not allow to list collection or remove it. Here the trace of exception on document request: java.lang.IllegalArgumentException: Invalid URI: xmldb URI scheme has no instance name: xmldb:exercise%20 at org.exist.xmldb.XmldbURI.create(XmldbURI.java:188) at org.exist.xmldb.XmldbURI.lastSegment(XmldbURI.java:500) at org.exist.storage.NativeBroker.getXMLResource(NativeBroker.java:2223) Other requesta raise same exception. (@ XmldbURI.lastSegment method) On Fri, Jul 3, 2015 at 7:04 PM, Adam Retter <ad...@ex...> wrote: > Yes I realise it is the existing method. But, if there is no javadoc > describing what it does, then your guess is as good as mine! > > On 3 July 2015 at 16:14, Dmitriy Shabanov <sha...@gm...> wrote: > > That is existing method at current code of XmldbURI. > > > > Main question that I have: should exception be raised and if yes - where? > > > > On Fri, Jul 3, 2015 at 5:59 PM, Adam Retter <ad...@ex...> wrote: > >> > >> I have no idea? > >> > >> Certainly if you did new java.net.URI("/db/xmldb:something #1.dita") > >> you will get a URISyntaxException due to the space. > >> > >> It depends what the contract of the `create` function is, is it meant > >> to URI encode? > >> > >> On 3 July 2015 at 15:50, Dmitriy Shabanov <sha...@gm...> wrote: > >> > Hi, > >> > > >> > Is this test correct? > >> > > >> > XmldbURI uri = XmldbURI.create("/db/xmldb:something #1.dita"); > >> > > >> > assertEquals("xmldb:/db/xmldb:something%20#1.dita", uri.toString()); > >> > assertEquals("xmldb:something%20#1.dita", > uri.lastSegment().toString()); > > > > > > > > -- > > Dmitriy Shabanov > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > -- Dmitriy Shabanov |