kinman 2003/11/21 18:09:35 Modified: jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java Log: - Fix bugzilla 24904: Nested custom tag causes bogus compilation errors. Revision Changes Path 1.71 +10 -7 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Index: JspDocumentParser.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v retrieving revision 1.70 retrieving revision 1.71 diff -u -r1.70 -r1.71 --- JspDocumentParser.java 1 Sep 2003 23:22:56 -0000 1.70 +++ JspDocumentParser.java 22 Nov 2003 02:09:34 -0000 1.71 @@ -99,6 +99,7 @@ private static final String JSP_VERSION = "version"; private static final String LEXICAL_HANDLER_PROPERTY = "http://xml.org/sax/properties/lexical-handler"; + private static final String JSP_URI = "http://java.sun.com/JSP/Page"; private static final EnableDTDValidationException ENABLE_DTD_VALIDATION_EXCEPTION = new EnableDTDValidationException( @@ -288,12 +289,13 @@ checkPrefixes(uri, qName, attrs); - if (directivesOnly && !localName.startsWith(DIRECTIVE_ACTION)) { + if (directivesOnly && + !(JSP_URI.equals(uri) && localName.startsWith(DIRECTIVE_ACTION))) { return; } // jsp:text must not have any subelements - if (TEXT_ACTION.equals(current.getLocalName())) { + if (JSP_URI.equals(uri) && TEXT_ACTION.equals(current.getLocalName())) { throw new SAXParseException( Localizer.getMessage("jsp.error.text.has_subelement"), locator); @@ -357,7 +359,7 @@ Node node = null; - if ("http://java.sun.com/JSP/Page".equals(uri)) { + if (JSP_URI.equals(uri)) { node = parseStandardAction( qName, @@ -525,7 +527,8 @@ public void endElement(String uri, String localName, String qName) throws SAXException { - if (directivesOnly && !localName.startsWith(DIRECTIVE_ACTION)) { + if (directivesOnly && + !(JSP_URI.equals(uri) && localName.startsWith(DIRECTIVE_ACTION))) { return; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]