Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-07-2004, 03:48 AM   #1
Registered: Nov 2004
Posts: 63

Rep: Reputation: 15
xml style sheet working on windows but not on linux

I have xml and xsl file its working perfectly on windows internet explorer but on linux mozilla it shows an error

"This XML file does not appear to have any style information associated with it. The document tree is shown below."

you can check it below iam giving both xml and xsl file just tell me what is wrong in theat

keep both the file in the same folder and open the xml file with explorer and mozilla

<--*********** xml file start here **********-->
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="LogFile.xsl"?>
<Log Date="Datecheck">
<TestCase Result ="Passed"><Column1>1</Column1><Column2>2</Column2><Column3>3</Column3></TestCase>
<Log Date="Datecheck">
<TestCase Result ="Passed"><Column1>1</Column1><Column2>2</Column2><Column3>3</Column3></TestCase>

<--*******xml file ends here ************-->

<-- xsl file starts here -->
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="">
<xsl:template match="/">
<TITLE>Complete Log Report</TITLE>
<H1>Complete Log Report</H1>

<xsl:for-each select="LogFile/Log">
Test Case -
Log Date -
<THEAD ALIGN="left" bgcolor="silver">
<xsl:for-each select="TestCase">
<TD><B><xsl:value-of select="Column1"/></B></TD>
<TD><B><xsl:value-of select="Column2"/></B></TD>
<TD><B><xsl:value-of select="Column3"/></B></TD>

<-- xsl file ends her -->
Old 12-07-2004, 06:14 AM   #2
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
apt-get install libxml2-utils
Hint: your document is not valid XML:
toni@mario:~/work/pub/tst$ xmllint --noout foo.xml
foo.xml:2: parser warning : xmlParsePITarget: invalid name prefix 'xml'
<?xml:stylesheet type="text/xsl" href="LogFile.xsl"?>
toni@mario:~/work/pub/tst$ xmllint --noout fixed/foo.xml
toni@mario:~/work/pub/tst$ xmllint --noout --relaxng xslt.rng foo.xsl
foo.xsl:2: element stylesheet: Relax-NG validity error : Element stylesheet failed to validate attributes
foo.xsl fails to validate
toni@mario:~/work/pub/tst$ xmllint --noout --relaxng xslt.rng fixed/foo.xsl
fixed/foo.xsl validates
toni@mario:~/work/pub/tst$ diff -ub foo.xml fixed/foo.xml
--- foo.xml     2004-12-07 14:06:36.000000000 +0200
+++ fixed/foo.xml       2004-12-07 14:15:40.000000000 +0200
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<?xml:stylesheet type="text/xsl" href="foo.xsl"?>
+<?xml-stylesheet type="text/xsl" href="foo.xsl"?>
 <Log Date="Datecheck">
 <TestCase Result ="Passed"><Column1>1</Column1><Column2>2</Column2><Column3>3</Column3></TestCase>
toni@mario:~/work/pub/tst$ diff -ub foo.xsl fixed/foo.xsl 
--- foo.xsl     2004-12-07 14:07:06.000000000 +0200
+++ fixed/foo.xsl       2004-12-07 14:02:15.000000000 +0200
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="">
+<xsl:stylesheet xmlns:xsl="" version="1.0">
 <xsl:template match="/">

Last edited by ToniT; 12-07-2004 at 06:15 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
is the open office spread sheet program compatiable with ms windows? dr_zayus69 Linux - Software 5 10-14-2005 09:14 PM
Safari Style Sheet Problem atomicx Programming 2 05-03-2005 12:21 AM
external style sheet: list help trscookie Programming 1 04-16-2005 03:10 PM
Remove XML style tags using C kuronai Programming 8 11-12-2004 12:27 AM
latex question; how do I add a new style sheet qanopus Linux - Software 0 01-07-2003 05:23 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:11 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration