RE: WOFF and extended metadata

[don't know if I should post here, strictly speaking I'm only
"observing", but maybe this will be useful]

A couple of guidelines on writing extensible XML vocabularies:

(1) xml:lang only applies to content, not attributes.
(2) you can't put element markup inside attributes
(3) human-readable content will need to be translated,
    and may need elements inside (e.g. ruby for Japanese
    or Chinese, emphasis, etc)

Therefore, human-readable content such as field names, people's
names, company names, etc., should be in element content.

So,

<field>
  <name>Designer:</name>
  <value>Frederick W. Goudy</value>
</field>

would allow multiple name and maybe value elements, distinguished
by xml:lang values, e.g.
<field>
  <name xml:lang="en">Designer</name>
  <name xml:lang="en_US">Dude with the funky shirt:</name>
  <value>Frederick W. Goudy</value>
<field>
<field>
  <name lang="en">Date:</name>
  <name lang="fr">Date:</name>
  <value lang="en">3rd August 1912</value>
  <value lang="fr">3me Aût 1912</value>
</field>

This sort of extensibility is easy to describe and implement, and
feels closer to the spirit of OpenType. The content of name and
value elements should probably be XHTML.

An alternative approach is to use XML namespaces, and have,
<designer xmlns="http://www.atf.example.org/">
<person><lastname>Goudy</lastname><firstname>Frederick</firstname><initials>W.</initials>
   <moniker>Fred Goudy</moniker></person>
</designer>

but that complicates processing.

I can easily imagine people wanting to include RDF metadata in WOFF
files, e.g. for style tags (flareserif, text, display, condensed, funky)
as well as for licence info.

So probably there should be two sorts of extension data -
(1) displayed properties, using a name/value translatable element-based
    system. This would not use vendor-specific namespaces.
(2) arbitrary metadata that would only be displayed in font editors, or
    with "view source", that's intended for machine-level processing.
    Vendor-specific namespaces could be used here to avoid conflicts.

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 Friday, 28 May 2010 01:28:13 UTC