Re: XSLT no longer display the transformed elements

Jonas Sicking <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
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. 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. However XHTML combines nicely with xml.

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?

I have to ask though, why are you trying to render an rss document?

/ Sicking
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.