[jsword-devel] Key issues

Brian Fernandes infernalproteus at gmail.com
Tue May 13 07:33:42 MST 2008


> 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.

 > 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).


 > It's somewhat questionable whether a bookmark should be a bookmark of
 > a reference in the current work, or just a bookmark of the reference
 > in whichever version is current at the time of accessing the bookmark
 > (I can quite easily think of uses for either).  However, I would
 > expect the history to return to the version that it was in.

Jon,
I agree, the history must be the same version while a bookmark could go 
either way. I'll have to think about this further (maybe we need some 
preferences) once we get the syntax sorted out.

Thanks for the prompt feedback everyone!
Brian.



More information about the jsword-devel mailing list