Some command-line scripts take an argument that is supposed to be
either "-" (denoting standard input) or a URI reference that can be
resolved against the URI equivalent of the current working
directory. This function processes such an argument, given as a
string, and returns an appropriate InputSource object.
Since users tend to expect local OS paths to work as URIs, this
function will accept and use an OS path argument if does appear to
point to an existing local file, even though this could interfere
with catalog-based resolution.
Raises a ValueError if arg is neither a local file nor a valid URI
reference nor "-". Raises a UriException if a stream for the
InputSource could not be opened (e.g., when the URI refers to a
directory or unreadable file).
Extra arguments given to this function are passed to the
InputSourceFactory method that creates the InputSource instance.
The factory must support the methods fromStream() and fromUri(),
as defined in Ft.Xml.InputSource.InputSourceFactory. The factory
must also provide a resolver object with a normalize() method that
can resolve a URI reference against a base URI, returning a URI.