[osis-core] Bug in osisRefRegex

Patrick Durusau osis-core@bibletechnologieswg.org
Wed, 22 Oct 2003 10:41:10 -0400


Todd,

After finding the odd behavior in osisGenRegex (the interaction between 
or groups and "?", it made fixing osisRefRegex a little easier.

Note that the first fix invalidated Matt.1.1.

Changing the operators from ? to * and adding a * after the range 
operator, appears to have fixed the problem.

Try some marginal cases on:

(((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?:)?((\p{L}|\p{N}|_)+)(\.(\p{L}|\p{N}|_)*)*(!((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?)?(@(cp\[(\p{Nd})*\]|s\[(\p{L}|\p{N})+\](\[(\p{N})+\])?))?(\-(((\p{L}|\p{N}|_)*)(\.(\p{L}|\p{N}|_)*)*)(!((\p{L}|\p{N}|_)+)((\.(\p{L}|\p{N}|_)+)*)?)?(@(cp\[(\p{Nd})*\]|s\[(\p{L}|\p{N})+\](\[(\p{N})+\])?))?)?

to see if it works. I will be doing some more testing as well.

Of course, I am just spot checking this with XMLSpy but sqc2.2 approves 
of the regexes.

Hope you are having a great day!

Patrick

Todd Tillinghast wrote:
> Patrick,
> 
> The following osisRefs are not valid with the current schema: 
> osisRef="Gen-Rev" 
> osisRef="x:Gen-Rev"
> 
> The following are valid:
> osisRef="Gen-Rev.1"
> osisRef="x:Gen-Rev.1"
> osisRef="Gen-Rev@s[a]"
> osisRef="Gen-Rev!a@s[a][2]"
> osisRef="Gen-Rev!a"
> 
> At least on "." must be present on the right side of a range ref in the
> current schema.  We should allow reference with no ".".
> 
> Todd
> 
> _______________________________________________
> osis-core mailing list
> osis-core@bibletechnologieswg.org
> http://www.bibletechnologieswg.org/mailman/listinfo/osis-core
> 


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