W3C home > Mailing lists > Public > uri@w3.org > December 2007

RE: IRI Templates and Bidi Characters

From: Brian Smith <brian@briansmith.org>
Date: Mon, 3 Dec 2007 13:37:20 +0700
To: "'URI'" <uri@w3.org>
Message-ID: <00d701c83576$f51905d0$6601a8c0@Junk>

James Snell wrote:
> Brian Smith wrote:
> > [snip]
> > How about changing "The IRI template MAY contain..."
> > to "It is RECOMMENDED that the IRI Template contain..."
> > and add "BIDI overrides SHOULD be preserved as long as 
> > possible (until the template is expanded into an IRI)." 
> > That way, the author's preferred rendering will be used 
> > throughout processing.
> 
> I don't think there is a need to make it any stronger than a 
> MAY since many templates won't have any need for them.  Also, 
> there is actually very little reason to preserve or even 
> transmit the formatting characters because they can be 
> restored easily given rules #3 and #4.

My reasoning is that, in order to type the IRI template, the user had to use a BIDI-enabled editor. The BIDI-enabled editor doesn't understand rules #3 and #4, so the user has to mark up the template explicitly in order for the editor to render it properly.  (Right?) As a result, every reasonable IRI template will start out fully marked up. If the markup is preserved through any steps that might result in the template being displayed, then there is no need for rules #3 and #4, because everything is explicit from the beginning.

> FWIW, there's already one implementation [1].
> 
> Example:
> 
>   Template template = new Template("...");
>   String forprocess = template.getPattern();
>   String fordisplay = template.getPatternForDisplay();

The string "..." will already have all its directionality information marked up explicitly as necessary. Otherwise, the programmer would not be able to read it in his text editor. So, the result of getPatternForDisplay() should be rendered identically to the original string, right?

- Brian
Received on Monday, 3 December 2007 06:37:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:11 UTC