LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject: Re: Strunk and White for XML?
From: Robin Cover <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Tue, 14 Apr 1998 09:27:13 -0500
Content-Type:text/plain
Parts/Attachments:
Parts/Attachments

text/plain (56 lines)


John D. Lewis wrote:

> I would like to ask for opinions on a particular element of style in XML.
>
> I am developing a DTD for a bibliographic database and have several fields
> like Publisher, Frequency, Price, etc. Most of these fields can be
> displayed in two different ways:
>
> 1. Empty tag; e.g. <PUBLISHER NAME=XYZ />
> or
> 2. Tag with content; e.g. <PUBLISHER>XYZ</PUBLISHER>

One disadvantage of using an attribute to store the name of
the publisher is that you have greater difficulty enriching
the encoding so as to indicate what language the string
'XYZ' is written in (and in some contexts, you might want
an indication of its script).

Though other considerations are important, I would personally
recommend not putting "primary" bibliographic data into an
attribute value if there's a realistic chance that you -- or
someone who comes after you -- may want to do language-sensitive
processing on the string data.  Of course, XML supports the
notion of an 'xml:lang' attribute that governs the content of
and element and the values of all the other attributes in the
start-tag, but this will break in many/most "multilingual"
contexts.  If you have done much bibliographic work, you know
that several languages may be represented in a single
bibliographic record (name of author, editor; title, subtitle,
quoted-title, city name, etc. etc.).

Through the late 1990's, most people have been content to encode
information using markup without regard for the language used
in (sub-)strings.  If you have a serious project underway, I
would advise that you reckon with language in the DTD design.

See the document recently posted:

  http://www.sil.org/sgml/elementsAndAttrs.html

"When Should I Use Elements, and When Should I Use Attributes?"


Best wishes,

Robin


-------------------------------------------------------------------------
Robin Cover                    Email: [log in to unmask]
6634 Sarah Drive
Dallas, TX  75236  USA          >>> The SGML/XML Web Page <<<
Tel: +1 (972) 296-1783 (h)     http://www.sil.org/sgml/sgml.html
Tel: +1 (972) 708-7346 (w)
FAX: +1 (972) 708-7380
 ========================================================================

Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager