OK... you're right, we could create a 'moz-string://<some human readable
string>' URI and use it where ever we want to present a user readable
string...
My only concern there is how we would deal representing non-ascii strings -
since the 'human readable string' should be unicode, but all of the URI
accessors are ASCII :-) I know we can use our handly dandy URL encoding, but
isn't that alot of trouble?
Maybe we should just create a URI which, where the pre-path is a reference
into a string bundle, and the path is the actual string value for that
resource id :-)
It all seems like alot of work, when all I want to do is return a unicode
string saying 'Rendering document http://foo...' inside of the layout request
:-)
-- rick
Dan Mosedale wrote:
> I like Brendan's idea of DNS URIs.
>
> [EMAIL PROTECTED] (Rick Potts) writes:
> > -=-=-=-=-=-
> >
> > a nsIRequest is just that - an abstract request. It could be network
> > related, or it could be computation related. The 'name' associated with
> > a request is meant to be a readable identifier (that could end up in a
> > list of active requests for example)
> >
> > In the case of a network request (ie. an nsIChannel) there is *also* a
> > URI. But in the case of layout requests (ie. layout computation) there
> > is not.
> >
> > If you want to promote URI up to request and say that every request
> > *must* have a URI. I guess that's fine. But to me doing so sounds much
> > more like brendan's 'universal hammer' :-)
> >
> > What's wrong with having a name identifier? It seems simpler than
> > creating wacky protocols for all of our computations!
> >
> > On the other hand, maybe we should turn layout into a protocol - then we
> > could invoke reflows via the 'layout-reflow://' protocol :-)
>
> Aren't you thinking of URIs a little too narrowly here? A URI is not
> necessarily just a protocol handle; it's _exactly_ what you're looking
> for: a "readable" "name identifier" string for a resource. It just
> happens to use a specific structure.
>
> If we do decide to go this route, some thoughts on defining new URI
> schemes for mozilla can be found in
> <http://bugzilla.mozilla.org/show_bug.cgi?id=69513>
>
> Dan
>
> --