On Jul 13, 2008, at 04:07, Peter B. West wrote:
Andreas Delmelle wrote:
URL and URI are both used here. But I think "URL" is the
mandatory term
here. The other thing is "URI Syntax" which does not refer to "URI"
itself. Since a URL is a URI, but not all URIs are URLs, I
believe your
example above is slightly incorrect.
Nice catch. For the moment, better to be safe than sorry. Indeed,
a URI could also be something not referring to a file (or, better
put: a valid input source for a transformation)
Strictly speaking, according to the above definition, the systemId
is allowed to be a 'mailto:' (?) :-/
Sloppy editors... ;-)
I don't think so. The docs for java.net.URL include
"The syntax of URL is defined by RFC 2396: Uniform Resource
Identifiers (URI): Generic Syntax, amended by RFC 2732: Format for
Literal IPv6 Addresses in URLs."
That is, the syntax for URLs is defined as part of the URI syntax.
Yes, that's the point, but 'URI Syntax' is more general. All URLs are
URIs, but URIs can also be opaque, like a mailto:, news:, isbn:...
The point is that the API docs of
javax.xml.transform.stream.StreamSource do not explicitly limit the
parameter to URLs. They do indicate that the constructor is meant to
create a new StreamSource off a URL, but it does not even hint at the
(common-sense) requirement that the parameter String actually points
to a valid, live resource that can be an input source for a
transformation.
No immediate problem for us, but it just seems a bit sloppy on the
side of the maintainers of those docs...
Andreas