From adffaces-commits-return-1812-apmail-incubator-adffaces-commits-archive=incubator.apache.org@incubator.apache.org Wed Jan 24 21:58:37 2007 Return-Path: Delivered-To: apmail-incubator-adffaces-commits-archive@locus.apache.org Received: (qmail 99703 invoked from network); 24 Jan 2007 21:58:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2007 21:58:37 -0000 Received: (qmail 17406 invoked by uid 500); 24 Jan 2007 21:58:43 -0000 Delivered-To: apmail-incubator-adffaces-commits-archive@incubator.apache.org Received: (qmail 17350 invoked by uid 500); 24 Jan 2007 21:58:43 -0000 Mailing-List: contact adffaces-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: adffaces-dev@incubator.apache.org Delivered-To: mailing list adffaces-commits@incubator.apache.org Received: (qmail 17339 invoked by uid 99); 24 Jan 2007 21:58:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 13:58:43 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 13:58:36 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id E55E41A981A; Wed, 24 Jan 2007 13:58:15 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r499584 - /incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java Date: Wed, 24 Jan 2007 21:58:15 -0000 To: adffaces-commits@incubator.apache.org From: awiner@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070124215815.E55E41A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: awiner Date: Wed Jan 24 13:58:14 2007 New Revision: 499584 URL: http://svn.apache.org/viewvc?view=rev&rev=499584 Log: Improve JSP 2.1 validity: - is no longer optional - goes at the top of tags (was wrong for validators) Modified: incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java Modified: incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java URL: http://svn.apache.org/viewvc/incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java?view=diff&rev=499584&r1=499583&r2=499584 ============================================================================== --- incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java (original) +++ incubator/adffaces/branches/faces-1_2-070102/plugins/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/GenerateJspTaglibsMojo.java Wed Jan 24 13:58:14 2007 @@ -56,7 +56,6 @@ */ public void execute() throws MojoExecutionException { - System.out.println("TRINIDAD, is12(): " + is12()); try { processIndex(project, resourcePath); @@ -352,6 +351,15 @@ stream.writeCharacters(component.getTagClass()); stream.writeEndElement(); + // In JSP 2.1, body-content is not optional + if (_is12()) + { + stream.writeCharacters("\n "); + stream.writeStartElement("body-content"); + stream.writeCharacters("jsp"); + stream.writeEndElement(); + } + GenerateJspTaglibsMojo.this.writeCustomComponentTagDescriptorContent(stream, component); Iterator properties = component.properties(true); @@ -396,6 +404,15 @@ stream.writeCharacters(converter.getTagClass()); stream.writeEndElement(); + // In JSP 2.1, body-content is not optional + if (_is12()) + { + stream.writeCharacters("\n "); + stream.writeStartElement("body-content"); + stream.writeCharacters("empty"); + stream.writeEndElement(); + } + // converters need an id attribute writeTagAttribute(stream, "id", "the identifier for the converter", null, null); @@ -549,6 +566,15 @@ { stream.writeCharacters("\n "); stream.writeStartElement("tag"); + + if (validator.getDescription() != null) + { + stream.writeCharacters("\n "); + stream.writeStartElement("description"); + stream.writeCData(validator.getDescription()); + stream.writeEndElement(); + } + stream.writeCharacters("\n "); stream.writeStartElement("name"); stream.writeCharacters(validator.getTagName().getLocalPart()); @@ -557,11 +583,13 @@ stream.writeStartElement("tag-class"); stream.writeCharacters(validator.getTagClass()); stream.writeEndElement(); - if (validator.getDescription() != null) + + // In JSP 2.1, body-content is not optional + if (_is12()) { stream.writeCharacters("\n "); - stream.writeStartElement("description"); - stream.writeCData(validator.getDescription()); + stream.writeStartElement("body-content"); + stream.writeCharacters("empty"); stream.writeEndElement(); }