xsl defining in xml

Posted by aditya parikh on Stack Overflow See other posts from Stack Overflow or by aditya parikh
Published on 2012-11-16T20:21:46Z Indexed on 2012/11/16 23:00 UTC
Read the original article Hit count: 180

Filed under:
|
|
|

My first few lines in movies.xml are as follows :

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="movies_style.xsl"?>
<movies 
    xmlns="http://www.w3schools.com" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.w3schools.com file:///B:/USC/Academic/DBMS/HWS/no3/movie_sch.xsd">

and first few lines in movies_style.xsl are as follows :

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
    xmlns:fo="http://www.w3.org/1999/XSL/Format">

Problem is if remove schema file linking from movies.xml file and keep tag only as <movies> then proper styled table is shown as output else nothing is displayed in browser and error is displayed in console as:

"Unsafe attempt to load URL file:///B:/USC/Academic/DBMS/HWS/no3/movies_style.xsl from frame with URL file:///B:/USC/Academic/DBMS/HWS/no3/movies.xml. Domains, protocols and ports must match."

Looks like some namespace mistake. Can anyone point out exactly what ?

© Stack Overflow or respective owner

Related posts about Xml

Related posts about xslt