|
From: Lars H. <he...@se...> - 2010-11-23 10:17:51
|
Hi Sven, > What does the getReference method mean, should it returns the given > string reference of the locator without any escaped characters? Yes, all %HH escape sequences are replaced by the characters they represent. toExternalForm() returns the IRI with %HH escape sequences. > If the constructor of Locator is called by an escaped references, > like by using the topic map reader classes, should it be decoded > before saving the reference or not? I don't know what you mean by "saving the reference". It makes sense to create the "reference" as early as possible since getReference() is used to check Locator objects for equivalence. "http://example.org/~user".equals("http://example.org/%7euser") = true "http://example.org/~user".equals("http://example.org/%7Euser") = true [...] > The topic map reader will throw an expection if the locator > contained by a topic block has unescaped whitespaces. I don't know to which topic map reader you're referring to. If you read an XTM/CTM source, all IRIs should be URL-encoded. Best regards, Lars -- Semagia <http://www.semagia.com> <http://www.topicmaps.de/mailinglist/> German Topic Maps mailing list <http://tinytim.sourceforge.net/> Open Source Topic Maps engine |