tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject RE: Bizarre parse error
Date Tue, 22 Jun 2004 16:35:33 GMT
See http://issues.apache.org/bugzilla/show_bug.cgi?id=23357. Perhaps if
you vote for it, someone would fix it? 

> -----Original Message-----
> From: Jonathan Melhuish [mailto:j.melhuish@signal.qinetiq.com] 
> Sent: Tuesday, June 22, 2004 11:44 AM
> To: tomcat-user@jakarta.apache.org; xalan-j-users@xml.apache.org
> Subject: Re: Bizarre parse error
> 
> In the absence of any more logical suggestions, I've been 
> randomly fiddling and have found that:
> 
>     * I only get the error when I successfully retreive XML 
> from the database and pass it to Xalan, it works or fails 
> elegantly in all other cases
>     * The XML data is returned correctly and is valid, 
> because I can output it, save it and parse it using Mozilla
>     * The simple XSL stylesheet that I have created (which 
> just matches the document root) is valid because I am using 
> it successfully on another very similar page that returns a 
> smaller subset of the XML data
>     * If I copy and paste the outputted XML from the saved 
> file into my JSP page and assign it to a string, it works
> 
> So, in summary:
> 
>     * The bit that gets the XML from the database appears to 
> work correctly
>     * The bit that processes the XML (Xalan) appears to work 
> correctly when the above XML is hard-coded into a string
>     * It doesn't work when I try to pass the XML directly 
> from one to the other
> 
> Any ideas?!
> 
> Cheers,
> 
> Jon
> 
> Jonathan Melhuish wrote:
> 
> > I've got a rather bizarre problem which I can't quite get my head 
> > around, and was wondering if anybody might be able to help.
> >
> > I'm using Xalan to transform XML into HTML4 using an XSLT 
> stylesheet.
> > The page appears to be generated correctly, from looking at 
> the source 
> > code.  However, upon loading, Internet Explorer (5 and 6) gives the
> > error:
> >
> >        The character '>' was expected. Error processing resource 
> > 'http://www.w3.org/TR/html4/strict.dtd'. Line 81, Position 5
> >            -- media type, as per [RFC2045]
> >        ----^
> >
> > The line number referenced is not related to the source code of my 
> > page.  Mozilla, meanwhile gives the error "XML Parsing Error: 
> > mismatched tag. Expected: </link>" which would imply that 
> it is trying 
> > to parse it as XHTML.  Changing the DOCTYPE declaration 
> from Strict to 
> > Transitional changes the line number in IE but not the 
> error given by Mozilla.
> > Removing the DOCTYPE definition completely brings IE's 
> error in line 
> > with Mozilla's.
> >
> > However, all of this would perhaps seem rather irrelevant, 
> as I found 
> > that saving the file to disk and re-opening it causes it to be 
> > displayed correctly in both browsers.  Similarly, saving 
> the resultant 
> > HTML and serving it through Tomcat also works, regardless 
> of whether 
> > the filename extension is .html or .jsp.  My only 
> suggestion was that 
> > perhaps it was something to do with the MIME type, but presumably 
> > Tomcat would decide that based on the filename extension if my JSP 
> > pages were not to contain the line:
> >
> > <%@ page language="java" contentType="text/html" %>
> >
> > This presumption is supported by the fact that removing this line 
> > makes no difference to either error.
> >
> > Which leaves me completely out of ideas... help!
> >
> > TIA,
> >
> > Jon
> >
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message