Re: A Proposal from the Disabled Access Community

BruceLeban@akimbo.com
Sun, 20 Apr 1997 12:17:18 -0400 (EDT)


From: BruceLeban@akimbo.com
Date: Sun, 20 Apr 1997 12:17:18 -0400 (EDT)
Message-Id: <199704201617.MAA00860@mail.internet.com>
To: progman@ecst.csuchico.edu
Subject: Re: A Proposal from the Disabled Access Community
Cc: www-html@w3.org


>> compatibility problems. However I note that most browsers ignore a
>> nonexistent fragment id so:
>> 
>>     http://www.bogus/etc.html#foobar
>> 
>> would position to the beginning of the document if there is no foobar
>> anchor. Overloading # for this use would thus provide graceful fallback
>
>I never thought of that, that has some great promise!! 
>Do others agree that it could work??

I can't speak for anyone else. :-) I think you meant to send this message 
to www-html, but you actually sent it just to me. I'm sending this 
message back to the list.

>>     http://www.bogus/etc.html#foo#bar
>
>Can they be made to be that flexible? 

Yes they can. But will this actually get implemented by browsers is a 
different question. I think it is more likely than the search attribute 
on anchors and also more practical. You can carry this around with a URL, 
e.g., to put in a bookmark file. You can't do that with an attribute.

Basically as far as I could discover there is no written definition of 
what is defined after the #. It looks like it slipped through the cracks 
of writing the standards. In essence my suggestion was to redefine the 
(unwritten) standard:

FragmentRef ::= '#' ( ContextRef | CompoundRef )
ContextRef ::= Literal | Literal '##' Number
        // A literal references either the named anchor or the first
        // instance of the text. The second case references the nth
        // instance of the text. A negative number indicates the nth
        // instance from the end of the document.
CompoundRef ::= ContextRef '#' ContextRef
        // References text in between the two contexts. The second
        // context is located relative to the first context.

I.e, the full allowed syntax would be

    http://www.bogus/etc.html#foo##2#bar##3

which references starting at the second instance of foo through the third 
instance of bar after that. If there is interest in implementing this, 
then we should make sure we've considered all options. I'm sure someone 
would suggest that adding regular expressions would be even more 
powerful, but I somehow doubt they are useful to the average user who's 
going to be using this. Also, they require %escaping all the characters. 
The one pattern that is really useful might be:

    foo..bar

which would mean foo followed by bar in the same paragraph (or other 
similar container). I'd probably define this as:

ContextRef ::= Literal (  '..' '.'? Literal )? ( '##' Number )?

to accept foo..bar or foo...bar and foo..bar##1 but not foo##1..bar. This 
needs some minor tweaks like defining the literal above not to allow '..' 
without writing one of them as %2E, etc. So the most complex form would 
look something like

    http://www.bogus/etc.html#foo..bar##2#sna..foo##3


>>     Publish on the web without learning HTML! (Really.)
>
>Really???   :)

<plug>I put the "really" there because all of our competitors claim that 
you don't need to learn HTML but they've really just thinly disguised it 
and you really are working directly with HTML. Most of the people on this 
list know HTML, but there's a lot of people out there who don't.</plug>

    --- Bruce Leban
    Akimbo Systems
    http://www.akimbo.com/globetrotter
    Publish on the web without learning HTML! (Really.)