You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric Suen <er...@hotmail.com> on 2004/03/18 15:41:00 UTC

Question about tomcat 5.0.19 jsp XML syntax and Validation and output?

Hi,

  I have a jspx file like this:

| <?xml version="1.0"?>
| <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
|     xmlns:jsp="http://java.sun.com/JSP/Page"
| >
|   <fo:block>&lt;fo:inline&gt;</fo:block>
|   <fo:block><![CDATA[<fo:inline>]]></fo:block>
| </fo:root>

and I try tomcat 5.0.19 & resin 3.0.6, and the output is:

| <?xml version="1.0" encoding="UTF-8"?>
| <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"><fo:block>
| <fo:inline></fo:block><fo:block>
| ~~~~~~~~~~~
| <fo:inline></fo:block></fo:root>
| ~~~~~~~~~~~

The question is, why do this type docode? I know in XSLT will
escaping &, < to "&amp;" "&lt;" to ensures that the output is
well-formed XML, and has an attribute "disable-output-escaping"
to prevent this escaping, but I have no idea why the jsp processing
will docode "&lt;" to < ! what's the advantage of this decode?
why make my valid xml file to invalid?

another question is about stupid "JSP.6.2.4 JSP Document Validation"
why a template engine want do the job xml validator should do?
this feature maybe useful in development time, so, is there any
way to prevent validate in product? even I want validate the xml,
I think I want validate the ouput xml, not the jsp itself? for jsp
processing, a well-formed XML file is not enough? how can I add some
Entity Declarations in my XML file?

Thanks




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