Re: XSLT and DTD
Martin Honnen <[email protected]> Mon, 09 Apr 2007 16:02:31 +0200
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
[email protected] wrote: > href=document.location.href; > xslprocessor.importStylesheet(xslhttprequest.responseXML); > xslprocessor.setParameter(null,"uri",href); > xhtml=xslprocessor.transformToFragment(xmlhttprequest.responseXML,document); > while(document.hasChildNodes())document.removeChild(document.lastChild); > document.appendChild(xhtml.firstChild);document.close document.close is a method so if you wanted to call it you would need document.close() However I don't see why you would need to call document.close() as you don't use document.write() anywhere. As for inserting the fragment child nodes into the document I think you want document.appendChild(xhtml); as that appends all children of the fragment into the document. If you have a DOCTYPE node and a root element in the fragment then doing only document.appendChild(xhtml.firstChild); will only insert the DOCTYPE node into the document but not other nodes (like the root element). -- Martin Honnen http://JavaScript.FAQTs.com/