Just to clarify, the m_CmdDataSection is the <CmdData> element
of the command document. I use GetElementsByTagName(..) to
locate the tagName, this is one of the operations done by
validateCommandDocument();
-John G
John Gentilin wrote:
> Joe,
>
> Thanks for replying... I think I am somewhere in the middle of this.
>
> The call to getNewAppData() just does a call to the document
>
> So I am transforming into an element that is associated to the input
> document but the element has not been inserted into the document
> until the call to setAppData() which makes a call to replaceChild();
>
> Do the same restrictions apply ??
>
> Regards
> John G
>
> Element getNewAppData() {
> return m_CommandDocument.createElement("CmdData");
> }
>
> public void setAppData(Element e) throws XMLServerException {
> Element newData;
> validateCommandDocument();
> if (e.getOwnerDocument() != m_CmdDataSection.getOwnerDocument())
> {
> newData = (Element)
> m_CmdDataSection.getOwnerDocument().importNode(e, true);
> }
> else
> {
> newData = e;
> }
> m_CmdDataSection.getParentNode().replaceChild(newData,
> m_CmdDataSection);
> }
>
> Joseph Kesselman wrote:
>
> >
> >
> > One other thought, which may be self-evident and is probably
> > unrelated: Make sure you aren't transforming into the same DOM tree
> > you're reading from. Xalan assumes the source document is stable for
> > the duration of the transformation. If you alter it while Xalan is
> > still working with it -- even if you do so by having Xalan write back
> > to it -- all bets are off.
> >
> > ______________________________________
> > Joe Kesselman / IBM Research
--
--------------------------------------
John Gentilin
Eye Catching Solutions Inc.
18314 Carlwyn Drive
Castro Valley CA 94546
Contact Info
[EMAIL PROTECTED]
Ca Office 1-510-881-4821
NJ Office 1-732-422-4917