myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r955793 [4/4] - in /myfaces/tomahawk/trunk/core12/src/test: java/org/apache/myfaces/component/ java/org/apache/myfaces/component/html/ java/org/apache/myfaces/component/html/ext/ java/org/apache/myfaces/convert/ java/org/apache/myfaces/cust...
Date Thu, 17 Jun 2010 23:57:56 GMT
Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractClassElementTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractClassElementTestCase.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractClassElementTestCase.java
(added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractClassElementTestCase.java
Thu Jun 17 23:57:54 2010
@@ -0,0 +1,155 @@
+/*
+ * 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.myfaces.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import junit.framework.TestCase;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.shared_tomahawk.test.ClassElementHandler;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.XMLReader;
+
+/**
+ * This test makes sure all of our components, tags, renderers, 
+ * validators, converters, action listeners, phase listeners and
+ * core implementation classes are in the build.
+ * 
+ * This class has been copy and pasted into both tomahawk and core 
+ * in order to avoid a compile scoped dependency on junit in shared.
+ * 
+ * @see ClassElementHandler
+ * @author Dennis Byrne
+ */
+
+public abstract class AbstractClassElementTestCase extends TestCase
+{
+
+    private Log log = LogFactory.getLog(AbstractClassElementTestCase.class);
+    
+    protected List resource = new ArrayList();
+    private List className = new ArrayList();
+        
+    public class DelegateEntityResolver extends ClassElementHandler
+    {
+        public DelegateEntityResolver()
+        {
+            super();
+        }
+
+        public InputSource resolveEntity(String publicId, String systemId)
+                throws SAXException, IOException
+        {
+            if (publicId.equals("-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"))
+            {
+                return new InputSource(Thread.currentThread()
+                        .getContextClassLoader().getResourceAsStream(
+                                "META-INF/dtd/web-jsptaglibrary_1_2.dtd"));
+            }
+            else if (publicId.equals("-//Sun Microsystems, Inc.//DTD JavaServer Faces Config
1.1//EN"))
+            {
+                return new InputSource(Thread.currentThread()
+                        .getContextClassLoader().getResourceAsStream(
+                                "org/apache/myfaces/resource/web-facesconfig_1_1.dtd"));
               
+            }
+            else
+            {
+                return super.resolveEntity(publicId, systemId);
+            }
+        }
+    }    
+    
+    protected void setUp() throws Exception
+    {
+        SAXParserFactory factory = SAXParserFactory.newInstance();
+        factory.setValidating(false);
+        factory.setNamespaceAware(false);
+
+        SAXParser parser = factory.newSAXParser();
+        ClassElementHandler handler = new DelegateEntityResolver();
+        
+        Iterator iterator = resource.iterator();
+        
+        while(iterator.hasNext()){
+            
+            String resourceName = (String) iterator.next();
+            
+            InputStream is = getClass().getClassLoader()
+                .getResourceAsStream(resourceName);
+        
+            if(is == null)
+                is = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourceName);
+        
+            if(is == null)
+                throw new Exception("Could not locate resource :" + resourceName);
+        
+            parser.parse(is, handler);
+            
+        }
+        
+        className.addAll(handler.getClassName());
+        
+    }
+    
+    public void testClassPath(){
+        
+        int i = 0;
+        for(  ; i < className.size() ; i++){
+            
+            String clazz = (String) className.get(i);
+            
+            try
+            {
+                getClass().getClassLoader().loadClass(clazz);
+                
+            }
+            catch (ClassNotFoundException e)
+            {
+                
+                try{
+                    
+                    Thread.currentThread().getContextClassLoader().loadClass(clazz);
+                    
+                }catch(ClassNotFoundException e2){
+                    
+                    assertFalse("Could not load " + clazz, true); 
+                    
+                }
+                
+            }
+            
+        }
+        
+        log.debug(( i + 1 ) + " class found ");
+        
+    }
+    
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractTagLibTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractTagLibTestCase.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractTagLibTestCase.java
(added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/AbstractTagLibTestCase.java
Thu Jun 17 23:57:54 2010
@@ -0,0 +1,275 @@
+/*
+ * 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.myfaces.test;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import junit.framework.TestCase;
+import net.sf.maventaglib.checker.Tag;
+import net.sf.maventaglib.checker.TagAttribute;
+import net.sf.maventaglib.checker.Tld;
+import net.sf.maventaglib.checker.TldParser;
+
+import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.w3c.dom.Document;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Insures the following ...
+ * <ul>
+ * <li> Tag handlers have setters for all tag attributes</li>
+ * <li> All tag handlers are in the classpath</li>
+ * <li> Tag handlers do not appear in the TLD more than once</li>
+ * <li> Tag handler attributes do not occur mare than once</li>
+ * </ul>
+ * 
+ * @author Dennis Byrne
+ * @see http://maven-taglib.sourceforge.net/ for dependency download
+ */
+
+public abstract class AbstractTagLibTestCase extends TestCase {
+    private static Log log = LogFactory.getLog(AbstractTagLibTestCase.class);
+
+    protected Tld[] tlds;
+
+    protected String[] tldPaths;
+    
+    private ClassLoader classLoader = getClass().getClassLoader();
+
+    /**
+     * Unmarshall TLDs to an object model. TLDs are supplied by a subclass.
+     */
+
+    protected void setUp() throws Exception {
+
+        if (tldPaths == null)
+            throw new NullPointerException(
+                    "tldPaths cannot point to null before setUp() is called");
+
+        int length = tldPaths.length;
+
+        if (length == 0)
+            throw new IllegalStateException(
+                    "tldPaths should have at least one resource path");
+
+        tlds = new Tld[length];
+
+        for (int t = 0; t < length; t++) {
+            String name = tldPaths[t];
+
+            InputStream stream = classLoader.getResourceAsStream(name);
+
+            if (stream == null)
+                throw new NullPointerException(
+                        "couldn't get an input stream for " + name);
+
+            tlds[t] = TldTestUtils.getTld(name, stream);
+            stream.close();
+        }
+    }
+
+    public void testUniqueTagTestCase() throws Exception {
+
+        for (int lib = 0; lib < tlds.length; lib++) {
+            Tld tld = tlds[lib];
+            List tagNames = new ArrayList();
+            Tag[] tags = tld.getTags();
+
+            for (int t = 0; t < tags.length; t++) {
+                Tag tag = tags[t];
+
+                if (tag == null)
+                    throw new NullPointerException("tag");
+
+                String name = tag.getName();
+                String msg = name + " found more than once in " + tldPaths[lib];
+                assertFalse(msg, tagNames.contains(name));
+                tagNames.add(name);
+            } // end t
+        } // end lib
+    }
+
+    public void testUniqueTagAttributes() throws Exception {
+
+        for (int lib = 0; lib < tlds.length; lib++) {
+            Tld tld = tlds[lib];
+            Tag[] tags = tld.getTags();
+
+            for (int t = 0; t < tags.length; t++) {
+
+                Tag tag = tags[t];
+                assertUniqueTagAttributes(tag, tldPaths[lib]);
+
+            } // end t
+        } // end lib
+    }
+
+    private void assertUniqueTagAttributes(final Tag tag, final String path) {
+
+        List attributeNames = new ArrayList();
+        TagAttribute[] atts = tag.getAttributes();
+        String tagName = tag.getName();
+
+        for (int a = 0; a < atts.length;) {
+
+            TagAttribute att = atts[a++];
+            String name = att.getAttributeName();
+            String msg = " @" + name + " of " + path + ":" + tagName
+                    + " is duplicated.";
+            assertFalse(msg, attributeNames.contains(name));
+            attributeNames.add(name);
+
+        } // end a
+
+    }
+
+    /**
+     * Make sure the class exists. Make sure there is a setter for each
+     * attribute.
+     */
+
+    public void testSetters() throws Exception {
+
+        for (int t = 0; t < tlds.length; t++) {
+            Tld tld = tlds[t];
+            Tag[] tags = tld.getTags();
+
+            for (int s = 0; s < tags.length; s++) {
+                Tag tag = tags[s];
+                String filename = tld.getFilename();
+
+                Object object = TldTestUtils.makeTagClassInstance(tag,
+                        filename, classLoader);
+                log.debug("filename = " + filename + " ; tag = " + tag.getName());
+                assertSetters(tag, filename, object);
+
+            } // end for tag
+        } // end for lib
+
+    }
+
+    private void assertSetters(final Tag tag, final String path,
+            final Object object) {
+
+        TagAttribute[] attributes = tag.getAttributes();
+        String tagName = tag.getName();
+
+        for (int a = 0; a < attributes.length; a++) {
+            TagAttribute attribute = attributes[a];
+            String name = attribute.getAttributeName();
+
+            if (name == null || "".equals(name.trim()))
+                throw new IllegalStateException(path + ":" + tagName
+                        + " has a nameless attribute ");
+
+            String msg = path + ":" + tagName + "@" + name
+                    + " exists, but " + object.getClass().getName()
+                    + " has no setter.";
+            
+            assertTrue(msg, PropertyUtils.isWriteable(object, name));
+        } // end for attributes
+
+    }
+    
+    private static class DelegateEntityResolver implements EntityResolver
+    {
+        private EntityResolver _delegate;
+
+        public DelegateEntityResolver(EntityResolver delegate)
+        {
+            this._delegate = delegate;
+        }
+
+        public InputSource resolveEntity(String publicId, String systemId)
+                throws SAXException, IOException
+        {
+            if (publicId.equals("-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"))
+            {
+                return new InputSource(Thread.currentThread()
+                        .getContextClassLoader().getResourceAsStream(
+                                "META-INF/dtd/web-jsptaglibrary_1_2.dtd"));
+            }
+            else
+            {
+                return _delegate.resolveEntity(publicId, systemId);
+            }
+        }
+    }    
+
+    private static class TldTestUtils {
+        private static Log log = LogFactory.getLog(TldTestUtils.class);
+
+        private static DocumentBuilderFactory dbf = DocumentBuilderFactory
+                .newInstance();
+        static
+        {
+            dbf.setNamespaceAware(false);
+            dbf.setValidating(false);
+        }
+
+        public static Tld getTld(String name, InputStream stream)
+                throws Exception {
+            if (stream == null)
+                log.error(" input stream is null ");
+
+            DocumentBuilder db = dbf.newDocumentBuilder();
+            db.setEntityResolver(new DelegateEntityResolver(null));
+            Document doc = db.parse(stream);
+
+            return TldParser.parse(doc, name);
+        }
+
+        public static Object makeTagClassInstance(Tag tag, String filename,
+                ClassLoader classLoader) throws Exception {
+
+            String clazzName = tag.getTagClass();
+
+            if (clazzName == null || "".equals(clazzName.trim()))
+                throw new NullPointerException(tag.getName()
+                        + " is missing a tag class.");
+
+            try {
+
+                Class clazz = classLoader.loadClass(clazzName);
+                return clazz.newInstance();
+
+            } catch (ClassNotFoundException e) {
+                throw new ClassNotFoundException(clazzName);
+            } catch (IllegalAccessException ie) {
+                throw new IllegalAccessException(clazzName);
+            } catch (InstantiationException iste) {
+                throw new InstantiationException(clazzName);
+            }
+
+        }
+
+    }
+
+}
\ No newline at end of file

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/MyFacesTagLibTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/MyFacesTagLibTestCase.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/MyFacesTagLibTestCase.java
(added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/MyFacesTagLibTestCase.java
Thu Jun 17 23:57:54 2010
@@ -0,0 +1,42 @@
+/*
+ * 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.myfaces.test;
+
+/**
+ * @author Dennis C. Byrne
+ */
+
+public class MyFacesTagLibTestCase extends AbstractTagLibTestCase {
+
+    protected static final String META_INF = "META-INF/";
+
+    public MyFacesTagLibTestCase(){
+
+        // TODO get the sandbox in here
+
+        tldPaths = new String[3];
+        tldPaths[0] = META_INF + "myfaces_html.tld";
+        tldPaths[1] = META_INF + "myfaces_core.tld";
+        tldPaths[2] = META_INF + "tomahawk.tld";
+        // tldPaths[3] = META_INF + "myfaces_sandbox.tld";
+
+    }
+
+}

Added: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/TomahawkClassElementTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/TomahawkClassElementTestCase.java?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/TomahawkClassElementTestCase.java
(added)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/TomahawkClassElementTestCase.java
Thu Jun 17 23:57:54 2010
@@ -0,0 +1,37 @@
+/*
+ * 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.myfaces.test;
+
+/**
+ * @author Dennis Byrne
+ */
+
+public class TomahawkClassElementTestCase extends AbstractClassElementTestCase
+{
+
+    public TomahawkClassElementTestCase(){
+        
+        resource.add("META-INF/tomahawk.tld");
+        resource.add("META-INF/faces-config.xml");
+        
+    }
+    
+}

Modified: myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/utils/TestUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/utils/TestUtils.java?rev=955793&r1=955792&r2=955793&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/utils/TestUtils.java
(original)
+++ myfaces/tomahawk/trunk/core12/src/test/java/org/apache/myfaces/test/utils/TestUtils.java
Thu Jun 17 23:57:54 2010
@@ -391,7 +391,6 @@ public final class TestUtils
         addRenderer(facesContext, "org.apache.myfaces.HtmlTree",
                 "javax.faces.Group",
                 "org.apache.myfaces.custom.tree.renderkit.html.HtmlTreeRenderer");
-        
         addRenderer(facesContext, "javax.faces.Output",
                 "org.apache.myfaces.FieldsetRenderer",
                 "org.apache.myfaces.custom.fieldset.FieldsetRenderer");

Added: myfaces/tomahawk/trunk/core12/src/test/resources/META-INF/dtd/web-jsptaglibrary_1_2.dtd
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/resources/META-INF/dtd/web-jsptaglibrary_1_2.dtd?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/resources/META-INF/dtd/web-jsptaglibrary_1_2.dtd
(added)
+++ myfaces/tomahawk/trunk/core12/src/test/resources/META-INF/dtd/web-jsptaglibrary_1_2.dtd
Thu Jun 17 23:57:54 2010
@@ -0,0 +1,79 @@
+<!--
+ * 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.
+-->
+<!--
+  ** This DTD contains only the programatic elements required for testing
+  ** For the DTD from Sun that includes documentation and other copyrighted information
+  ** please refer to the latest XSD at :
+  ** http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd
+-->
+<!ELEMENT taglib (tlib-version, jsp-version, short-name, uri?,
+display-name?, small-icon?, large-icon?, description?,
+validator?, listener*, tag+) >
+<!ATTLIST taglib id ID #IMPLIED xmlns CDATA #FIXED "http://java.sun.com/JSP/TagLibraryDescriptor">
+<!ELEMENT tlib-version (#PCDATA) >
+<!ELEMENT jsp-version  (#PCDATA) >
+<!ELEMENT short-name      (#PCDATA) >
+<!ELEMENT uri    (#PCDATA) >
+<!ELEMENT description   (#PCDATA) >
+<!ELEMENT validator (validator-class, init-param*, description?) >
+<!ELEMENT validator-class (#PCDATA) >
+<!ELEMENT init-param (param-name, param-value, description?)>
+<!ELEMENT param-name (#PCDATA)>
+<!ELEMENT param-value (#PCDATA)>
+<!ELEMENT listener (listener-class) >
+<!ELEMENT listener-class (#PCDATA) >
+<!ELEMENT tag (name, tag-class, tei-class?, body-content?, display-name?,
+small-icon?, large-icon?, description?, variable*, attribute*,
+example?) >
+<!ELEMENT tag-class (#PCDATA) >
+<!ELEMENT tei-class (#PCDATA) >
+<!ELEMENT body-content (#PCDATA) >
+<!ELEMENT display-name (#PCDATA) >
+<!ELEMENT large-icon (#PCDATA) >
+<!ELEMENT small-icon (#PCDATA) >
+<!ELEMENT example (#PCDATA) >
+<!ELEMENT variable ( (name-given | name-from-attribute), variable-class?, declare?, scope?,
description?) >
+<!ELEMENT name-given (#PCDATA) >
+<!ELEMENT name-from-attribute (#PCDATA) >
+<!ELEMENT variable-class (#PCDATA) >
+<!ELEMENT declare (#PCDATA) >
+<!ELEMENT scope (#PCDATA) >
+<!ELEMENT attribute (name, required? , rtexprvalue?, type?, description?) >
+<!ELEMENT name  (#PCDATA) >
+<!ELEMENT required    (#PCDATA) >
+<!ELEMENT rtexprvalue (#PCDATA) >
+<!ELEMENT type (#PCDATA) >
+<!ATTLIST tlib-version id ID #IMPLIED>
+<!ATTLIST jsp-version id ID #IMPLIED>
+<!ATTLIST short-name id ID #IMPLIED>
+<!ATTLIST uri id ID #IMPLIED>
+<!ATTLIST description id ID #IMPLIED>
+<!ATTLIST example id ID #IMPLIED>
+<!ATTLIST tag id ID #IMPLIED>
+<!ATTLIST tag-class id ID #IMPLIED>
+<!ATTLIST tei-class id ID #IMPLIED>
+<!ATTLIST body-content id ID #IMPLIED>
+<!ATTLIST attribute id ID #IMPLIED>
+<!ATTLIST name id ID #IMPLIED>
+<!ATTLIST required id ID #IMPLIED>
+<!ATTLIST rtexprvalue id ID #IMPLIED>
+<!ATTLIST param-name id ID #IMPLIED>
+<!ATTLIST param-value id ID #IMPLIED>
+<!ATTLIST listener id ID #IMPLIED>
+<!ATTLIST listener-class id ID #IMPLIED>
\ No newline at end of file

Added: myfaces/tomahawk/trunk/core12/src/test/resources/pets.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/resources/pets.xml?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/resources/pets.xml (added)
+++ myfaces/tomahawk/trunk/core12/src/test/resources/pets.xml Thu Jun 17 23:57:54 2010
@@ -0,0 +1,5 @@
+<item>
+	<number>1000203</number>
+	<name>Iguana</name>
+	<price>$100.20</price>
+</item>
\ No newline at end of file

Added: myfaces/tomahawk/trunk/core12/src/test/resources/pets.xsl
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core12/src/test/resources/pets.xsl?rev=955793&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/core12/src/test/resources/pets.xsl (added)
+++ myfaces/tomahawk/trunk/core12/src/test/resources/pets.xsl Thu Jun 17 23:57:54 2010
@@ -0,0 +1,15 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+     version="1.0">
+
+	<xsl:output method="text" omit-xml-declaration="yes"/> 
+	<xsl:strip-space elements="*"/>
+
+   <xsl:template match="item">
+     <xsl:apply-templates select="name"/>
+   </xsl:template>
+
+   <xsl:template match="name">
+     <xsl:value-of select="text()"/>
+   </xsl:template>
+
+ </xsl:stylesheet>
\ No newline at end of file



Mime
View raw message