geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r523161 [1/4] - in /geronimo/server/trunk/modules/geronimo-jasper-builder/src: main/java/org/apache/geronimo/jasper/deployment/ test/java/org/apache/geronimo/jasper/deployment/ test/resources/ test/resources/1_1_dtd/ test/resources/1_2_dtd/...
Date Wed, 28 Mar 2007 04:20:08 GMT
Author: djencks
Date: Tue Mar 27 21:20:06 2007
New Revision: 523161

URL: http://svn.apache.org/viewvc?view=rev&rev=523161
Log:
GERONIMO-3029 Tests for tld conversions.  Thanks Tim

Added:
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java
  (with props)
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-expected.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-src.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-expected.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-src.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-expected.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-src.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-empty-src.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-obsolete-src.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-reorder-expected-2.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-reorder-src-1.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-reorder-src-2.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_0_xsd/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_0_xsd/taglib-empty-src.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_0_xsd/taglib-reorder-expected-1.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_0_xsd/taglib-reorder-expected-2.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_0_xsd/taglib-reorder-src-1.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_0_xsd/taglib-reorder-src-2.tld
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_1_xsd/
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/2_1_xsd/taglib-empty-src.tld
Modified:
    geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java

Modified: geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java?view=diff&rev=523161&r1=523160&r2=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/main/java/org/apache/geronimo/jasper/deployment/JspModuleBuilderExtension.java
Tue Mar 27 21:20:06 2007
@@ -486,7 +486,7 @@
      * @return converted TagLibDocument in the new shiny schema
      * @throws XmlException if something goes horribly wrong
      */
-    private static TaglibDocument convertToTaglibSchema(XmlObject xmlObject) throws XmlException
{
+    protected static TaglibDocument convertToTaglibSchema(XmlObject xmlObject) throws XmlException
{
         log.debug("convertToTaglibSchema( " + xmlObject.toString() + " ): Entry");
 
         XmlCursor cursor = xmlObject.newCursor();
@@ -495,8 +495,10 @@
             cursor.toStartDoc();
             cursor.toFirstChild();
             if (SchemaConversionUtils.JAVAEE_NAMESPACE.equals(cursor.getName().getNamespaceURI()))
{
-                //do nothing
-            } else if (SchemaConversionUtils.J2EE_NAMESPACE.equals(cursor.getName().getNamespaceURI()))
{
+                log.debug("Nothing to do");
+            }
+            else if (SchemaConversionUtils.J2EE_NAMESPACE.equals(cursor.getName().getNamespaceURI()))
{
+                log.debug("Converting XSD 2.0 to 2.1 schema");
                 SchemaConversionUtils.convertSchemaVersion(cursor, SchemaConversionUtils.JAVAEE_NAMESPACE,
SCHEMA_LOCATION_URL, VERSION);
                 cursor.toStartDoc();
                 cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "taglib");
@@ -507,30 +509,54 @@
                         cursor.push();
                         cursor.toFirstChild();
                         SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
-                        SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
                         do {
                             name = cursor.getName().getLocalPart();
                             boolean rtexprvalueFound = false;
+                            boolean typeFound = false;
                             if ("attribute".equals(name)) {
                                 cursor.push();
                                 cursor.toFirstChild();
-                                SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
                                 do {
                                     name = cursor.getName().getLocalPart();
                                     if ("rtexprvalue".equals(name)) {
                                         rtexprvalueFound = true;
                                     }
                                     if ("type".equals(name)) {
-                                        if (!rtexprvalueFound) {
-                                            rtexprvalueFound = true;
-                                            cursor.insertElementWithText("rtexprvalue", SchemaConversionUtils.JAVAEE_NAMESPACE,
"false");
-                                        }
+                                        typeFound = true;
                                     }
                                 } while (cursor.toNextSibling());
                                 cursor.pop();
+                                if (typeFound && !rtexprvalueFound) {
+                                    //--------------------------------------------------------------
+                                    // Handle the case where the <type> tag must now
be preceded by
+                                    // the <rtexprvalue> tag in the 2.1 schema. Cases
are:
+                                    // 1: Only type found:
+                                    //      We are currently positioned directly after the
attribute
+                                    //      tag (via the pop) so just insert the rtexprvalue
tag
+                                    //      with the default value. The tags will be properly
+                                    //      ordered below.
+                                    // 2: Both type and rtexprvalue found:
+                                    //      The tags will be properly ordered below with
the
+                                    //      convertToAttributeGroup() call, so nothing to
do
+                                    // 3: Only rtexprvalue found:
+                                    //      Nothing to do
+                                    // 4: Neither found:
+                                    //      Nothing to do
+                                    //--------------------------------------------------------------
+                                    cursor.push();
+                                    cursor.toFirstChild();
+                                    cursor.insertElementWithText("rtexprvalue", SchemaConversionUtils.JAVAEE_NAMESPACE,
"false");
+                                    cursor.pop();
+                                }
+                                cursor.push();
+                                cursor.toFirstChild();
+                                SchemaConversionUtils.convertToTldAttribute(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
+                                cursor.pop();
                             }
                         } while (cursor.toNextSibling());
                         cursor.pop();
+                        // Do this conversion last after the other tags have been converted
+                        SchemaConversionUtils.convertToTldTag(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
                     }
                 } while (cursor.toNextSibling());
             }
@@ -540,13 +566,17 @@
                 cursor.toStartDoc();
                 cursor.toChild(SchemaConversionUtils.JAVAEE_NAMESPACE, "taglib");
                 cursor.toFirstChild();
-		//                SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
+                SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
                 do {
                     String name = cursor.getName().getLocalPart();
-                    if (cursor.getName().getLocalPart().equals("jsp-version") ||
-                            cursor.getName().getLocalPart().equals("jspversion") ||
-                            cursor.getName().getLocalPart().equals("validator")) {
+                    if ("jsp-version".equals(name) ||
+                        "jspversion".equals(name) ||
+                        "info".equals(name)) {
                         cursor.removeXmlContents();
+                        cursor.removeXml();
+                    }
+                    if ("tlibversion".equals(name)) {
+                        cursor.setName(TLIB_VERSION);
                     }
                     if ("tlibversion".equals(name)) {
                         cursor.setName(TLIB_VERSION);
@@ -558,7 +588,6 @@
                         cursor.push();
                         cursor.toFirstChild();
                         SchemaConversionUtils.convertToDescriptionGroup(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
-                        SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
                         do {
                             name = cursor.getName().getLocalPart();
                             if ("tagclass".equals(name)) {
@@ -573,7 +602,34 @@
                             if ("attribute".equals(name)) {
                                 cursor.push();
                                 cursor.toFirstChild();
-                                SchemaConversionUtils.convertToTagRoot(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
+                                SchemaConversionUtils.convertToTldAttribute(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
+                                cursor.pop();
+                            }
+                            if ("variable".equals(name)) {
+                                cursor.push();
+                                cursor.toFirstChild();
+                                SchemaConversionUtils.convertToTldVariable(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
+                                cursor.pop();
+                            }
+                            if ("info".equals(name)) {
+                                cursor.removeXmlContents();
+                                cursor.removeXml();
+                            }
+                        } while (cursor.toNextSibling());
+                        cursor.pop();
+                        // Do this conversion last after the other tags have been converted
+                        SchemaConversionUtils.convertToTldTag(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
+                    }
+                    if ("validator".equals(name)) {
+                        cursor.push();
+                        cursor.toFirstChild();
+                        SchemaConversionUtils.convertToTldValidator(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
+                        do {
+                            name = cursor.getName().getLocalPart();
+                            if ("init-param".equals(name)) {
+                                cursor.push();
+                                cursor.toFirstChild();
+                                SchemaConversionUtils.convertToTldInitParam(SchemaConversionUtils.JAVAEE_NAMESPACE,
cursor, moveable);
                                 cursor.pop();
                             }
                         } while (cursor.toNextSibling());
@@ -584,6 +640,7 @@
         }
         finally {
             cursor.dispose();
+            moveable.dispose();
         }
         XmlObject result = xmlObject.changeType(TaglibDocument.type);
         if (result != null) {

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,146 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.jasper.deployment;
+
+import java.net.URL;
+import java.util.List;
+import java.util.ArrayList;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.geronimo.testsupport.XmlBeansTestSupport;
+import org.apache.xmlbeans.XmlObject;
+import org.apache.xmlbeans.XmlOptions;
+
+/**
+ * Schema conversion tests for various JSP TLD files. The following DTD and XSD schema versions
are
+ * tested:
+ *
+ * <ol>
+ *      <li>1.1 DTD
+ *      <li>1.2 DTD
+ *      <li>2.0 XSD
+ *      <li>2.1 XSD
+ * </ol>
+ *
+ * <p><strong>Note(s):</strong>
+ * <ul>
+ *      <li>Those tags from the 1.1 and 1.2 DTD that are no longer valid (e.g., jsp-version)
are
+ *      removed
+ *      <li>Valid  tags from the 1.1 and 1.2 DTD are converted (e.g., tlibversion to
+ *      tlib-version)
+ *      <li>The <taglib> root and the <tag> root elements are reordered
as necessary (i.e.,
+ *      description, display-name)
+ *      <li>The <rtexprvalue> tag is inserted in the <attribute> tag if
necessary since it was
+ *      not required to preceed <type> in 2.0 schema. Default value of false is used.
+ * </ul>
+ */
+public class SchemaConversionTest extends XmlBeansTestSupport {
+
+    private static final Log log = LogFactory.getLog(SchemaConversionTest.class);
+    private ClassLoader classLoader = this.getClass().getClassLoader();
+    private XmlOptions options = new XmlOptions();
+
+
+    /**
+     * Tests for empty TLD files
+    */
+    public void testTLD11Empty() throws Exception {
+        URL srcXML = classLoader.getResource("1_1_dtd/taglib-empty-src.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-empty-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD12Empty() throws Exception {
+        URL srcXML = classLoader.getResource("1_2_dtd/taglib-empty-src.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-empty-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD20Empty() throws Exception {
+        URL srcXML = classLoader.getResource("2_0_xsd/taglib-empty-src.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-empty-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD21Empty() throws Exception {
+        URL srcXML = classLoader.getResource("2_1_xsd/taglib-empty-src.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-empty-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+
+
+    /**
+     * Tests for removal of obsolete TLD tags
+    */
+    public void testTLD11Obsolete() throws Exception {
+        URL srcXML = classLoader.getResource("1_1_dtd/taglib-obsolete-src.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-obsolete-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD12Obsolete() throws Exception {
+        URL srcXML = classLoader.getResource("1_2_dtd/taglib-obsolete-src.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-obsolete-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+
+
+    /**
+     * Tests for reordering TLD tags
+    */
+    public void testTLD11Reorder() throws Exception {
+        URL srcXML = classLoader.getResource("1_1_dtd/taglib-reorder-src.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-reorder-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD12Reorder_1() throws Exception {
+        URL srcXML = classLoader.getResource("1_2_dtd/taglib-reorder-src-1.tld");
+        URL expectedXML = classLoader.getResource("1_1_dtd/taglib-reorder-expected.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD12Reorder_2() throws Exception {
+        URL srcXML = classLoader.getResource("1_2_dtd/taglib-reorder-src-2.tld");
+        URL expectedXML = classLoader.getResource("1_2_dtd/taglib-reorder-expected-2.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD20Reorder_1() throws Exception {
+        URL srcXML = classLoader.getResource("2_0_xsd/taglib-reorder-src-1.tld");
+        URL expectedXML = classLoader.getResource("2_0_xsd/taglib-reorder-expected-1.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+    public void testTLD20Reorder_2() throws Exception {
+        URL srcXML = classLoader.getResource("2_0_xsd/taglib-reorder-src-2.tld");
+        URL expectedXML = classLoader.getResource("2_0_xsd/taglib-reorder-expected-2.tld");
+        parseAndCompare(srcXML, expectedXML);
+    }
+
+
+    /**
+     * Common logic
+     */
+    private void parseAndCompare(URL srcXML, URL expectedXML) throws Exception {
+        XmlObject xmlObject = XmlObject.Factory.parse(srcXML, options);
+        xmlObject = JspModuleBuilderExtension.convertToTaglibSchema(xmlObject);
+        XmlObject expected = XmlObject.Factory.parse(expectedXML);
+        log.debug("[Source XML] " + '\n' + xmlObject.toString() + '\n');
+        log.debug("[Expected XML]" + '\n' + expected.toString() + '\n');
+        List problems = new ArrayList();
+        boolean ok = compareXmlObjects(xmlObject, expected, problems);
+        assertTrue("Differences: " + problems, ok);
+        xmlObject = JspModuleBuilderExtension.convertToTaglibSchema(xmlObject);
+        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
+        assertTrue("Differences: " + problems, ok2);
+    }
+}

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/java/org/apache/geronimo/jasper/deployment/SchemaConversionTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-expected.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-expected.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-expected.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-expected.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+    version="2.1">
+    <tlib-version>1.0</tlib-version>
+    <short-name>d</short-name>
+</taglib>

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-src.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-src.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-src.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-empty-src.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE taglib
+        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
+    "http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_1.dtd">
+<taglib>
+    <tlibversion>1.0</tlibversion>
+    <shortname>d</shortname>
+</taglib>

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-expected.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-expected.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-expected.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-expected.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,48 @@
+<?xml version="1.0" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+    version="2.1">
+    <description>
+      This tag library defines no tags.  Instead, its purpose is encapsulated
+      in the TagLibraryValidator implementation that simply outputs the XML
+      version of a JSP page to standard output, whenever this tag library is
+      referenced in a "taglib" directive in a JSP page.
+    </description>
+    <tlib-version>1.0</tlib-version>
+    <short-name>debug</short-name>
+    <uri>http://jakarta.apache.org/tomcat/debug-taglib</uri>
+    <validator>
+        <validator-class>validators.DebugValidator</validator-class>
+    </validator>
+    <tag>
+        <description>
+        Perform a server side action; Log the message.
+        </description>
+        <name>log</name>
+        <tag-class>examples.LogTag</tag-class>
+        <tei-class>examples.LogTei</tei-class>
+        <body-content>tagdependent</body-content>
+        <attribute>
+            <name>toBrowser</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+</taglib>

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-src.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-src.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-src.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-obsolete-src.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,50 @@
+<?xml version="1.0" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE taglib
+        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
+    "http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_1.dtd">
+<taglib>
+    <tlibversion>1.0</tlibversion>
+    <jspversion>1.2</jspversion>
+    <shortname>debug</shortname>
+    <uri>http://jakarta.apache.org/tomcat/debug-taglib</uri>
+    <description>
+    This tag library defines no tags.  Instead, its purpose is encapsulated
+    in the TagLibraryValidator implementation that simply outputs the XML
+    version of a JSP page to standard output, whenever this tag library is
+    referenced in a "taglib" directive in a JSP page.
+    </description>
+    <validator>
+        <validator-class>validators.DebugValidator</validator-class>
+    </validator>
+    <info>info</info>
+    <tag>
+        <name>log</name>
+        <tagclass>examples.LogTag</tagclass>
+        <teiclass>examples.LogTei</teiclass>
+        <bodycontent>tagdependent</bodycontent>
+        <description>
+    Perform a server side action; Log the message.
+        </description>
+        <attribute>
+            <name>toBrowser</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+</taglib>

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-expected.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-expected.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-expected.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-expected.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,112 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<taglib xmlns="http://java.sun.com/xml/ns/javaee"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
+    version="2.1">
+    <description>Enhanced standard JSP actions and custom MyFaces actions.</description>
+    <tlib-version>1.0.10</tlib-version>
+    <short-name>sn</short-name>
+    <uri>http://myfaces.apache.org/sandbox15</uri>
+    <tag>
+        <description>Container for field configurations</description>
+        <name>dynaFormConfigs</name>
+        <tag-class>org.apache.myfaces.custom.dynaForm.component.dynaForm.DynaConfigsTag</tag-class>
+        <body-content>JSP</body-content>
+    </tag>
+    <tag>
+        <description>Field configurations</description>
+        <name>dynaFormConfig</name>
+        <tag-class>org.apache.myfaces.custom.dynaForm.component.dynaForm.DynaConfigTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>the name of the property this configuration is for</description>
+            <name>for</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>the displaySize to be used to render the component</description>
+            <name>displaySize</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>configure this field as displayOnly</description>
+            <name>displayOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>configure this field as readOnly - noneditable input field</description>
+            <name>readOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>configure this field as disabled - like readOnly but grayed
too</description>
+            <name>disabled</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+
+    <tag>
+        <description>Handle all the dynamic form creation for JSF</description>
+        <name>dynaForm</name>
+        <tag-class>org.apache.myfaces.custom.dynaForm.component.dynaForm.DynaFormTag</tag-class>
+        <body-content>JSP</body-content>
+        <attribute>
+            <description>The var used to get access to the form controller</description>
+            <name>var</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>The value binding prefix which will be used to create the
real value binding.
+          If this is missing and the layout component has a "var" attribute its value will
be used.</description>
+            <name>valueBindingPrefix</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>The root model</description>
+            <name>uri</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>Render the whole form in display (non editable) only mode</description>
+            <name>displayOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>The bundle to use to convert the lables to readable strings</description>
+            <name>bundle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+        <attribute>
+            <description>true|false - Set to true if only the fields listed within
the configuration are to be rendered</description>
+            <name>exclusiveFields</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+        </attribute>
+    </tag>
+</taglib>

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-src.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-src.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-src.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_1_dtd/taglib-reorder-src.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,143 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE taglib
+  PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
+  "http://java.sun.com/dtd/web-jsptaglibrary_1_1.dtd">
+<taglib>
+    <tlibversion>1.0.10</tlibversion>
+    <jspversion>1.2</jspversion>
+    <shortname>sn</shortname>
+    <uri>http://myfaces.apache.org/sandbox15</uri>
+    <description>
+      Enhanced standard JSP actions and custom MyFaces actions.
+    </description>
+    <tag>
+        <name>dynaFormConfigs</name>
+        <tagclass>org.apache.myfaces.custom.dynaForm.component.dynaForm.DynaConfigsTag</tagclass>
+        <bodycontent>JSP</bodycontent>
+        <description>
+        Container for field configurations
+        </description>
+    </tag>
+    <tag>
+        <name>dynaFormConfig</name>
+        <tagclass>org.apache.myfaces.custom.dynaForm.component.dynaForm.DynaConfigTag</tagclass>
+        <bodycontent>JSP</bodycontent>
+        <attribute>
+            <name>for</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+      the name of the property this configuration is for
+            </description>
+        </attribute>
+        <attribute>
+            <name>displaySize</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+      the displaySize to be used to render the component
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+      configure this field as displayOnly
+            </description>
+        </attribute>
+        <attribute>
+            <name>readOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+      configure this field as readOnly - noneditable input field
+            </description>
+        </attribute>
+        <attribute>
+            <name>disabled</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+      configure this field as disabled - like readOnly but grayed too
+            </description>
+        </attribute>
+        <description>
+        Field configurations
+        </description>
+    </tag>
+
+    <tag>
+        <name>dynaForm</name>
+        <tagclass>org.apache.myfaces.custom.dynaForm.component.dynaForm.DynaFormTag</tagclass>
+        <bodycontent>JSP</bodycontent>
+        <attribute>
+            <name>var</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+      The var used to get access to the form controller
+            </description>
+        </attribute>
+        <attribute>
+            <name>valueBindingPrefix</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+          The value binding prefix which will be used to create the real value binding.
+          If this is missing and the layout component has a "var" attribute its value will
be used.
+            </description>
+        </attribute>
+        <attribute>
+            <name>uri</name>
+            <required>true</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+        The root model
+            </description>
+        </attribute>
+        <attribute>
+            <name>displayOnly</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+        Render the whole form in display (non editable) only mode
+            </description>
+        </attribute>
+        <attribute>
+            <name>bundle</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+        The bundle to use to convert the lables to readable strings
+            </description>
+        </attribute>
+        <attribute>
+            <name>exclusiveFields</name>
+            <required>false</required>
+            <rtexprvalue>false</rtexprvalue>
+            <description>
+        true|false - Set to true if only the fields listed within the configuration are to
be rendered
+            </description>
+        </attribute>
+        <description>
+        Handle all the dynamic form creation for JSF
+        </description>
+    </tag>
+</taglib>

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-empty-src.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-empty-src.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-empty-src.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-empty-src.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE taglib
+        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+    "http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+    <tlib-version>1.0</tlib-version>
+    <short-name>d</short-name>
+</taglib>

Added: geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-obsolete-src.tld
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-obsolete-src.tld?view=auto&rev=523161
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-obsolete-src.tld
(added)
+++ geronimo/server/trunk/modules/geronimo-jasper-builder/src/test/resources/1_2_dtd/taglib-obsolete-src.tld
Tue Mar 27 21:20:06 2007
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!DOCTYPE taglib
+        PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+    "http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">
+<taglib>
+    <tlib-version>1.0</tlib-version>
+    <jsp-version>1.2</jsp-version>
+    <short-name>debug</short-name>
+    <uri>http://jakarta.apache.org/tomcat/debug-taglib</uri>
+    <description>
+    This tag library defines no tags.  Instead, its purpose is encapsulated
+    in the TagLibraryValidator implementation that simply outputs the XML
+    version of a JSP page to standard output, whenever this tag library is
+    referenced in a "taglib" directive in a JSP page.
+    </description>
+    <validator>
+        <validator-class>validators.DebugValidator</validator-class>
+    </validator>
+    <info>info</info>
+    <tag>
+        <name>log</name>
+        <tag-class>examples.LogTag</tag-class>
+        <tei-class>examples.LogTei</tei-class>
+        <body-content>tagdependent</body-content>
+        <description>
+    Perform a server side action; Log the message.
+        </description>
+        <attribute>
+            <name>toBrowser</name>
+            <required>false</required>
+            <rtexprvalue>true</rtexprvalue>
+        </attribute>
+    </tag>
+</taglib>



Mime
View raw message