You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Joseph Kesselman <ke...@us.ibm.com> on 2002/07/05 20:25:50 UTC
Re: Help, Transforming data into an existing document
Your "appData" calls are non-DOM methods, so I honestly can't tell whether
what you're trying to do makes sense or not. Could you come up with a
sample that demonstrates the problem using only standard DOM calls plus
Xalan?
Theoretically, a DOMResult() created from a DOM Element node should just
append descendents to that Element. If it's complaining about multiple root
nodes, that means either:
(a) It's actually writing to the Document node, which is refusing
(correctly) to accept a second root element (make sure you really are
passing in the element, not the Document -- note that in some DOMs static
type-checking won't protect you from that mistake);
(b) The DOM you're writing to is -- for some reason known only to itself --
throwing the same DOM exception which that error would produce (you may
want to check the DOM you're using);
or (c) we're enforcing the single-root-element rule in our output even
though we're writing into an element rather than a Document -- which is
possible, but which I would consider surprising; I have the impression
we're relying on the DOM implementation to enforce that rule.
Shouldn't be hard to fire up a debugger and see where the error ie actually
occurring in the DOM-builder code...
______________________________________
Joe Kesselman / IBM Research