Note that there are some explanatory texts on larger screens.

plurals
  1. POXML and XSLT not working together
    primarykey
    data
    text
    <p>I cannot get my XML to read my XSLT stylesheet. I am using a Framework - CodeIgniter - so that may or may not be part of the problem.</p> <p>Here is my view code;</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;?xml-stylesheet type="text/xsl" href="&lt;?php echo base_url("assets/style.xsl") ?&gt;" ?&gt; &lt;urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"&gt; &lt;url&gt; &lt;loc&gt;&lt;?php echo site_url();?&gt;&lt;/loc&gt; &lt;priority&gt;1.0&lt;/priority&gt; &lt;/url&gt; &lt;?php echo $file_list; ?&gt; &lt;url&gt; &lt;loc&gt;&lt;?php echo site_url("release-calendar/upcoming-releases"); ?&gt;&lt;/loc&gt; &lt;priority&gt;0.7&lt;/priority&gt; &lt;/url&gt; &lt;url&gt; &lt;loc&gt;&lt;?php echo site_url("release-calendar/currently-released"); ?&gt;&lt;/loc&gt; &lt;priority&gt;0.7&lt;/priority&gt; &lt;/url&gt; &lt;url&gt; &lt;loc&gt;&lt;?php echo site_url("calendar/changes"); ?&gt;&lt;/loc&gt; &lt;priority&gt;0.7&lt;/priority&gt; &lt;/url&gt; &lt;?php echo $file_list_2; ?&gt; &lt;url&gt; &lt;loc&gt;&lt;?php echo site_url("cookies"); ?&gt;&lt;/loc&gt; &lt;priority&gt;0.7&lt;/priority&gt; &lt;/url&gt; &lt;url&gt; &lt;loc&gt;&lt;?php echo site_url("contact_us"); ?&gt;&lt;/loc&gt; &lt;priority&gt;0.7&lt;/priority&gt; &lt;/url&gt; &lt;/urlset&gt; </code></pre> <p>Here is my XSLT code;</p> <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:template match="/"&gt; &lt;html&gt; &lt;body&gt; &lt;table border="1"&gt; &lt;xsl:for-each select="url"&gt; &lt;tr&gt; &lt;td&gt;&lt;xsl:value-of select="loc"/&gt;&lt;/td&gt; &lt;td&gt;&lt;xsl:value-of select="priority"/&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/xsl:for-each&gt; &lt;/table&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>At the moment, the sitemap webpage does not even display in IE9 but does in Firefox. In Firefox it is actually rendering the XML (but just ignoring the styling).</p> <p>The first 3 lines are in red text in the source code using Firefox if that means anything...</p> <p>And the link to the stylesheet has to be correct because i use almost exactly the same link for my css stylesheet.</p> <p>EDIT - Some extra information;</p> <p>This is what my output is rendering;</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;urlset xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9"&gt; &lt;url&gt; &lt;loc&gt;http://www.example.com/index.php/&lt;/loc&gt; &lt;priority&gt;1.0&lt;/priority&gt; &lt;/url&gt; &lt;url&gt; &lt;loc&gt;http://www.example.com/index.php/doc1.pdf&lt;/loc&gt; &lt;priority&gt;0.5&lt;/priority&gt; &lt;/url&gt; &lt;url&gt; &lt;loc&gt;http://www.example.com/index.php/doc2.pdf&lt;/loc&gt; &lt;priority&gt;0.5&lt;/priority&gt; &lt;/url&gt; &lt;url&gt; &lt;loc&gt;http://www.example.com/index.php/doc3.pdf&lt;/loc&gt; &lt;priority&gt;0.5&lt;/priority&gt; &lt;/url&gt; &lt;url&gt; &lt;loc&gt;http://www.example.com/index.php/doc4.pdf&lt;/loc&gt; &lt;priority&gt;0.5&lt;/priority&gt; &lt;/url&gt; &lt;/urlset&gt; </code></pre> <p>Seems fine to me..</p>
    singulars
    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.
 

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