From: Evgeny G. <gaz...@gm...> - 2011-02-01 14:00:43
|
2011/2/1 Pierrick Brihaye <pie...@fr...> > Hi again, > > Le 01/02/2011 13:34, Evgeny Gazdovsky a écrit : > > > Is an exception really required? > > I guess it is. IMHO, you shouldn't be able to create a document with > > such a URI. That's where we should have an exception AFAIC :-) > > > > > > > > Why? > > > > new URI("/an:foo/an:bar") is working as well > > Just like I said, it shouldn't. > > > In the db the char ":" will be encoded (escaped). > > IMHO, it's just a bad solution. How would you handle document names in > the XQuery ? Sometimes, they would be (internally) encoded, sometimes > not. I think, this results in something which isn't strong enough... > > Obviously as other non askii chars. As I see we can use both names encoded and not encoded, becouse name will be decoded before this code (for doc() or other xquery function). > > xs:anyURI("http://localhost:5550/an:form-generator/an:address-geography > ")> > > > > I think it shouldn't. > > But Saxon and java.net.URI<eclipse-javadoc:%E2%98%82=eXist-1.5dev/%5C/usr%5C/lib%5C/jvm%5C/java-6-openjdk%5C/jre%5C/lib%5C/rt.jar%3Cjava.net%28URI.class%E2%98%83URI> .URI(String<eclipse-javadoc:%E2%98%82=eXist-1.5dev/%5C/usr%5C/lib%5C/jvm%5C/java-6-openjdk%5C/jre%5C/lib%5C/rt.jar%3Cjava.net%28URI.class%E2%98%83URI%7EURI%7ELjava.lang.String;%E2%98%82String>str) are not thinkig so ;) I want to discuss an exception's throw in a code, not the question: "How would you handle document names in the XQuery ?". This is another question, which has no relation to discussed issue. -- Evgeny |