XML shows blank page when linking XSL

Codemon

XML file:

<?xml version="1.0"  encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="biblio.xsl"?>

<bibliography>
    <entry type="article">
        <title>A History of MOOCs, Open Online Courses</title>
        <author>Jane Karr</author>
        <year>2014</year>
    </entry> 
    <entry type="article">
        <title>Apple Co-Founder Creates Electronic ID Tags</title>
        <author>John Markoff</author>
        <year>2003</year>
    </entry> 
</bibliography>

XSL file:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

    <html>
        <body>
            <h2>Bibliography Entries</h2>
            <table border="1">
                <xsl:for-each select="bibliography/entry">
                    <tr>
                        <td><xsl:value-of select="title"/></td>
                        <td><xsl:value-of select="author"/></td>
                        <td><xsl:value-of select="year"/></td>
                    </tr>
                </xsl:for-each>
            </table>
        </body>
    </html>

</xsl:template>
</xsl:stylesheet>

If I don't link the XSLT file to the XML file, my XML file will output the tree structure in my browser's page but if I do link the XSLT file, it will show a blank page.

I am using Chrome, if it helps to know.

Thanks.

Martin Honnen

I assume you are loading the XML document from the file system and in that case Chrome for security reasons does not apply the linked XSLT, unless you start it with lowered security settings. Use F12 to open the browser console and check whether Chrome shows a message explaining why the Xslt was not applied.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

XML shows blank page when linking XSL

From Dev

XML and XSL format linking

From Dev

Hawtio shows blank page

From Dev

When importing page to App.js it shows up blank

From Dev

fabric.js - toDataURL shows blank page when there is image on canvas

From Dev

WebView Shows blank page when opening payment sites - Lollipop

From Dev

Eclipse:Dynamic Web Application shows blank page when run on server

From Dev

fabric.js - toDataURL shows blank page when there is image on canvas

From Dev

Eclipse:Dynamic Web Application shows blank page when run on server

From Dev

Codeigniter shows blank page with no error

From Dev

No errors + shows a blank page PHP

From Dev

PHP file shows blank page

From Dev

Log in script shows blank page

From Dev

Apache shows Blank page for PHP

From Dev

No errors + shows a blank page PHP

From Dev

Laravel shows blank page as the view

From Dev

Form shows blank page on submit

From Dev

AuthComponent successfully redirects to login page when not logged in, but fails for some controllers and shows blank page?

From Dev

Prevent blank page on last side in xsl fo

From Dev

Null values when linking to blank cells in Excel

From Dev

Laravel 5 blade shows a blank page when there is error instead of throwing exception

From Dev

Ember JS app shows blank page

From Dev

Magento: Index Management Page Just shows Blank

From Dev

IE11 shows a blank page

From Dev

WAMP server shows blank page on my wordpress

From Dev

URL Rewrite Rule shows blank page with text

From Dev

WAMP server shows blank page on my wordpress

From Dev

HTML Page Loads, but shows up blank

From Dev

Ember JS app shows blank page

Related Related

HotTag

Archive