[osis-core] Regex Question

Patrick Durusau osis-core@bibletechnologieswg.org
Sat, 01 Jun 2002 15:50:59 -0400


Guys,

I am working over the regex again (yes, I know it is working now but 
want to see if I can cover a case Steve mentioned yesterday) and need an 
extra pair of eyes on where it is going.

For discussion, a full stop delimited list of characters (no white 
space) is the "Ref" part of the expression. The part starting at the "@" 
sign is the "Grain" part of the expression and it is by default followed 
by "char: " and then an offset expression, possibly followed by "()" 
enclosing a string to be matched.

You saw the test cases I had yesterday so assume all those will still work.

Question:

Should we allow: Ref@Grain-@Grain, in other words, 
Matt.1.1@char:12+25(genealogy)-@char:12+30(David)

Recall that grain may be the char: function or as an alternative, any 
other grain syntax so long as preceded with "x-" (would enable things 
like XPath/XPointer, even XQuery now that I think of it.)

Some part of me says this will be fairly odd but does not impose an 
additional burden and it is something we won't have to fix for later 
modules.

So, possible permutations are:

Ref-Ref

Ref@Grain-Ref

Ref@Grain-@Grain

Ref@Grain-Ref@Grain

(probably not @Grain-Ref or @Grain-Ref@Grain or @Grain-@Grain since 
there would be no location specified for the first offset)

This will allow as about a robust a pointing scheme as I can imagine 
(well, it was Steve's idea so what do you expect?) ;-)

Actually makes the double ended pointing unnecessary since you can say: 
Matt.1.1-Matt.1.5, etc., in one expression. Easier to "read over the 
phone" (according to Steve, not sure why the W3C folks think that should 
be the test since I would not have one but to talk to you guys and to 
order pizza (for Carol)! But, I guess it is as good a test as any and 
the proposal does conform to the way people cite the text.)

Patrick

-- 
Patrick Durusau
Director of Research and Development
Society of Biblical Literature
pdurusau@emory.edu