Re: XSLT no longer display the transformed elements
Michael Vincent van Rantwijk <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Jonas Sicking wrote: > Michael Vincent van Rantwijk wrote: > >> Jonas Sicking wrote: >> >>> Please file a bug in bugzilla and attach a testcase. This doesn't >>> seem like an XSLT bug but rather a bug in the DOM code somewhere. >>> >>> Feel free to post the bug number here so we can have a look at it. >>> >>> Best Regards, >>> Jonas Sicking >> >> >> Well yes, but I first need to understand what is going on before I can >> make a testcase. I already found some new/interesting details like >> this one: >> >> Our document fragment, the one we get from >> processor.transformToFragment(xmldoc, targetDocument) >> looks like this: >> >> <html> >> <head> >> <body> >> >> and adding it to our target document results into something like this: >> >> #document >> <rss> >> <html> >> <head> >> <body> >> >> That used to work, but now fails. I found out that skipping the <html> >> node still works, and that results into this document: >> >> #document >> <rss> >> <head> >> <body> >> >> >> My father said that there shouldn't be an <html> element for >> rss/feed/rdf:RDF document nodes, is that correct? I guess that he is >> righ, simply because it works ;) > > Having a <html> tag anywhere other then as the root tag certainly makes > the document an invalid html document. I was expecting this because my father said the same thing, but I just wanted to check, which I won't do again BTW ;) > And you should never combine html > and xml in the same document, that is not supported and will probably > lead to lots of nice trouble. Ok, but it worked for five long months, but that's also when I changed something and forgot to add .firstChild (that basically skips the html element from the document fragment). I just hate making stupid little mistakes with a huge side effect (: > However XHTML combines nicely with xml. Yes, we use XHTML in combination with XML and everything worked perfectly well, again, until two weeks ago. > There are no rules for how to render rss documents, so presumably CSS > rules apply. If you are in fact using xhtml then there is no real reason > the head element and everything under it should be hidden. Try creating > a normal xml file containing markup producing the same DOM as the one > you're building. Does the same thing happen then? This is clearly a new limitation/restriction in Mozilla, presumably introduced by some source code change, so I'm not going to try that, sorry. > I have to ask though, why are you trying to render an rss document? My father developed the Feed Reader (sidebar panel) and Feed Viewer extension for MultiZilla, almost two years ago now, but most people want it included by default, so that is basically what I did five months ago, be it still a bit of a stripped version (he signed some stupid NDA). Thanks for you help! Michael