Re: URIs for the standard output and input streams

>>>>> "Paul" == Paul Prescod <paul@prescod.net> writes:

    Paul> As a practical note: if one asks one of today's XSLT to read
    Paul> stdin and output it to stdout, would you rather it
    Paul> complained: "I've never heard of the posix URI protocol
    Paul> scheme" or "http://purl.org/posix/stdin returned 404"?

The former, of course.

But I have another reason for not using the latter - one reason why I
have used stdout: for the standard output stream since the inception
of the Gestalt XSLT 2.0 processor, is that this scheme, as I have
defined it in the output resolver that I wrote for it, has no relative
URIs.

So a user of gestalt, writing:

<xsl:result-document href="destination-one">
...
</xsl:result-document>

<xsl:result-document href="destination-two">
...
</xsl:result-document>

needs to override the default for the base output URI (which I define
to be stdout: for my implementation), as otherwise the above relative
URIs will not resolve.

This has the advantage of consistency in that the default destination
(used if no xsl:result-document is coded) is the same as coding
<xsl:result-document href=""> ...

I choose to make the default the standard output stream - I could
instead have chosen something arbitrary like output.xml relative to
the current working directory (i.e. the base output URI would be
file:///path-to-current-working-directory/output.xml), but that is not
to my taste at all (apart from presupposing that the file: scheme is
available, which need not necessarily be the case).

Anyway, you can see that for me an http: URI is completely out of the
question, as then the above code fragment would yield two relative
URIs that resolve (http follows the generic URI syntax) to ... what?

Well, I guess answers could be given to this, but none are
satisfactory to me. So I will not use an http scheme to refer to
stdout.
-- 
Colin Adams
Preston Lancashire

Received on Thursday, 17 January 2008 22:55:54 UTC