[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
multiple <n> one <family>,<given>
Hi,
I'm developing an XML DTD to describe people. An XML implementation
of Vcard would appear to be a good place to start.
The line
<! ELEMENT n (family*, given*, other*, prefix*, suffix*)>
strikes me as strange. This allows for someone to have more
than one family name and given name. You could use the lang
attribute to specify different names for different languages, but
the DTD does not stop the defining of multiple family names and
given names for a single language.
The multiple use of the lang attribute for each element within the
element n appears unnecessary.
I suggest allowing multiple occurrences of <n> within <vCard>,
with <n> taking the language attribute, so that different description
of name + titles can be used for different languages + countries.
So <!ENTITY % prop.man "(fn,n)"> becomes
<!ENTITY % prop.man "(fn+,n+)">
Declaration for fn is left unchanged, do we actually need multiple
language
<fn> information ? Or will one do, while keeping the lang attribute to
show
which language it was compiled for ?
<!ELEMENT n (family*,given*,other*,prefix*,suffix*)> becomes
<!ELEMENT n(family?,given?,other*,prefix*,suffix*)>
You can have more than one 'other' name, more than one prefix and
suffix, but only one family name. Double barrelled family names
eg. Palmer-Tomkinson can be treated as one eg.
<family>Palmer-Tomkinson</family> instead of
<family>Palmer</family><family>Tomkinson</family> which is
allowed in the existing DTD.
Elements family, given, other, prefix,suffix loose their lang attribute,
inheriting the language of their parent n element.
eg. an individual is known as in the US as Dr. John Doe III Jr. PhD,
in the UK as Dr. John Doe PhD, and in France where only medical
doctors use the Dr title as John Doe PhD.
His <n> tag would become:
<n lang="en-US">
<family>Doe</family>
<given>John</given>
<prefix>Dr.</prefix>
<suffix>III</suffix>
<suffix>PhD</suffix>
</n>
<n lang="en-GB">
<family>Doe</family>
<given>John</given>
<prefix>Dr.</prefix>
<suffix>PhD</suffix>
</n>
<n lang="fr">
<family>Doe</family>
<given>John</given>
<suffix>PhD</suffix>
</n>
which is verbose but I believe more clear than:
<n>
<family>Doe</family>
<given>John</given>
<prefix lang="en-US>Dr.</prefix>
<prefix lang="en-GB>Dr.</prefix>
<suffix lang="en-US">III</suffix>
<suffix>PhD</suffix>
</n>
What do people think?
Are there still people on this list?
Martin
begin:vcard
n:Lee;Martin
tel;fax:+44 (207) 757 2699
tel;work:+44 (207) 757 2659
x-mozilla-html:FALSE
url:http://www.ebookers.com
org:Ebookers.com
adr:;;34-42 Woburn Place;London;;WC1H 0TA;England
version:2.1
email;internet:martin@xxxxxxxxxxxx
title:Ecommerce Programmer
x-mozilla-cpt:;25760
fn:Martin Lee
end:vcard