Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@apache.org Received: (qmail 9335 invoked from network); 2 Apr 2003 03:45:19 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 2 Apr 2003 03:45:19 -0000 Received: (qmail 1878 invoked by uid 97); 2 Apr 2003 03:47:16 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-dev@nagoya.betaversion.org Received: (qmail 1871 invoked from network); 2 Apr 2003 03:47:16 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 2 Apr 2003 03:47:16 -0000 Received: (qmail 8464 invoked by uid 500); 2 Apr 2003 03:45:09 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Developers List" Reply-To: "Tomcat Developers List" Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 8447 invoked by uid 500); 2 Apr 2003 03:45:09 -0000 Received: (qmail 8440 invoked from network); 2 Apr 2003 03:45:09 -0000 Received: from icarus.apache.org (208.185.179.13) by daedalus.apache.org with SMTP; 2 Apr 2003 03:45:09 -0000 Received: (qmail 85251 invoked by uid 1399); 2 Apr 2003 03:45:08 -0000 Date: 2 Apr 2003 03:45:08 -0000 Message-ID: <20030402034508.85250.qmail@icarus.apache.org> From: luehe@apache.org To: jakarta-tomcat-jasper-cvs@apache.org Subject: cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ParserController.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N luehe 2003/04/01 19:45:08 Modified: jasper2/src/share/org/apache/jasper/compiler ParserController.java Log: A file included via the include directive is assumed to use the same syntax as the including file (that is, the standard and XML syntaxes cannot be mixed and matched) Revision Changes Path 1.37 +40 -41 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java Index: ParserController.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ParserController.java,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- ParserController.java 25 Mar 2003 00:57:46 -0000 1.36 +++ ParserController.java 2 Apr 2003 03:45:08 -0000 1.37 @@ -85,8 +85,7 @@ private ErrorDispatcher err; /* - * Document information which tells us what - * kind of document we are dealing with. + * Indicates the syntax (XML or standard) of the file being processed */ private boolean isXml; @@ -102,12 +101,6 @@ */ private static final String JSP_ROOT_TAG = " is specified in a , it is used. - isXml = pageInfo.isXmlConfig(); - isExternal = true; - } else if (absFileName.endsWith(".jspx") + if (parent == null) { + // top-level file + if (pageInfo.isXmlConfigSpecified()) { + // If is specified in a , it is + // used. + isXml = pageInfo.isXmlConfig(); + isExternal = true; + } else if (absFileName.endsWith(".jspx") || absFileName.endsWith(".tagx")) { - isXml = true; + isXml = true; + isExternal = true; + } + } else { + /* + * We're an included resource and, therefore, assumed to use the + * same syntax as the including file. + */ + isXml = parent.getRoot().isXmlSyntax(); isExternal = true; } @@ -356,7 +356,7 @@ if (!isXml && sourceEnc.equals("UTF-8")) { /* * We don't know if we're dealing with XML or standard syntax. - * Therefore, we need to check and see if the page contains + * Therefore, we need to check to see if the page contains * a element. * * We need to be careful, because the page may be encoded in @@ -405,8 +405,7 @@ Mark mark = jspReader.skipUntil(JSP_ROOT_TAG); if (mark != null) { isXml = true; - if (revert) - sourceEnc = "UTF-8"; + if (revert) sourceEnc = "UTF-8"; return; } else { isXml = false; --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org