Laurent wrote:
Of course, I can perfectly understand that in non-XML JSP mode there may be glitches in the way the XML is parsed. However, I don't believe it is acceptable to output something that isn't XML when you've explicitly demanded to have XML. (For example, Mozilla-based browsers refuse to display the page and show an "XML Parsing Error" instead (when an XML mime-type is used).)
I just scanned the JSP Document specification (From JSP 1.2), and I didn't see anything in there to indicate that JSP Documents have anything to do with *outputting* XML. It seems that they are only an XML-compliant way to author the JSP page. Section 5.1 ("Uses for XML Syntax for JSP Pages") makes no mention of "using JSP to generate XML".
Ok, thanks for your quick reply!
Well I still think that
1. sending a text/xml mime-type by default
2. adding <?xml version="1.0" encoding="UTF-8"?>
automatically at the top of the file
only make sense if you're trying to output XML (and gives a strong indication that that's what you're trying to do, even though it is apparently not the case here).
And also: 3. It seems absurd that having "<b>bold</b>" or "<b>bold</b>" in source code produces *exactly* the same output ("<b>bold</b>"), because if you wrote it differently you probably mean 2 different things (e.g. in the first case you want bold text, in the second case you're explaining HTML formatting) 4. normal jsp files get it right (but for different reasons...)
So it would be nice if there was a way of telling the parser you're generating XML. But for now, I'll have to do without.
Section 5.2.1 begins with "The semantic model of a JSP document is unchanged from that of a JSP page in JSP syntax." Taken with the rest of what I read, it seems that a '.jspx' file is just using a different kind of syntactic sugar to pass instructions to the JSP compiler.
IMHO it is more than that: jsp is PHP-ish tag soup, whereas jspx source MUST be well-formed XML (it is parsed and namespaces are interpreted, etc.); simply "using the XML syntax" is not enough. This kind of garantees you have clean maintanable source code, and also helps to seperate layout and content.
But that's more a question of opinion :)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]