(still reading old threads from my holidays :-) )

Florian G. Haas wrote:
What I am suspecting is that when using default namespaces, somewhere in the toolchain some XML *attributes* (not elements) are considered to be within a namespace when they really aren't. I'll have to look into this a bit deeper. Just in case anyone cares. :-)

The behaviour you described at http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=106245707100475&w=2 and above is correct: attributes are not in any namespace unless they have a prefix, i.e. they don't inherit the default namespace: http://www.w3.org/TR/REC-xml-names/#defaulting.


But if this

<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <link href="../css/tm4web.css" type="text/css" rel="stylesheet" />
    <meta content="tm4web" name="generator" />
    <title>Florian G. Haas</title>
  </head>
  <body>
  <div id="main">
    <div class="topicinfo">
      <div class="about">
        <h1 class="topictitle">Florian G. Haas</h1>
          <h3 class="topictype"><a href="person.html">person</a></h3>

As you can see, there is only one namespace declaration (on the root element). No namespaces are ever redeclared or overridden. Adding watches on a few expressions shows that when the <link> element's href is processed, attr.getURI(i) is in fact "" (empty string), and the link is correctly output by the link serializer. Yet on subsequent elements containing href attributes, such as the first <a> in the snippet above, the href attribute is curiously identified as having a namespace URI of "http://www.w3.org/1999/xhtml";, the expression attr.getURI(i).equals("") therefore evaluates to false, and the link is never added to the link list.

is true, something is wrong :-) Are you sure? The LinkGatherer would not be the only not working thing if the above was true.


Joerg


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to