tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler ParserController.java
Date Sat, 26 Apr 2003 01:03:31 GMT
luehe       2003/04/25 18:03:31

  Modified:    jasper2/src/share/org/apache/jasper/compiler
                        ParserController.java
  Log:
  Removed enforcement requiring that an including page and its included
  resources all have the same syntax
  
  Revision  Changes    Path
  1.40      +13 -24    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.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- ParserController.java	25 Apr 2003 00:20:57 -0000	1.39
  +++ ParserController.java	26 Apr 2003 01:03:30 -0000	1.40
  @@ -192,8 +192,7 @@
   
   	// Figure out what type of JSP document and encoding type we are
   	// dealing with
  -	determineSyntaxAndEncoding(absFileName, jarFile, jspConfigPageEnc,
  -				   parent);
  +	determineSyntaxAndEncoding(absFileName, jarFile, jspConfigPageEnc);
   
   	if (parent != null) {
   	    // Included resource, add to dependent list
  @@ -287,16 +286,16 @@
        * for the given file, and stores them in the 'isXml' and 'sourceEnc'
        * instance variables, respectively.
        *
  -     * The properties may already be specified in a JSP property group: notice
  +     * The properties may already be specified in a JSP property group: Notice
        * that while the 'isXml' property applies to an entire translation unit
        * (and therefore needs to be checked only for the top-level file), the
        * 'page-encoding' property must be checked separately for the top-level
  -     * and each of its included files, unless they're in XML syntax.
  +     * and each of its included files, unless they're in XML syntax (in which
  +     * case the page encoding is determined according to the XML spec).
        */
       private void determineSyntaxAndEncoding(String absFileName,
   					    JarFile jarFile,
  -					    String jspConfigPageEnc,
  -					    Node parent)
  +					    String jspConfigPageEnc)
   	        throws JasperException, IOException {
   
   	isXml = false;
  @@ -314,24 +313,14 @@
   	 */
   	boolean revert = false;
   
  -	if (parent == null) {
  -	    // top-level file
  -	    if (pageInfo.isXmlConfigSpecified()) {
  -		// If <is-xml> is specified in a <jsp-property-group>, it is
  -		// used.
  -		isXml = pageInfo.isXmlConfig();
  -		isExternal = true;
  -	    } else if (absFileName.endsWith(".jspx")
  -		       || absFileName.endsWith(".tagx")) {
  -		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();
  +	if (pageInfo.isXmlConfigSpecified()) {
  +	    // If <is-xml> is specified in a <jsp-property-group>, it is
  +	    // used.
  +	    isXml = pageInfo.isXmlConfig();
  +	    isExternal = true;
  +	} else if (absFileName.endsWith(".jspx")
  +		   || absFileName.endsWith(".tagx")) {
  +	    isXml = true;
   	    isExternal = true;
   	}
   	
  
  
  

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


Mime
View raw message