Re: IRI Templates and Bidi Characters

I'm fine with this but the spec needs to at least state how and where
the bidi formatting codes should be used in order to display the
template properly so users don't have to guess.  It also needs to be
pointed out explicitly in the spec that typing out a bidi template in
logical order without the formatting codes will have surprising and
often ambiguous results.

After testing a wider variety of use cases today, I believe the most
reliable approach is, like I indicated in my second note, to require
that the IRI template be rendered in logical order with only the var
name's rendered in visual order, with a recommendation that varname's
not contain a mix of LTR/RTL characters.  So we end up with:

L: <lro>http://abc.def.ghi?{-join|&|<lre>JKL<pdf>=MNO,<lre>PQR<pdf>}<pdf>

V: http://abc.def.ghi?{-join|&|LKJ=MNO,RQP}

The revised rules would be:

1. IRI Templates MUST be stored and transmitted in logical order
2. IRI Templates MUST be rendered using the unicode bidi algorithm
3. IRI Templates SHOULD be rendered as if they were in a Left-to-Right
   Override (preceded by U+202D and followed by U+202C). As with IRIs,
   there is no need to use the explicit override if the template can be
   displayed properly without it.
4. Template variable names SHOULD be rendered as if they were in a
   Left-to-Right embedding (preceded by U+202A and followed by U+202C).
   This will ensure that variable names containing RTL characters will
   be properly rendered without affecting the ordering of the rest of
   the template.  There is no requirement to use the explicit embedding
   if the template can be displayed properly without it.
5. Variables names SHOULD NOT contain a mix of LTR and RTL characters
6. Variable names containing RTL characters SHOULD start and end with
   RTL characters.
7. The IRI Template MAY contain bidi formatting characters necessary
   to ensure that the template is properly rendered.  The bidi
   formatting characters MAY be stored and transmitted with the
   template but the template processor MUST remove all bidi formatting
   characters from the template prior to processing.

Is that better?

- James

Brian Smith wrote:
>> [snip]
>> Regardless of any of this, explicit bidi formatting codes 
>> have to be stripped from the template prior to processig so 
>> that part is already covered :-)
> 
> This is my point. If the BIDI formatting codes are going to be stripped, 
> and templates must be in logical order anyway, then the spec could just 
> say that IRI templates can contain any valid overrides (or markup, like 
> in [X]HTML) as necessary to display them correctly, but the overrides 
> will be stripped by the IRI template processor. This makes IRI templates 
> WYSIWYG in editors, and much simpler to understand and implement.
> 
> - Brian
> 
> 
> 

Received on Monday, 3 December 2007 00:36:20 UTC