[jsword-devel] Key issues
DM Smith
dmsmith555 at yahoo.com
Tue May 13 08:04:23 MST 2008
Brian Fernandes wrote:
>> Could you not make the URL bible://ESV.gen.1? That way, you keep all
>> the info you need to make the right choices, independent of what's in
>> the combo. I don't know how difficult it would be to rework the
>> protocol handler, though...
>>
>
> Frank,
>
> The protocol handler is easy to manage, just string manipulation after
> all to break the URL up into it's constituent parts. However, since
> periods are already being used in the OsisID, prefixing "ESV." could
> cause some serious ambiguity, this is why we probably need to use
> another simple. You're thinking in the same direction though :)
>
> > We've discussed this on sword-devel and agreed on a spec for it:
> > sword://KJV:Gen.1.1
>
> DM,
>
> The problem with this is that the resulting string is not browser
> friendly. For example, http://[username[:password]@]host:port is a valid
> URL form.
>
> If I use "bible://ESV:Gen.1.1/", Firefox at least tends to eat
> everything after the second colon because it does not conform to a URL
> syntax which it understands, only "bible://ESV" remains in the address
> bar. Before I sent out the email yesterday, I was using @ as a
> separator, something like "bible://ESV@Gen.1.1/".
> "bible://ESV:@Gen.1.1/" works as well, "ESV" is parsed as the username.
>
> Now technically speaking, "bible://Gen.1.1" is a URI, and I looked up
> the syntax for URIs here: http://gbiv.com/protocols/uri/rfc/rfc2396.html
>
> *If you look at Appendix item A - "Collected BNF for URI", I believe
> "bible://ESV:Gen.1.1/" will be an invalid URI, the @ symbol must be
> present. I spent only 10 minutes at this though so I could be mistaken.*
>
> In the event that I'm wrong about it being invalid; it still is going to
> be a much harder effort to get Firefox to accept this URI, if even
> possible.
>
> Now as mentioned before, I could use this syntax "bible://ESV@Gen.1.1",
> but it still is a hack of sorts. ESV is the "username". The 2nd problem
> is that while the browser will load this URL internally, the username
> name component will be removed once the page is loaded, most probably as
> a security precaution. I have tried this with the http protocol on sites
> which accept a username and password in this form. when you bookmark the
> URL, you will be bookmarking "bible://Gen.1.1" and we're back to square one.
>
> Unfortunately, I do not have a better suggestion, but will try to think
> one up.
>
I think you are on the right track that you want a simple separator
character that the browser can handle.
I'm going to ask on sword-devel for their input.
> > As you can guess, the key to a GenBook entry is the entire path from
> > the root. Sword reserves '/' as a path separator.
>
> Cool, I will give that a try, if JSword does not parse it already I can
> easily build it myself. I assume this means keys may not have "/" in
> their names? But / does seem like the kind of character which could make
> an appearance in a page heading? (though I have not seen one yet).
>
I'll also ask this too.
-- DM
More information about the jsword-devel
mailing list