I'd bet dollars to donuts that the output is correct, but simply not what
you expected because you forgot which namespaces were active in the source
document and stylesheet.
>Can someone tell me under what circumstances Xalan adds a default
namespace
>declaration?
Xalan adds a default namespace declaration when you are outputting a
non-prefixed element which is not in the same default namespace as its
parent. The alternative would be to force a prefix onto that element and
make sure that prefix is defined, which comes out to much the same thing
unless that prefix is already in scope.
One or the other of these patches is required for correct namespace-aware
processing. You may want to glance at the namespace normalization
algorithm described in the DOM Level 3 Working Draft, which has to solve
the same problem.
______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more.
"The world changed profoundly and unpredictably the day Tim Berners Lee
got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk