[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ddlm-group] Use of elides in strings

I think the solution is to define the CIF2 syntax in a way that allows 
more flexibility in the software implementation. IMHO, if you are going 
to leave the reverse-solidus intact, you should leave the quotes intact 
as well, because the elides are dependent on the quoting context. 
Obviously, RCSB software is designed in a way that they prefer all 
character conversions at the dictionary level. Other developers want the 
conversion done at the same time quotes are removed, so it can be done 
in the correct quoting context.

It should be possible to allow both approaches, with syntax definitions 
something like this:

Within quoted strings, the following rules apply:

1) all close-quote definitions include the look-behind assertion that 
they are not preceded by an odd number of ASCII reverse solidus characters.

2) By default, <REVERSE SOLIDUS><REVERSE SOLIDUS> represents <REVERSE 
SOLIDUS>, and <REVERSE SOLIDUS><CLOSE QUOTE> represents <CLOSE QUOTE>.

3) It is implementation dependent whether the conversions defined in #2 
are applied at the file I/O formatting level (i.e. parser on input).

4) An implementation may override the default conversions in #2, but 
should be avoided in most cases to maintain compatibility.

Joe

James Hester wrote:
> The outstanding issue seems to be around where in the process these
> elides get stripped; Herb and John argue that it should be possible to
> do this in an optional way at the dictionary stage.  As I've already
> indicated, I don't think that it is that straightforward.
> 
> On Mon, Nov 23, 2009 at 9:35 PM, SIMON WESTRIP
> <simonwestrip@btinternet.com> wrote:
>> So at the risk of repeating myself, at this stage there seems to be majority
>> acceptance of
>> what I've been refering to as context-sensitive treatment of elides:
>>
>> Using the trivial example of _label "A\"BC"
>>
>> James and Nick would return A"BC
>>
>> Herb and John would return A\"BC
>>
>> I would return A"BC
>>
>> I wont address Herb's examples as I performed a similar exercise back in
>> THREAD3
>> which was then received with a different opinion :-)
>>
> 

_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://scripts.iucr.org/mailman/listinfo/ddlm-group

Reply to: [list | sender only]