I found this comment (from Michael Sperberg-McQueen's 1992 entry) to be
the most cogent: "it wasn't such a fateful decision after all, but one you
could back out of later if you really needed to."
Given that we can write stylesheets to turn <book
title="something">...</book> into <book><title>something</title>...</book>
and back again, it's not that big a deal to me.
That said, I have my rules of thumb, as I'm sure we all do. Mine go like
this:
* If it can't be repeated, is just text, and is fairly short, make it an
attribute. Thus, I tend to make title into an attribute.
* If it can be repeated, has its own structure (such as a title that has a
subtitle), or is more than a few words, make it an element.
FWIW
Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)
"Michael Kay" <mike(_at_)saxonica(_dot_)com>
02/24/2005 11:45 AM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
cc
Subject
RE: [xsl] Using attributes and elements and text
I have never see a conclusive definition on when using attributes
instead of elements
The usual reference is
http://xml.coverpages.org/elementsAndAttrs.htm
Michael Kay
http://www.saxonica.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--