You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2007/01/09 18:29:37 UTC

svn commit: r494496 - in /tapestry/tapestry5/tapestry-core/trunk/src: main/java/org/apache/tapestry/internal/ main/java/org/apache/tapestry/internal/services/ main/resources/org/apache/tapestry/internal/services/ site/apt/guide/ test/app1/ test/app1/WE...

Author: hlship
Date: Tue Jan  9 09:29:30 2007
New Revision: 494496

URL: http://svn.apache.org/viewvc?view=rev&rev=494496
Log:
Change the location for context templates to be inside WEB-INF.
Allow arbitrary attributes to be placed in the Tapestry namespace with invisible instrumentation.
Default to the "prop:" binding prefix for attributes of invisibly instrumented elements (for consistency with <t:comp>).
Add InternalConstants.TEMPLATE_EXTENSION to define the extension Tapestry uses to locate component template files.

Added:
    tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/AnyDemo.html
      - copied, changed from r493881, tapestry/tapestry5/tapestry-core/trunk/src/test/app1/AnyDemo.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/ClassLoaderInspect.html
      - copied unchanged from r493881, tapestry/tapestry5/tapestry-core/trunk/src/test/app1/ClassLoaderInspect.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/SimpleForm.html
      - copied, changed from r493881, tapestry/tapestry5/tapestry-core/trunk/src/test/app1/SimpleForm.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/app2/WEB-INF/
    tapestry/tapestry5/tapestry-core/trunk/src/test/app2/WEB-INF/TestPageForTemplateInContext.html
      - copied unchanged from r493881, tapestry/tapestry5/tapestry-core/trunk/src/test/app2/TestPageForTemplateInContext.html
Removed:
    tapestry/tapestry5/tapestry-core/trunk/src/test/app1/AnyDemo.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/app1/ClassLoaderInspect.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/app1/SimpleForm.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/app2/TestPageForTemplateInContext.html
    tapestry/tapestry5/tapestry-core/trunk/src/test/resources/org/apache/tapestry/internal/services/unexpected_attribute_in_instrumented_element.html
Modified:
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/InternalConstants.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLinkTarget.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageTemplateLocatorImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/StaticFilesFilter.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java
    tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/services/ServicesStrings.properties
    tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/templates.apt
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/PageTemplateLocatorImplTest.java
    tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/InternalConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/InternalConstants.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/InternalConstants.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/InternalConstants.java Tue Jan  9 09:29:30 2007
@@ -12,23 +12,31 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.internal;
-
-public final class InternalConstants
-{
-    /**
-     * Init parameter used to identify the package from which application classes are loaded. Such
-     * classes are in the pages, components and mixins sub-packages.
-     */
-    public static final String TAPESTRY_APP_PACKAGE_PARAM = "tapestry.app-package";
-
-    /** Binding expression prefix used for literal strings. */
-    public static final String LITERAL_BINDING_PREFIX = "literal";
-
-    /** Binding expression prefix used to bind to a property of the component. */
-    public static final String PROP_BINDING_PREFIX = "prop";
-
-    private InternalConstants()
-    {
-    }
-}
+package org.apache.tapestry.internal;
+
+public final class InternalConstants
+{
+    /**
+     * Init parameter used to identify the package from which application classes are loaded. Such
+     * classes are in the pages, components and mixins sub-packages.
+     */
+    public static final String TAPESTRY_APP_PACKAGE_PARAM = "tapestry.app-package";
+
+    /** Binding expression prefix used for literal strings. */
+    public static final String LITERAL_BINDING_PREFIX = "literal";
+
+    /** Binding expression prefix used to bind to a property of the component. */
+    public static final String PROP_BINDING_PREFIX = "prop";
+
+    /**
+     * The extension used for Tapestry component template files. Template files are well-formed XML
+     * files. This is also used as the extension for page render requests (perhaps these will be
+     * split into two concepts later, especially if the we designate a particular extension for
+     * Tapestry template files, such as .tsp).
+     */
+    public static final String TEMPLATE_EXTENSION = "html";
+
+    private InternalConstants()
+    {
+    }
+}

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java Tue Jan  9 09:29:30 2007
@@ -23,6 +23,7 @@
 import java.util.Set;
 
 import org.apache.tapestry.events.UpdateListener;
+import org.apache.tapestry.internal.InternalConstants;
 import org.apache.tapestry.internal.event.InvalidationEventHubImpl;
 import org.apache.tapestry.internal.parser.ComponentTemplate;
 import org.apache.tapestry.internal.parser.TemplateToken;
@@ -185,7 +186,7 @@
 
     private Resource baseResourceForModel(ComponentModel model)
     {
-        return model.getBaseResource().withExtension("html");
+        return model.getBaseResource().withExtension(InternalConstants.TEMPLATE_EXTENSION);
     }
 
     /**

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLinkTarget.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLinkTarget.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLinkTarget.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLinkTarget.java Tue Jan  9 09:29:30 2007
@@ -14,6 +14,8 @@
 
 package org.apache.tapestry.internal.services;
 
+import org.apache.tapestry.internal.InternalConstants;
+
 /**
  * It represents a component invocation target for a page link. It is passed to an
  * {@link org.apache.tapestry.internal.services.ActionLinkHandler} by both the
@@ -34,10 +36,7 @@
 
     public String getPath()
     {
-        StringBuilder builder = new StringBuilder();
-        builder.append(_pageName);
-        builder.append(".html");
-        return builder.toString();
+        return _pageName + "." + InternalConstants.TEMPLATE_EXTENSION;
     }
 
     public String getPageName()

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java Tue Jan  9 09:29:30 2007
@@ -194,7 +194,6 @@
         List<ComponentPageElement> activeComponentStack = newList();
 
         boolean directlyInsideSubcomponent = false;
-        String defaultBindingPrefix = null;
 
         for (TemplateToken token : template.getTokens())
         {
@@ -346,9 +345,6 @@
 
                     directlyInsideSubcomponent = true;
 
-                    defaultBindingPrefix = startComponent.getElementName() == null ? InternalConstants.PROP_BINDING_PREFIX
-                            : InternalConstants.LITERAL_BINDING_PREFIX;
-
                     break;
 
                 case ATTRIBUTE:
@@ -357,11 +353,7 @@
 
                     if (directlyInsideSubcomponent)
                     {
-                        addBindingToComponent(
-                                loadingElement,
-                                activeComponent,
-                                defaultBindingPrefix,
-                                attribute);
+                        addBindingToComponent(loadingElement, activeComponent, attribute);
                     }
                     else
                         add(loadingElement, activeComponent, _pageElementFactory
@@ -428,7 +420,7 @@
 
     // This is for bindings from the template.
     private void addBindingToComponent(ComponentPageElement loadingElement,
-            ComponentPageElement component, String defaultBindingPrefix, AttributeToken token)
+            ComponentPageElement component, AttributeToken token)
     {
         String name = token.getName();
         ComponentResources resources = component.getComponentResources();
@@ -444,7 +436,7 @@
                 "parameter " + name,
                 loadingElement.getComponentResources(),
                 component.getComponentResources(),
-                defaultBindingPrefix,
+                InternalConstants.PROP_BINDING_PREFIX,
                 token.getValue(),
                 token.getLocation());
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageRenderDispatcher.java Tue Jan  9 09:29:30 2007
@@ -16,6 +16,7 @@
 
 import java.io.IOException;
 
+import org.apache.tapestry.internal.InternalConstants;
 import org.apache.tapestry.internal.structure.Page;
 import org.apache.tapestry.services.Dispatcher;
 import org.apache.tapestry.services.Request;
@@ -31,6 +32,8 @@
 
     private PageResponseRenderer _renderer;
 
+    private final String _suffix = "." + InternalConstants.TEMPLATE_EXTENSION;
+
     public PageRenderDispatcher(PageLinkHandler handler, PageResponseRenderer renderer)
     {
         _handler = handler;
@@ -44,7 +47,7 @@
 
         // For the moment, just matching things that end with .html
 
-        int pos = path.indexOf(".html");
+        int pos = path.indexOf(_suffix);
 
         if (pos < 0)
             return false;
@@ -64,24 +67,26 @@
             // TODO: Decode strings?
             context[i - 1] = terms[i];
         }
-        _handler.handle(
-                new ComponentInvocation(new PageLinkTarget(logicalPageName), context),
-                new PageRenderer()
+
+        PageRenderer renderer = new PageRenderer()
+        {
+            public void renderPage(Page page)
+            {
+                try
+                {
+                    _renderer.renderPageResponse(page, response);
+                }
+                catch (IOException ex)
                 {
+                    new RuntimeException(ex);
+                }
 
-                    public void renderPage(Page page)
-                    {
-                        try
-                        {
-                            _renderer.renderPageResponse(page, response);
-                        }
-                        catch (IOException ex)
-                        {
-                            new RuntimeException(ex);
-                        }
+            }
+        };
 
-                    }
-                });
+        _handler.handle(
+                new ComponentInvocation(new PageLinkTarget(logicalPageName), context),
+                renderer);
 
         return true;
     }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageTemplateLocatorImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageTemplateLocatorImpl.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageTemplateLocatorImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageTemplateLocatorImpl.java Tue Jan  9 09:29:30 2007
@@ -14,8 +14,11 @@
 
 package org.apache.tapestry.internal.services;
 
+import static java.lang.String.format;
+
 import java.util.Locale;
 
+import org.apache.tapestry.internal.InternalConstants;
 import org.apache.tapestry.ioc.Resource;
 import org.apache.tapestry.model.ComponentModel;
 import org.apache.tapestry.services.ComponentClassResolver;
@@ -43,7 +46,9 @@
 
         String logicalName = _resolver.resolvePageClassNameToPageName(className);
 
-        return _contextRoot.forFile(logicalName + ".html").forLocale(locale);
+        String path = format("WEB-INF/%s.%s", logicalName, InternalConstants.TEMPLATE_EXTENSION);
+
+        return _contextRoot.forFile(path).forLocale(locale);
     }
 
 }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java Tue Jan  9 09:29:30 2007
@@ -295,11 +295,6 @@
                 specification);
     }
 
-    static String unexpectedTapestryAttribute(String qName)
-    {
-        return MESSAGES.format("unexpected-tapestry-attribute", qName);
-    }
-
     static String mixinsInvalidWithoutIdOrType(String elementName)
     {
         return MESSAGES.format("mixins-invalid-without-id-or-type", elementName);

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/StaticFilesFilter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/StaticFilesFilter.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/StaticFilesFilter.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/StaticFilesFilter.java Tue Jan  9 09:29:30 2007
@@ -41,19 +41,10 @@
     {
         String path = request.getPath();
 
-        // A hopefully temporary hack. .html files *may* be page templates, which are now allowed to
-        // exist up in the web context. Eventually, though, we may support other extensions than
-        // .html, and there's a further issue handling truly static files with an .html
-        // extension.
+        URL url = _context.getResource(path);
 
-        if (!path.endsWith(".html"))
-        {
-
-            URL url = _context.getResource(path);
-
-            if (url != null)
-                return false;
-        }
+        if (url != null)
+            return false;
 
         return handler.service(request, response);
     }

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/TemplateParserImpl.java Tue Jan  9 09:29:30 2007
@@ -246,9 +246,10 @@
                 _tokens.add(new TextToken(prefix, _textStartLocation));
             }
 
-            // Group 1 includes the real text of the expansion, which whitespace around the expression (but inside the curly
+            // Group 1 includes the real text of the expansion, which whitespace around the
+            // expression (but inside the curly
             // braces) excluded.
-            
+
             String expression = matcher.group(1);
 
             _tokens.add(new ExpansionToken(expression, _textStartLocation));
@@ -333,8 +334,8 @@
                         continue;
                     }
 
-                    throw new TapestryException(ServicesMessages
-                            .unexpectedTapestryAttribute(attributes.getQName(i)), location, null);
+                    // Anything else is the name of a Tapestry component parameter that is simply
+                    // not part of the template's doctype for the element being instrumented.
                 }
             }
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/services/ServicesStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/services/ServicesStrings.properties?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/services/ServicesStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/services/ServicesStrings.properties Tue Jan  9 09:29:30 2007
@@ -67,6 +67,5 @@
 component-not-assignable-to-field=Component %s is not assignable to field %s (of type %s).
 unknown-validator-type=Unknown validator type '%s'.  Configured validators are %s.
 validator-specification-parse-error=Unexpected character '%s' at position %d of input string: %s
-unexpected-tapestry-attribute=Attribute '%s' is not defined in the Tapestry template schema.
 unknown-translator-type=Unknown translator type '%s'.  Configured translators are %s.
 missing-from-environment=No object of type %s is available from the Environment.  Available types are %s.

Modified: tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/templates.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/templates.apt?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/templates.apt (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/site/apt/guide/templates.apt Tue Jan  9 09:29:30 2007
@@ -170,8 +170,8 @@
    
 Invisible Instrumentation
 
-  A favorite feature of Tapestry 4 is <invisible instrumentation>, the ability to mark ordinary HTML elements as components. This has the advantage
-  of providing more concise template that are often more readable.
+  A favorite feature of Tapestry 4 is <invisible instrumentation>, the ability to mark ordinary HTML elements as components. Invisible instrumentation
+  leads to more concise templates that are also more readable.
   
   For Tapestry 5, you make use of <namespaced> id or type attributes to mark an element as a component, for example:
   
@@ -184,16 +184,14 @@
 </p>
 +---+   
 
-  Only the id, type and mixins attributes are placed in the Tapestry namespace; all other attributes have no prefix.
-  
-  <Note: this may change; since often component parameters do not match X/HTML elements, we may shift this to allow
-  any attribute to be placed in the Tapestry namespace; this would allow input documents to be not only well formed
-  but validatable.>
+  The id, type and mixins attributes must be placed in the Tapestry namespace.  Any additional attributes may be in the Tapestry namespace
+  or in the default namespace. Placing an attribute in the Tapestry namespace is useful when the attribute is not defined for the
+  element being instrumented.
    
-  <<Parameters are always literal strings.>> Unlike the use of attributes with the \<t:comp\> element, 
-  parameter values (such as end, in the previous example)
-  are assumed to be literal strings.  You must use the "prop:" prefix if the value is name of a property of the component.
-  
+  Parameters for instrumented elements <<are still, by default, property expressions>>.  This means that simple strings will need
+  to be enclosed in single quotes, or they'll be interpreted as the names of properties (that don't exist).  Numbers may be left as is.  <<This applies to
+  informal parameters as well as formal parameters.>>
+    
   It is valid to specify just the t:id attribute and not supply a specific type in either the template or in the containing class.
   In this situation, Tapestry will make use of the
   {{{../apidocs/org/apache/tapestry/corelib/components/Any.html}Any}} component, a kind of placeholder for any kind of element

Copied: tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/AnyDemo.html (from r493881, tapestry/tapestry5/tapestry-core/trunk/src/test/app1/AnyDemo.html)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/AnyDemo.html?view=diff&rev=494496&p1=tapestry/tapestry5/tapestry-core/trunk/src/test/app1/AnyDemo.html&r1=493881&p2=tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/AnyDemo.html&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/app1/AnyDemo.html (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/AnyDemo.html Tue Jan  9 09:29:30 2007
@@ -5,11 +5,11 @@
         Demonstrates a few things about the Any component.
     </p>
     
-    <span t:id="title" class="title">Page Title</span>
+    <span t:id="title" class="'title'">Page Title</span>
     
-    <div t:id="heading" class="heading">Heading</div>
+    <div t:id="heading" class="'heading'">Heading</div>
     
-    <div t:id="section" element="h2" class="section">Section</div>
+    <div t:id="section" element="'h2'" class="'section'">Section</div>
         
         
     <ul>    

Copied: tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/SimpleForm.html (from r493881, tapestry/tapestry5/tapestry-core/trunk/src/test/app1/SimpleForm.html)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/SimpleForm.html?view=diff&rev=494496&p1=tapestry/tapestry5/tapestry-core/trunk/src/test/app1/SimpleForm.html&r1=493881&p2=tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/SimpleForm.html&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/app1/SimpleForm.html (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/app1/WEB-INF/SimpleForm.html Tue Jan  9 09:29:30 2007
@@ -10,18 +10,18 @@
         <hr/>
         
         <label t:type="Label"  field="component:email">This isn't used</label>: <input
-            t:type="TextField" t:id="email" value="prop:incident.email" size="50"  disabled="prop:disabled"/>
+            t:type="TextField" t:id="email" value="incident.email" size="50"  disabled="disabled"/>
         <br/>
-        <label t:type="Label"  field="component:message"/>: <input t:type="TextArea" t:id="message" label="Incident Message"
-            value="prop:incident.message" cols="50" rows="10" disabled="prop:disabled"> You can put text here, but it isn't used. </input>
+        <label t:type="Label"  field="component:message"/>: <input t:type="TextArea" t:id="message" label="'Incident Message'"
+            value="incident.message" cols="50" rows="10" disabled="disabled"> You can put text here, but it isn't used. </input>
         <br/>
         <label t:type="Label" field="component:operatingSystem"/>:
-        <select t:type="Select"  t:id="operatingSystem" value="prop:incident.operatingSystem" model="message:os-values" disabled="prop:disabled"/>
+        <select t:type="Select"  t:id="operatingSystem" value="incident.operatingSystem" model="message:os-values" disabled="disabled"/>
         
         
         <br/>
         
-        <input t:type="Checkbox" t:id="urgent" value="prop:incident.urgent" disabled="prop:disabled"/>
+        <input t:type="Checkbox" t:id="urgent" value="incident.urgent" disabled="disabled"/>
         <label t:type="Label" field="component:urgent"/>
         <br/>
         <input type="submit"/>

Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImplTest.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImplTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImplTest.java Tue Jan  9 09:29:30 2007
@@ -22,6 +22,7 @@
 import java.util.UUID;
 
 import org.apache.tapestry.events.InvalidationListener;
+import org.apache.tapestry.internal.InternalConstants;
 import org.apache.tapestry.internal.parser.ComponentTemplate;
 import org.apache.tapestry.internal.test.InternalBaseTestCase;
 import org.apache.tapestry.ioc.Resource;
@@ -80,7 +81,8 @@
 
         train_getBaseResource(model, baseResource);
 
-        train_parseTemplate(parser, baseResource.withExtension("html"), template);
+        train_parseTemplate(parser, baseResource
+                .withExtension(InternalConstants.TEMPLATE_EXTENSION), template);
 
         replay();
 
@@ -112,7 +114,7 @@
         f.createNewFile();
 
         Resource baseResource = new ClasspathResource(loader, "baz/Biff.class");
-        Resource localized = baseResource.withExtension("html");
+        Resource localized = baseResource.withExtension(InternalConstants.TEMPLATE_EXTENSION);
 
         TemplateParser parser = newTemplateParser();
         ComponentTemplate template = newComponentTemplate();
@@ -183,7 +185,8 @@
 
         train_getBaseResource(model, baseResource);
 
-        train_parseTemplate(parser, baseResource.withExtension("html"), template);
+        train_parseTemplate(parser, baseResource
+                .withExtension(InternalConstants.TEMPLATE_EXTENSION), template);
 
         replay();
 
@@ -285,7 +288,10 @@
 
         train_getBaseResource(parentModel, baseFred);
 
-        train_parseTemplate(parser, baseFred.withExtension("html"), template);
+        train_parseTemplate(
+                parser,
+                baseFred.withExtension(InternalConstants.TEMPLATE_EXTENSION),
+                template);
 
         replay();
 

Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/PageTemplateLocatorImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/PageTemplateLocatorImplTest.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/PageTemplateLocatorImplTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/PageTemplateLocatorImplTest.java Tue Jan  9 09:29:30 2007
@@ -58,7 +58,7 @@
 
         train_resolvePageClassNameToPageName(resolver, className, "Foo");
 
-        train_forFile(root, "Foo.html", withExtension);
+        train_forFile(root, "WEB-INF/Foo.html", withExtension);
         train_forLocale(withExtension, locale, forLocale);
 
         replay();
@@ -85,7 +85,7 @@
 
         train_resolvePageClassNameToPageName(resolver, className, "bar/Baz");
 
-        train_forFile(root, "bar/Baz.html", withExtension);
+        train_forFile(root, "WEB-INF/bar/Baz.html", withExtension);
         train_forLocale(withExtension, locale, null);
 
         replay();

Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java?view=diff&rev=494496&r1=494495&r2=494496
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/services/TemplateParserImplTest.java Tue Jan  9 09:29:30 2007
@@ -324,22 +324,6 @@
     }
 
     @Test
-    public void unexpected_attribute_in_instrumented_element()
-    {
-        try
-        {
-            tokens("unexpected_attribute_in_instrumented_element.html");
-            unreachable();
-        }
-        catch (TapestryException ex)
-        {
-            assertTrue(ex.getMessage().contains(
-                    "Attribute 't:xid' is not defined in the Tapestry template schema."));
-            assertNotNull(ex.getLocation());
-        }
-    }
-
-    @Test
     public void mixin_requires_id_or_type()
     {
         try