Re: Using "xml:lang" attribute in empty element

On Fri, 2011-01-21 at 16:26 -0500, Levantovsky, Vladimir wrote:
> Hi Liam,
> 
> As you know, WOFF metadata contains some empty elements (such as
> <vendor>, <credit>) where the end-user info is provided using
> attributes.

In general, information shown to humans should be in element content not
attributes, because
(1) you can't put additional markup in attributes, such as Ruby for
Japanese or Chinese;
(2) xml:lang does not apply to individual attribute values, but rather,
to all the attribute values (and content) of the element on which it
occurs.

This was why I argued for something like,
<field>
  <name xml:lang="en">Font Vendor</name>
  <value xml:lang="en_UK">Dave Farey</value>
  <value xml:lang="en_US">Sir David Farey</value>
</field>

What would be the result of e.g. adding xml:lang to <vendor> element:
> <vendor xml:lang="en" name="Font Vendor"
url="http://fontvendor.example.com" />
> 
It would say that the name and url attributes have values in English.

If you want the two values in different languages you're stuck. But,
this may or may not actually occur in practice, I don't know.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org www.advogato.org

Received on Saturday, 22 January 2011 07:20:47 UTC