Um...

When an aggregator uses the empty "dir" attribute in an entry of an aggregated 
feed, it is actually asking another Atom processor to decide the text direction 
of that entry. Feed readers that read the aggregated feed may have difficulty 
in processing the entry, for example:

<feed xmlns="http://www.w3.org/2005/Atom"; xml:lang="he" dir="rtl">
  <!-- The base text direction of this containing element is right-to-left as 
specified in the "dir" attribute -->
  <title>...</title>
  ...
  <entry xml:lang="en" dir="ltr">
    <!-- The base text direction of this containing element is changed to 
left-to-right as specified in the "dir" attribute -->
    <title>...</title>
    ...
  </entry>
  <entry dir="">
    <!-- The base text direction of this containing element is reset -->
    <title>...</title>
    ...
  </entry>
</feed>

For the second entry, what should feed readers do? They should of course apply 
the default of the "dir" attribute, but what is the default value of the "dir" 
attribute? it is currently not specified in the draft. In addition, should they 
apply the direction guessing mechanism if they support it? The entry's base 
language is currently "he", inherited from atom:feed.

However, in the draft:

   For compatibility with existing Atom documents that rely on direction
   guessing, user agents MAY perform direction guessing in documents
   that do not contain a "dir" attribute but they SHOULD NOT do so when
   a "dir" attribute is provided.

When an Atom document contain a "dir" attribute, Atom processors should not 
apply any direction guessing mechanism. If that is the case, does an empty 
string mean that direction guessing can be used?

As mentioned above, the default value of the "dir" attribute is not specified. 
I think the default can either be "ltr" or implementation-dependent 
(http://www.w3.org/TR/xslt20/#dt-implementation-dependent). But whatever it is, 
the default should be mentioned.

Franklin

PS: In the example above, if the second entry comes from a source feed that 
does not contain any "xml:lang" attribute or "dir", aggregators have to 
generate xml:lang=""[1][2] and dir="" together. (<entry xml:lang="" 
dir=""></entry>). It is very problematic if only dir="" is generated.

References:
1. http://tools.ietf.org/html/rfc4647#section-3.4.1
2. http://www.w3.org/TR/xml/#sec-lang-tag

----- Original Message -----
From: "James M Snell" <[EMAIL PROTECTED]>
To: "atom-syntax" <[email protected]>
Sent: Wednesday, May 09, 2007 08:24
Subject: Atom bidi attribute, empty string value

> 
> In an offline note, Franklin Tse asked about the empty string value for
> the bidi attribute.  He had raised an issue before about whether that
> could be dropped, which I had originally decided to go ahead and do.
> However, after going through a number of aggregated feed scenarios,
> having the ability to explicitly state that no default direction had
> been specified seemed to be more important than relying on a default
> direction of LTR.  I can definitely be convinced otherwise, of course.
> 
> - James
> 
> 

Reply via email to