Laugh all you want :), but an API dependency on java.net.URI would have ruled
out support for JDK 1.2/1.3, which was important at the time (but maybe not so
much anymore).
Just escape the space and it should work:
factory.newReference("My%20document/test.txt", ...);
--Sean
jason marshall wrote:
Did you URL encode before passing the String form of the URI in to the
Reference? I pass my URIs as URI objects until the last moment, so that
I don't have to chase down encoded/unencoded data paths through the
code. Saves me a lot of headaches and some potential security holes.
-Jason
(I will never understand why both xmlsec and the Java dsig API have so
many method arguments called "String uri". You are all certainly
welcome to try to explain, but I will simply laugh at you if you do. I
may point at the same time.)
On Tue, Nov 11, 2008 at 12:13 AM, Ling Xiaohan <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi,
URI attribute of <Reference> tag can be set to a relative path in
local file
system, but when the path contains blank space, it seems this
<Reference>
tag coulde not be created by XMLSignatureFactory.newReference method.
Ex.,
<Reference URI="My document/test.txt">
where there is a space in "My document".
Is this a limit?
Thanks.
----------------------------------------------------------------------------
--
- Jason