Note that there are some explanatory texts on larger screens.

plurals
  1. POXSLT output does not reflect on Firefox
    primarykey
    data
    text
    <p>I have created a Practice.xsl file to transform the source Practice.xml to an html from javascript and add the generated html to n empty DIV element, which is working fine with IE But same html is not rendered correctly on Firefox.</p> <p>here is the Practice.xml</p> <pre><code>&lt;feed&gt; &lt;feedback&gt; &lt;user&gt;Naresh&lt;/user&gt; &lt;date&gt;12 Oct, 2009&lt;/date&gt; &lt;comments&gt;This blog has no stuff to rate it&lt;/comments&gt; &lt;/feedback&gt; &lt;feedback&gt; &lt;user&gt;Pokuri&lt;/user&gt; &lt;date&gt;21 Dec, 2009&lt;/date&gt; &lt;comments&gt;Naresh is right&lt;/comments&gt; &lt;/feedback&gt; &lt;feedback&gt; &lt;user&gt;Subbu&lt;/user&gt; &lt;date&gt;30 Dec, 2009&lt;/date&gt; &lt;comments&gt;I don't agree with both Naresh n Pokuri&lt;/comments&gt; &lt;/feedback&gt; &lt;/feed&gt; </code></pre> <p>Here is the Practice.xsl</p> <pre><code>&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt; &lt;xsl:output method="html" indent="yes"/&gt; &lt;xsl:template match="feed/feedback"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;Feedback Forum&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;span style="display:block; padding: 5px 10px; background-color: #C9F0F9; width: 100%; margin-top:10px; border-left:10px solid #F9EBC9; border-bottom: 1px solid #000000;"&gt;&lt;xsl:apply-templates select="user"/&gt; on &lt;xsl:apply-templates select="date"/&gt;&lt;/span&gt; &lt;span style="display:block; padding: 5px 10px; background-color: #CDF5CD; width: 100%; border-left:10px solid #F9EBC9;"&gt;&lt;xsl:apply-templates select="comments"/&gt;&lt;/span&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>Here is the javascript for work with XSLT transformations on Firefox</p> <pre><code>function listOrders(){ var XSLT = loadXSLT("Practice.xsl"); var trasformedText; if(window.ActiveXObject){ trasformedText = XMLDOM.transformNode(XSLT); document.getElementById("rightDIV").innerHTML=trasformedText; } else if(document.implementation &amp;&amp; document.implementation.createDocument){ **xsltProcessor = new XSLTProcessor(); xsltProcessor.importStylesheet(XSLT); trasformedText = xsltProcessor.transformToFragment(XMLDOM, document); document.getElementById("rightDIV").appendChild(trasformedText);** } else { alert("Sorry your browser may not support xsl transformation.\n+Please check your browser documentation for further help"); } } </code></pre> <hr> <p>Relative images for professionals to identify the problem easily</p> <p>In Firefox: <a href="http://img97.imageshack.us/img97/8509/firefoxk.jpg" rel="nofollow noreferrer">http://img97.imageshack.us/img97/8509/firefoxk.jpg</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload