[osis-core] annotateRef: Question on whitespace

Patrick Durusau osis-core@bibletechnologieswg.org
Tue, 16 Sep 2003 11:35:03 -0400


Greetings!

Any comments on Todd's solution for second (or later occurrences of a word?

Looks like an easy solution to me.

Hope everyone is having a great day!

Patrick

Patrick Durusau wrote:
> Todd,
> 
> Todd Tillinghast wrote:
> 
>> Patrick,
>>
> <snip>
> 
>>
>> What if we did not allow whitespace but allowed the user to specify the
>> occurrence number of the match string with a default to the first
>> occurrence.
>>
>> For example:
>> <verse osisID="X.1.1">The trouble with string matching is that a string
>> can have whitespace trouble makers.</verse>
>>
>> <reference osisRef="X.1.1@s[trouble][2]"/>
>> where the second [#] is optional but would indicate the #th occurrence
>> of the match string
>>
> 
> Hmmm, Steve and I talked about this briefly this afternoon and if we 
> require (in the doc) that @s[ ] always be used at the lowest container, 
> the second occurrence cases should be fairly rare.
> 
> Still, I like your solution, support for which would be optional (?).
> 
> One of the reasons for the @s[ ] operator was that when Steve and I were 
> doing the grain syntax, we picked a word fairly far into a verse and 
> then had to count the characters to reach it. :-) Made us realize the 
> need for an alternative syntax!
> 
> Steve? Looks like a winner to me. Hmmm, will need to redo the regex but 
> that should not be a problem. (He said foolishly.)
> 
> Hope you are having a great day!
> 
> Patrick
> 


-- 
Patrick Durusau
Director of Research and Development
Society of Biblical Literature
Patrick.Durusau@sbl-site.org
Chair, V1 - Text Processing: Office and Publishing Systems Interface
Co-Editor, ISO 13250, Topic Maps -- Reference Model

Topic Maps: Human, not artificial, intelligence at work!