[sword-devel] Question about use of note elements

Andrew Thule thulester at gmail.com
Fri Jul 20 14:35:47 MST 2012

Confusion comes from POSIX's permissive approach to basename/dirname.
POSIX.1-2001 suggests something to the effect that the trailing slash
denotes where the dirname ends and the basename begins (which is
unfortunately in my opinion)

For example if you look at basename/dirname (which conforms to POSIX.1-2001)
#include <libgen.h>
char *dirname(char *path);
char *basename(char *path);

Here's how the path breaks down:
path         dirname    basename
"/usr/lib"    "/usr"    "lib"
"/usr/"       "/"       "usr"
"usr"         "."       "usr"
"/"           "/"       "/"

In my opinion, it would have been more useful NOT to differentiate
between basename and dirname but between path and file; where basename
is always fully specified (same as path except with trailing '/'
mandatory) and file is some element of basename.

The reason POSIX when this way is because it supports fully specified
pathnames and relative pathnames, and didn't think through ambiguity
caused by allowing for multiple syntaxes.

A path should always end in a slash (in my opinion).  Perhaps such a
rule can be incorporated in .conf syntax in upcoming major revisions
of the Sword lib - then you wouldn't have to check for it.


On Fri, Jul 20, 2012 at 5:14 PM, Chris Little <chrislit at crosswire.org> wrote:
> On 07/20/2012 12:48 PM, Andrew Thule wrote:
>> However, this idea of in line notes was from the OSIS Manual which
>> says "It is customary to include the notes directly within the text,
>> at the point to which they apply", so I was trying not to fight the
>> standard in my understanding - go with the flow type of deal.  I don't
>> think module developers should influence note placement, even if I
>> think they should be able to influence presentation of 'note markers'
>> such as superscripts.
> I see. What the OSIS manual is referring to is encoding the notes inline. So
> you put the whole note within the XML document at the location where it
> logically occurs (or where you want the footnote marker to be).
> Where it is rendered is determined by the application. In theory, we could
> obey the placement attribute, which has values like 'inline', 'foot', and
> 'right', to determine where to place the footnote text itself in the
> rendered document. But, personally, I see those as pertaining primarily to
> printed works, so I'm quite satisfied to leave placement decisions to the
> application author. As an end-user, I prefer the practice of rendering note
> text in a separate window, as in Xiphos & PocketSword, among others.
> --Chris
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

More information about the sword-devel mailing list