|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
view xml file - mozilla/phoenix vs IE6
I can view my pimadd1.xml file in IE6 - it tabulates fine.
However in Mozilla and Phoenix (latest nightlies) I get the error message "Error loading stylesheet: Parsing a XSLT stylesheet failed." In earlier nightlies I used to get a grey screen. Using a larger file pimadd1 in Mozilla (latest nightly) the browser crashes. Here are the sample files (I have shortened but format is same): pimadd1.xml - <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="pimaddress_book.xsl"?> <Addressbook> <entry> <confidential>""</confidential> <CATEGORIES>Signs</CATEGORIES> <FIRSTNAME>Alf</FIRSTNAME> <LASTNAME>Della</LASTNAME> <JOBTITLE1>""</JOBTITLE1> </entry> <entry> <confidential>""</confidential> <CATEGORIES>Connectors</CATEGORIES> <FIRSTNAME>John</FIRSTNAME> <LASTNAME>Smith</LASTNAME> <JOBTITLE1></JOBTITLE1> </entry> </Addressbook> [end] and pimaddress_book.xsl <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <body> <table border="2" bgcolor="white"> <tr> <th>confidential</th> <th>CATEGORIES</th> <th>FIRSTNAME</th> <th>LASTNAME</th> <th>JOBTITLE1</th> </tr> <xsl:for-each select="Addressbook/entry"> <tr> <td><xsl:value-of select="confidential"/></td> <td><xsl:value-of select="CATEGORIES"/></td> <td><xsl:value-of select="FIRSTNAME"/></td> <td><xsl:value-of select="LASTNAME"/></td> <td><xsl:value-of select="JOBTITLE1"/></td> </tr> </xsl:for-each> </table> </body> </html> [end] Any ideas? Many Thanks Lewis |
|
#2
|
||||
|
||||
|
Where is your xsl:template and xsl:stylesheet closing tags?
Code:
</xsl:template> </xsl:stylesheet> Put those at the bottom of the XSL file |
|
#3
|
|||
|
|||
|
I have added the tags but I get the same error message in Mozilla and Firebird (phoenix).
The file displays fine in IE. Is there some different xml coding required for Mozilla? Thanks Lewis |
|
#4
|
|||
|
|||
|
More info:
The xml files display in Opera 7.11 with no error messages. However the display is not tabulated. Lewis |
|
#5
|
|||
|
|||
|
Opera doesn't support XSL. So in that browser it won't work.
http://www.opera.com/docs/specs/#xml For Mozilla/Phoenix... It could be MIME type your web server is returning to the browser. If web server isn't returning application/xml as MIME type then you'll get problems in Mozilla and Mozilla based browsers. FAQ on this page http://www.mozilla.org/projects/xslt/. Question no. 1
__________________
Best regards Darren Last edited by DarrenJ : May 17th, 2003 at 06:36 PM. |
|
#6
|
|||
|
|||
|
Thanks Darren you are right about opera. Opera displays the text unformatted but at least it doesn't crash!
In Mozilla preferences "Helper Applications" I have added text/xml and application/xml as new MIME types. What do I put for "When a file of this type is encountered"? I have tried both default application and open it with mozilla.exe - but it has crashed both times. Thanks Lewis |
|
#7
|
|||
|
|||
|
Actually it's your web server that need to return right mime tipe if it will shows correct i Mozilla. I don't think that preferences in Mozilla self has anything to do with this.
Have you tried to run those files localy on your computer? Don't use http://localhost but go to File menu and chose Open File. Last edited by DarrenJ : May 19th, 2003 at 11:37 AM. |
|
#8
|
|||
|
|||
|
File > Open File > file.xml
is the method I have used to open the xml files. I have also tried Open Web location which results in the same error or crash. Lewis |
|
#9
|
||||
|
||||
|
Quote:
I think you mean Mozilla (phoenix). Firebird is a database. ![]()
__________________
~ Joe Penn |
|
#10
|
|||
|
|||
|
Thanks for your help people!
I realised the path to my address_book.xsl file was incorrect - Fixed it and the text now displays but still (untabulated). Joe, I am using the latest nightly of Mozilla Firebird which used to be known as Phoenix. Thanks Lewis |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > view xml file - mozilla/phoenix vs IE6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|