Hi again.
Narrowing the issue down somewhat, I've had a look at this piece of code in
ExtendedXlinkPipe.java:
public void startElement(String uri, final String name, final String raw,
final Attributes attr) throws SAXException {
final Set attrList = (Set) MAP.get((uri==null) ? "" : uri);
if (attrList!=null) {
for (int i = 0; i<attr.getLength(); i++)
if (attr.getURI(i).equals("") &&
attrList.contains(attr.getLocalName(i))) {
final String att = attr.getValue(i);
if (att!=null) {
final String str = ": URI="+uri+" NAME="+name+" RAW="+
raw+" ATT="+attr.getLocalName(i)+
" NS="+uri+" VALUE="+att;
if (attrIndex!=-1) {
getLogger().warn("Possible internal error"+str);
}
getLogger().debug("Transforming to XLink"+str);
attrIndex = i;
simpleLink(att, null, null, null, null, null, uri,
name, raw, attr);
return;
}
}
}
super.startElement(uri, name, raw, attr);
}
In other words, IIUC, if an attribute gets processed where the namespace URI
is non-empty -- and hence attr.getURI(i).equals("") is false -- its contents
are not added to the link list. Having hooked up a debugger to check on this,
I've found somewhat strange results. First off, here again is how the
document comes out at the end of the normal pipeline (XTM->XSLT->XHTML):
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<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.
Ahem, somebody more experienced than me please let me know whether I should go
on fiddling with my setup or file a bug. :-)
Regards,
Florian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]