Re: Can I use 'about:blank' as target document?
Jonas Sicking <[email protected]> Mon, 09 Apr 2007 11:44:17 -0700
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Message-ID | <[email protected]> |
Michael Vincent van Rantwijk, MultiZilla wrote: > Jonas Sicking wrote: >> Michael Vincent van Rantwijk, MultiZilla wrote: >>>> That way you don't need to call .importNode on each of the nodes in >>>> the resulting fragment. That is the whole point of being able to >>>> specify a target document. >>> >>> Sure, but that won't work for people like me, who need to modify the >>> DOM after the transformation. >> >> You are free to modify the returned DOM. It's all yours and you can do >> whatever you want with it, including inserting it into a displayed >> document or ripping it apart. >> >>>> Since it sounds like you are getting the result you are expecting >>>> from the XSLT transform, you're just then having problems displaying >>>> those nodes, this is likely not an XSLT related problem. >>> >>> It is, sort of. It is a limitation for when the target document is >>> 'about:blank', but I can use it now (after I removed the first text >>> (rss/rdf) element/node from the source document). Good enough for >>> testing. >> >> Well, you said the transformation succeeded, no? So everything after >> that is not XSLT code. > > Yes, the transformation succeeded indeed, but it fails to insert the > resulting nodes into about:blank targets i.e. it needs an XMLDocument as > target document or it will fail. > > You can simply try this (for example) with any rss feed from the > Internet. Transform it to anything you like, but make sure you use an > about:blank target, and watch it fail. > >> But it sounds like you've gotten things to work so it's all good then. > > Only after removing the first text node (rss/RDF) so it is really more > like a hack. I really don't understand what you are trying to do. Please provide a full testcase of what is failing. The smaller the better. / Jonas