Re: two failings of XLink

At 9:06 AM -0400 9/27/02, Simon St.Laurent wrote:

>Elliotte, I think I have to give up.  So far as I can tell, you're using
>definitions of tags and elements that don't correspond to my
>understandings of their usage.

I'm using the definitions of XML 1.0, which are:

  Each XML document contains one or more elements, the boundaries of 
which are either delimited by start-tags and end-tags, or, for empty 
elements, by an empty-element tag. Each element has a type, 
identified by name, sometimes called its "generic identifier" (GI), 
and may have a set of attribute specifications.] Each attribute 
specification has a name and a value.

Element
[39] element  ::= EmptyElemTag | STag content ETag

The spec is clear: the element begins with the start-tag, includes 
its content, and finishes with the end-tag. If there's an 
empty-element tag there's no content, of course. However, there can 
be content, including other elements. The content is part of the 
element.  The definition of a tag, however, does not include the 
element content. It just includes the attributes.

A lot of books confuse this point, including some of my early ones. 
But I think all of my O'Reilly books are very careful to get this 
distinction right. :-)

>The img element is an element, whether it has an empty tag or a start
>tag and and an end tag.  If it contains child elements, or is wrapped in
>other elements, I count that as a multiple-element solution, not just a
>multi-tag solution.

An img element is one element. This one element may contain other 
elements. If these other elements contain URIs, then the img element 
also contains URIs.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+

Received on Friday, 27 September 2002 09:30:46 UTC