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:
>>> 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 (:
> 
> I'm not sure what you're saying here. Did you use html (rather then 
> xhtml) for a long time and it did work, but then stopped?

No, we use XHTML from day one. What I tried to explain was that my 
fathers source code used:

documentElement.appendChild(documentFragment.firstChild);

but I somehow changed that to:

documentElement.appendChild(documentFragment);

(must be my mistake) but that makes it append the document fragment 
*including* the HTML element, which is exactly what now fails to work, 
but it worked for at least five months.

> Even though combining html and xml isn't supported it does work most of 
> the time. But I still strongly recommend against it.
> 
>>> 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.
> 
> Err.. So I was saying that there seems to be a bug in mozilla, not that 
> we have imposed any new restrictions.

Ah okay, sorry, me bad.

> You can test if there indeed is a bug, and then file a bug in bugzilla 
> so that we have a chance to fix it, by creating a testfile that produces 
> the same DOM as the one you're having trouble with.

Yeah, I should be able to make such test case, now that I know how it 
should work ;)

Thanks again,
Michael
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.