You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by CM...@jnjfr.JNJ.com on 2003/06/02 11:40:01 UTC

RE: Problems with Xerces appended nodes in transformation

 
To solve this pb, I change the file named XercesBridgeNavigator.cpp by
commenting "if ..." lines in getParentNode, getPreviousSibling,
getNextSibling, getFirstChild, getLastChild methods.
 
Regards
 
Christophe MATHY

-----Message d'origine-----
De: Don Dehm [mailto:ddehm@edgenet.com]
Date: vendredi 23 mai 2003 19:39
À: xalan-c-users@xml.apache.org
Objet: Problems with Xerces appended nodes in transformation


I managed to get Xalan to write a Xerces DOMDoc, ...sort of.  If the file is
freshly loaded into m_pDOMdoc, it transforms fine.  When a node is inserted
in to the doc after it is loaded, like this...
 
...
DOMDocumentFragment *pFragment = m_pDOMdoc->createDocumentFragment();
DOMElement *pCellElement = m_pDOMdoc->createElement(TC("cell"));
appendChild(pFragment, pCellElement);
...
appendChild(pNode /* pNode is a node in m_pDOMdoc */, pFragment);
...
 
... then the resulting translation does not contain the new node.  Is this a
bug, or something I am doing wrong?  The translation code I am using is
pasted below.  Please excuse my sense of humor in my variable naming scheme.
 
 int result(1);
 initializeXML(true /* init Xalan, too */); // initialize Xerces the first
time
 XercesDOMSupport theDOMSupport;
 XercesParserLiaison theParserLiaison;
 
 XSLTInputSource xslIn(stylesheet);
 XSLTResultTarget xmlOut(outputFileName);
 XalanTransformer robotsInDisquise;
 
 try
 {
  const XercesDOMWrapperParsedSource parsedSource(m_pDOMdoc,
theParserLiaison, theDOMSupport);
  result = robotsInDisquise.transform(parsedSource, xslIn, xmlOut);
}
catch(...)
{
 
}
 
Thanks,
Don A. Dehm
Software Engineer
Edgenet Inc.
w: 615.234.3844
e: ddehm@edgenet.com <ma...@edgenet.com> 
NOTICE: This email and any attached files are confidential and intended
solely for the use of the addressee. If you have received this email in
error, please notify the sender and delete it immediately, without
disclosing or using its contents for any purpose. Edgenet Inc accepts no
liability for any damage caused by any virus transmitted by this email.