Re: two failings of XLink

At 9:48 AM -0400 9/27/02, Simon St.Laurent wrote:
>Elliotte Rusty Harold writes:
>>  >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.
>
>So apparently you're counting an img element that contains 10 child
>elements as a single element, whereas I'm seeing 11 elements total
>there.
>

I'm not sure we're asking the same question. That may be why we're 
getting different answers. :-)

I'm counting it as one img element *and* as 11 elements total. 
However, if you take away any of those ten child elements or their 
content you have changed the one img element.

Think of it this way. My computer has a CPU. This CPU has ten million 
transistors (or some really big number. Assume, for the sake of 
argument, it's 10 million). Ergo my computer has ten million 
transistors (or more). Just because the transistors are part of the 
CPU does not mean they are not part of the computer. They are both 
part of the computer and part of the CPU.

Similarly, the URIs in the child elements are both part of those 
child elements and of the parent of those child elements.

I am not asking the question, "How many elements are there?" I am 
asking the question "How many URIs does the img element have?" To 
correctly answer this question, you have to count the URIs in all the 
descendants of the img element, as well as in the img element's 
start-tag.

I am reminded of the old brain-teaser about the bellboy and the 
division of the tip. 
<http://www.math.tau.ac.il/~puzne/riddle_mail/msg00014.html> It 
relies on mixing up the same data (dollars) in multiple places so you 
end up double counting. I am looking solely at the question, "How 
many URIs does the img element have?" Just because some of those same 
URIs are also answers to other questions (e.g. "How many URIs does 
the src element have?") does not mean they are not also answers to 
the first question. A URI (or any other string of text) can be part 
of two (or three, or four, or more) elements at the same time.
-- 

+-----------------------+------------------------+-------------------+
| 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 10:34:11 UTC