RE: IRI Templates and Bidi Characters

James M Snell wrote:
> 4. Each pipe-delimited segment in the {...} token is treated as a
>    separate component.
> 5. The first component (the op component) is always rendered 
> 6. The second component (the arg component) is always rendered LTR, as
>    if they were in an LTR override (preceded by 0x202D, and followed
>    by 0x202C).  This ensures that the arg will always be rendered
>    in logical order (LTR) in order to avoid any possible confusion.
> 7. The third component (the var component) is segmented 
> depending on the
>    number of vars and specified default values. The following
>    illustrates the segmentation
>    <LRM>var</LRM>=<LRO>default</LRO>,<LRM>var</LRM>=<LRO>default</LRO>
>    Note that like the arg component, the default is always rendered
>    using a LTR override.  This ensures that the default is always
>    presented in logical order.
> 8. The IRI Template itself MUST NOT contain bidi formatting 
> characters.
>    An implementation may wish to provide a modified "for display"
>    version of the IRI Template with appropriate bidi formatting
>    characters inserted into appropriate locations in the template to
>    ensure proper rendering, but those control characters MUST 
> be removed
>    prior to processing the template.
> 9. A component SHOULD NOT use both LTR and RTL characters.
> 10. A component using RTL characters SHOULD start and end with RTL
>     characters.

This all seems to make it difficult to create a valid BIDI IRI template using a regular text editor (one that doesn't know anything about IRI templates). In particular, the implicit LTR overrides mean that the editor of a BIDI IRI template will see something differently from how the processor processes it, right? The only way the editor can present the template correctly is if it inserts explicit overrides. If explicit overrides are necessary anyway for accurate editing, why are implicit overrides needed?

I don't know a lot about BIDI, but I would think it would be a lot simpler to use the exact same rules as IRIs, remove all implicit overrides, suggest when explicit overrides should be provided, and specify when and how overrides are inserted/coalesced during the substitution phase. Is there a reason that wouldn't work?


Received on Sunday, 2 December 2007 16:13:18 UTC